From: Dirk B. <db...@us...> - 2006-02-04 10:53:57
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23277/src/lib Modified Files: excontrols.f Log Message: Some minor changes and some dexing' Index: excontrols.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/excontrols.f,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** excontrols.f 1 Feb 2006 17:08:25 -0000 1.10 --- excontrols.f 4 Feb 2006 10:53:47 -0000 1.11 *************** *** 909,916 **** :M CheckButton: ( -- ) ! 1 ID CheckDlgButton: parent ;M :M UnCheckButton: ( -- ) ! 0 ID CheckDlgButton: parent ;M :M Check: ( f -- ) --- 909,916 ---- :M CheckButton: ( -- ) ! BST_CHECKED ID CheckDlgButton: parent ;M :M UnCheckButton: ( -- ) ! BST_UNCHECKED ID CheckDlgButton: parent ;M :M Check: ( f -- ) *************** *** 962,974 **** :M IsButtonChecked?: ( -- f ) ID IsDlgButtonChecked: parent ;M :M CheckButton: ( -- ) ! 1 ID CheckDlgButton: parent ;M :M UnCheckButton: ( -- ) ! 0 ID CheckDlgButton: parent ;M :M Check: ( f -- ) if CheckButton: self else UnCheckButton: self --- 962,978 ---- :M IsButtonChecked?: ( -- f ) + \ *G Check if the radio button is checked or unchecked. ID IsDlgButtonChecked: parent ;M :M CheckButton: ( -- ) ! \ *G Set the button state to checked. ! BST_CHECKED ID CheckDlgButton: parent ;M :M UnCheckButton: ( -- ) ! \ *G Set the button state to unchecked. ! BST_UNCHECKED ID CheckDlgButton: parent ;M :M Check: ( f -- ) + \ *G Set the button state to either checked or unchecked. if CheckButton: self else UnCheckButton: self *************** *** 1105,1117 **** |Class StaticImage <Super Label \ *G Base class for static control showing an image. ! \ ** This is an intern class; don't use it directly. :M ImageType: ( -- ImageType ) IMAGE_BITMAP ;M :M GetImage: ( -- hImage ) 0 ImageType: [ self ] STM_GETIMAGE SendMessage:Self ;M :M SetImage: ( hImage -- ) GetImage: self over <> if ImageType: [ self ] STM_SETIMAGE SendMessage:Self DROP --- 1109,1124 ---- |Class StaticImage <Super Label \ *G Base class for static control showing an image. ! \ ** This is an internal class; don't use it directly. :M ImageType: ( -- ImageType ) + \ *G Get the image type of the control. \i ImageType \d is IMAGE_BITMAP. IMAGE_BITMAP ;M :M GetImage: ( -- hImage ) + \ *G Retrieve a handle to the image associated with the control. 0 ImageType: [ self ] STM_GETIMAGE SendMessage:Self ;M :M SetImage: ( hImage -- ) + \ *G Associate a new image (icon or bitmap) with the control. GetImage: self over <> if ImageType: [ self ] STM_SETIMAGE SendMessage:Self DROP *************** *** 1131,1135 **** \ ------------------------------------------------------------------------ :Class StaticBitmap <Super StaticImage ! \ *G Static control showing a bitmap :M WindowStyle: ( -- style ) --- 1138,1142 ---- \ ------------------------------------------------------------------------ :Class StaticBitmap <Super StaticImage ! \ *G Static control showing a bitmap. :M WindowStyle: ( -- style ) *************** *** 1145,1149 **** \ ------------------------------------------------------------------------ :Class StaticIcon <Super StaticImage ! \ *G Static control showing an icon :M WindowStyle: ( -- style ) --- 1152,1156 ---- \ ------------------------------------------------------------------------ :Class StaticIcon <Super StaticImage ! \ *G Static control showing an icon. :M WindowStyle: ( -- style ) *************** *** 1152,1155 **** --- 1159,1163 ---- :M ImageType: ( -- ImageType ) + \ *G Get the image type of the control. \i ImageType \d is IMAGE_ICON. IMAGE_ICON ;M *************** *** 1162,1166 **** \ ------------------------------------------------------------------------ :Class StaticMetafile <Super StaticImage ! \ *G Static control showing an enhanced metafile :M WindowStyle: ( -- style ) --- 1170,1174 ---- \ ------------------------------------------------------------------------ :Class StaticMetafile <Super StaticImage ! \ *G Static control showing an enhanced metafile. :M WindowStyle: ( -- style ) *************** *** 1169,1172 **** --- 1177,1181 ---- :M ImageType: ( -- ImageType ) + \ *G Get the image type of the control. \i ImageType \d is IMAGE_ENHMETAFILE. IMAGE_ENHMETAFILE ;M *************** *** 1179,1206 **** \ ------------------------------------------------------------------------ :Class StaticFrame <Super Label ! \ *G Static control showing a frame :M BlackRect: ( -- ) ! \ *G rectangle in the window frame color (default is black) WindowStyle: super SS_BLACKRECT OR SetStyle: self ;M :M GrayRect: ( -- ) ! \ *G rectangle in the screen background color (default is gray) WindowStyle: super SS_GRAYRECT OR SetStyle: self ;M :M WhiteRect: ( -- ) ! \ *G rectangle in the window background color (default is white) WindowStyle: super SS_WHITERECT OR SetStyle: self ;M :M BlackFrame: ( -- ) ! \ *G frame in the window frame color (default is black) WindowStyle: super SS_BLACKFRAME OR SetStyle: self ;M :M GrayFrame: ( -- ) ! \ *G frame in the screen background color (default is gray) WindowStyle: super SS_GRAYFRAME OR SetStyle: self ;M :M WhiteFrame: ( -- ) ! \ *G frame in the window background color (default is white) WindowStyle: super SS_WHITEFRAME OR SetStyle: self ;M --- 1188,1215 ---- \ ------------------------------------------------------------------------ :Class StaticFrame <Super Label ! \ *G Static control showing a frame. :M BlackRect: ( -- ) ! \ *G Rectangle in the window frame color (default is black). WindowStyle: super SS_BLACKRECT OR SetStyle: self ;M :M GrayRect: ( -- ) ! \ *G Rectangle in the screen background color (default is gray). WindowStyle: super SS_GRAYRECT OR SetStyle: self ;M :M WhiteRect: ( -- ) ! \ *G Rectangle in the window background color (default is white). WindowStyle: super SS_WHITERECT OR SetStyle: self ;M :M BlackFrame: ( -- ) ! \ *G Frame in the window frame color (default is black). WindowStyle: super SS_BLACKFRAME OR SetStyle: self ;M :M GrayFrame: ( -- ) ! \ *G Frame in the screen background color (default is gray). WindowStyle: super SS_GRAYFRAME OR SetStyle: self ;M :M WhiteFrame: ( -- ) ! \ *G Frame in the window background color (default is white). WindowStyle: super SS_WHITEFRAME OR SetStyle: self ;M *************** *** 1210,1214 **** :M SunkenFrame: ( -- ) ! \ *G draws frame with half-sunken border WindowStyle: super SS_SUNKEN OR SetStyle: self ;M --- 1219,1223 ---- :M SunkenFrame: ( -- ) ! \ *G Draws frame with half-sunken border. WindowStyle: super SS_SUNKEN OR SetStyle: self ;M *************** *** 1262,1265 **** --- 1271,1277 ---- :Class Progressbar <Super Control \ *G Progressbar control + \ ** A progress bar is a window that an application can use to indicate the progress + \ ** of a lengthy operation. It consists of a rectangle that is gradually filled with + \ ** the system highlight color as an operation progresses. int style *************** *** 1285,1315 **** :M +Value: ( n -- ) ! \ *G increases the value of progress bar by specified increment 0 SWAP PBM_DELTAPOS SendMessage:Self DROP ;M :M GetValue: ( -- n ) ! \ *G returns the current position value 0 0 PBM_DELTAPOS SendMessage:Self ;M :M SetValue: ( n -- ) ! \ *G sets the current position value 0 SWAP PBM_SETPOS SendMessage:Self DROP ;M :M SetRange: ( min max -- ) ! \ *G sets the minimum and maximum values for progress bar word-join 0 PBM_SETRANGE SendMessage:Self ?Win-error ;M :M SetStep: ( n -- ) ! \ *G sets the step increment ! 0 SWAP PBM_SETSTEP SendMessage:Self DROP ;M :M GetStep: ( -- n ) ! \ *G returns the current step increment ! 0 0 PBM_SETSTEP SendMessage:Self ! DUP SetStep: self ! ;M :M StepIt: ( -- ) ! \ *G advances the current position by the step increment 0 0 PBM_STEPIT SendMessage:Self DROP ;M --- 1297,1338 ---- :M +Value: ( n -- ) ! \ *G Advances the current position of the progress bar by a specified increment ! \ ** and redraws the bar to reflect the new position. 0 SWAP PBM_DELTAPOS SendMessage:Self DROP ;M :M GetValue: ( -- n ) ! \ *G Returns the current position of the progress bar. 0 0 PBM_DELTAPOS SendMessage:Self ;M :M SetValue: ( n -- ) ! \ *G Sets the current position for the progress bar and redraws the bar to ! \ ** reflect the new position. 0 SWAP PBM_SETPOS SendMessage:Self DROP ;M :M SetRange: ( min max -- ) ! \ *G Sets the minimum and maximum values for the progress bar and redraws the ! \ ** bar to reflect the new range. ! \ *P \i min \d is the minimum range value. By default, the minimum value is zero. ! \ *P \i max \d is the maximum range value. By default, the maximum value is 100. word-join 0 PBM_SETRANGE SendMessage:Self ?Win-error ;M + : SetStep ( n -- n1 ) + 0 SWAP PBM_SETSTEP SendMessage:Self ; + :M SetStep: ( n -- ) ! \ *G Specifies the step increment for the progress bar. The step increment is ! \ the amount by which the progress bar increases its current position whenever ! \ the StepIt: method is used. By default, the step increment is set to 10. ! SetStep DROP ;M :M GetStep: ( -- n ) ! \ *G Returns the current step increment for the progress bar. ! 0 SetStep dup SetStep ;M :M StepIt: ( -- ) ! \ *G Advances the current position for the progress bar by the step increment ! \ ** and redraws the bar to reflect the new position. ! \ *P When the position exceeds the maximum range value, this method resets the current ! \ ** position so that the progress indicator starts over again from the beginning. 0 0 PBM_STEPIT SendMessage:Self DROP ;M *************** *** 1322,1326 **** \ ------------------------------------------------------------------------ :Class SmoothProgressbar <Super Progressbar ! \ *G SmoothProgressbar control :M WindowStyle: ( -- style ) --- 1345,1354 ---- \ ------------------------------------------------------------------------ :Class SmoothProgressbar <Super Progressbar ! \ *G Progressbar control ! \ ** A progress bar is a window that an application can use to indicate the progress ! \ ** of a lengthy operation. It consists of a rectangle that is gradually filled with ! \ ** the system highlight color as an operation progresses. ! \ *P The progress bar displays progress status in a smooth scrolling bar instead of the ! \ ** default segmented bar. :M WindowStyle: ( -- style ) |