From: Dirk B. <db...@us...> - 2005-06-10 16:44:32
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21425/src/lib Modified Files: RESOURCES.F toolbar.f Log Message: - Fixed a bug in the Win32ToolBar class (Thank's Andrew for the bug report) - INTERNAL, EXTERNAL and MODULE added to Resources.f to avoid name conflicts Index: toolbar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/toolbar.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** toolbar.f 21 Dec 2004 00:19:10 -0000 1.1 --- toolbar.f 10 Jun 2005 16:44:23 -0000 1.2 *************** *** 496,538 **** ;M :M EnableButton: ( f id -- ) \ f=true, enable; f=false, disable ! TB_ENABLEBUTTON hwnd Call SendMessage ?win-error ! ;M :M IsButtonEnabled: ( id -- f ) \ f=true, enabled; f=false, disabled ! 0 swap TB_ISBUTTONENABLED hwnd Call SendMessage ! ;M :M HideButton: ( f id -- ) \ f=true, hide; f=false, show ! TB_HIDEBUTTON hwnd Call SendMessage ?win-error ! ;M :M IsButtonHidden: ( id -- f ) \ f=true, hidden; f=false, shown ! 0 swap TB_ISBUTTONHIDDEN hwnd Call SendMessage ! ;M :M CheckButton: ( f id -- ) \ f=true, check; f=false, uncheck ! TB_CHECKBUTTON hwnd Call SendMessage ?win-error ! ;M :M IsButtonChecked: ( id -- f ) \ f=true, checked; f=false, unchecked ! 0 swap TB_ISBUTTONCHECKED hwnd Call SendMessage ! ;M :M PressButton: ( f id -- ) \ f=true, press; f=false, don't press ! TB_PRESSBUTTON hwnd Call SendMessage ?win-error ! ;M :M IsButtonPressed: ( id -- f ) \ f=true, pressed; f=false, not pressed ! 0 swap TB_ISBUTTONPRESSED hwnd Call SendMessage ! ;M :M IndeterminateButton: ( f id -- ) \ f=true, indeterminate; f=false, don't ! TB_INDETERMINATE hwnd Call SendMessage ?win-error ! ;M :M IsButtonIndeterminate: ( id -- f ) \ f=true, indeterminate; f=false, no ! 0 swap TB_ISBUTTONINDETERMINATE hwnd Call SendMessage ! ;M --- 496,561 ---- ;M + :M ValidID: ( id -- f ) \ return true if ButtonID is valid + CommandToIndex: self 0 >= ;M + :M EnableButton: ( f id -- ) \ f=true, enable; f=false, disable ! dup ValidID: self ! if TB_ENABLEBUTTON hwnd Call SendMessage ?win-error ! else 2drop ! then ;M :M IsButtonEnabled: ( id -- f ) \ f=true, enabled; f=false, disabled ! dup ValidID: self ! if 0 swap TB_ISBUTTONENABLED hwnd Call SendMessage ! else drop false ! then ;M :M HideButton: ( f id -- ) \ f=true, hide; f=false, show ! dup ValidID: self ! if TB_HIDEBUTTON hwnd Call SendMessage ?win-error ! else 2drop ! then ;M :M IsButtonHidden: ( id -- f ) \ f=true, hidden; f=false, shown ! dup ValidID: self ! if 0 swap TB_ISBUTTONHIDDEN hwnd Call SendMessage ! else drop false ! then ;M :M CheckButton: ( f id -- ) \ f=true, check; f=false, uncheck ! dup ValidID: self ! if TB_CHECKBUTTON hwnd Call SendMessage ?win-error ! else 2drop ! then ;M :M IsButtonChecked: ( id -- f ) \ f=true, checked; f=false, unchecked ! dup ValidID: self ! if 0 swap TB_ISBUTTONCHECKED hwnd Call SendMessage ! else drop false ! then ;M :M PressButton: ( f id -- ) \ f=true, press; f=false, don't press ! dup ValidID: self ! if TB_PRESSBUTTON hwnd Call SendMessage ?win-error ! else 2drop ! then ;M :M IsButtonPressed: ( id -- f ) \ f=true, pressed; f=false, not pressed ! dup ValidID: self ! if 0 swap TB_ISBUTTONPRESSED hwnd Call SendMessage ! else drop false ! then ;M :M IndeterminateButton: ( f id -- ) \ f=true, indeterminate; f=false, don't ! dup ValidID: self ! if TB_INDETERMINATE hwnd Call SendMessage ?win-error ! else 2drop ! then ;M :M IsButtonIndeterminate: ( id -- f ) \ f=true, indeterminate; f=false, no ! dup ValidID: self ! if 0 swap TB_ISBUTTONINDETERMINATE hwnd Call SendMessage ! else drop false ! then ;M Index: RESOURCES.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/RESOURCES.F,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RESOURCES.F 4 Jun 2005 08:51:20 -0000 1.1 --- RESOURCES.F 10 Jun 2005 16:44:23 -0000 1.2 *************** *** 65,70 **** 3 proc FindResource 2 proc LoadResource ! 1 proc LockResource ! 2 proc SizeofResource 6 proc UpdateResource 2 proc BeginUpdateResource --- 65,70 ---- 3 proc FindResource 2 proc LoadResource ! 1 proc LockResource ! 2 proc SizeofResource 6 proc UpdateResource 2 proc BeginUpdateResource *************** *** 77,80 **** --- 77,81 ---- in-system + internal Create SourceFileName 256 allot *************** *** 203,206 **** --- 204,209 ---- hExe 0= IF SourceFileName SourceFileError abort THEN ; + external + : ListResources ( s" Filename" -- ) SourceFile *************** *** 379,382 **** --- 382,387 ---- then ; + module + \s \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\ Examples \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ *************** *** 445,447 **** s" PictureViewer.exe" ListResources ; ! |