From: Ezra B. <ezr...@us...> - 2006-02-18 04:19:41
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4783/src/lib Modified Files: excontrols.f Log Message: Fixed some controls broken after someone's optimizations. Pardon the lack of DEXH docs for the SpinnerControl! Index: excontrols.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/excontrols.f,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** excontrols.f 9 Feb 2006 18:04:10 -0000 1.13 --- excontrols.f 18 Feb 2006 04:19:33 -0000 1.14 *************** *** 574,588 **** 0 0 LB_GETCURSEL SendMessage:Self ;M ! :M GetString: ( n addr -- n ) \ *G Retrieve a string from the list box. \ *P The return value is the length of the string, in chars, excluding the terminating null character. \ ** If \i n \d does not specify a valid index, the return value is LB_ERR. ! LB_GETTEXT SendMessage:Self ;M :M GetSelectedString: ( -- addr cnt ) \ *G Retrieve the currently selected string from the list box. \ ** Note: The string is returned in the global \i NEW$ \d. ! GetSelection: self ! new$ dup rot GetString: self ;M :M GetCount: ( -- n ) --- 574,587 ---- 0 0 LB_GETCURSEL SendMessage:Self ;M ! :M GetString: ( index -- addr n ) \ *G Retrieve a string from the list box. \ *P The return value is the length of the string, in chars, excluding the terminating null character. \ ** If \i n \d does not specify a valid index, the return value is LB_ERR. ! new$ dup rot LB_GETTEXT SendMessage:Self ;M :M GetSelectedString: ( -- addr cnt ) \ *G Retrieve the currently selected string from the list box. \ ** Note: The string is returned in the global \i NEW$ \d. ! GetSelection: self GetString: self ;M :M GetCount: ( -- n ) *************** *** 641,651 **** -1 LB_FINDSTRINGEXACT SendMessage:Self ;M - :M GetString: ( index -- a n ) - \ *G Retrieve a string from the list box. - \ ** Note the string is returned at HERE ! - - \ TODO: Don't use HERE here !!! - HERE SWAP GetString: self HERE SWAP ;M - :M GetCurrent: ( -- index ) \ *G Retrieve the index of the currently selected item, if any. --- 640,643 ---- *************** *** 807,811 **** \ ** WS_BORDER, UDS_ARROWKEYS, UDS_SETBUDDYINT and UDS_ALIGNRIGHT. WindowStyle: super ! [ WS_BORDER UDS_ARROWKEYS OR UDS_SETBUDDYINT OR UDS_ALIGNRIGHT OR ] literal style or ;M --- 799,803 ---- \ ** WS_BORDER, UDS_ARROWKEYS, UDS_SETBUDDYINT and UDS_ALIGNRIGHT. WindowStyle: super ! [ WS_BORDER UDS_ARROWKEYS OR UDS_SETBUDDYINT OR UDS_ALIGNRIGHT OR ] literal or style or ;M *************** *** 878,881 **** --- 870,897 ---- \ *G End of UpDownControl control + :Class SpinnerControl <Super UpDownControl + TextBox TheBox + + :m start: ( parent -- ) \ both must have same parent + dup Start: TheBox + Start: super + ;m + + :m TheBox: ( -- spinbox ) \ in case we need it directly for some reason + Addr: TheBox ;m + + :m Move: ( x y w h -- ) + Move: TheBox + \ allow the updowncontrol to move with the editcontrol + GetHandle: TheBox SetBuddy: self ;m + + :m SetFont: ( hndl -- ) + Setfont: TheBox ;m + + :M Close: ( -- ) + Close: TheBox + Close: self ;M + ;class + \ ------------------------------------------------------------------------ \ *W <a name="CheckBox"></a> |