From: Ezra B. <ezr...@us...> - 2006-06-09 04:31:12
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2891 Modified Files: EdCommand.f EdMenu.f EdTabControl.f Main.f ProjectTree.f Added Files: EdImageWindow.f Log Message: Win32ForthIDE updated to use FreeImageWindow class to view image files in project window. Requires FreeImage.dll EAB Index: EdTabControl.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdTabControl.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EdTabControl.f 8 Jun 2006 17:13:47 -0000 1.5 --- EdTabControl.f 9 Jun 2006 04:31:07 -0000 1.6 *************** *** 322,326 **** :M UpdateFileName: ( addr -- ) \ Update the filename in the file list view. ! cr ." UpdateFileName: " dup h. UpdateFileName: cFileList ;M --- 322,326 ---- :M UpdateFileName: ( addr -- ) \ Update the filename in the file list view. ! \ cr ." UpdateFileName: " dup h. UpdateFileName: cFileList ;M --- NEW FILE: EdImageWindow.f --- \ EdImageWindow.f cr .( Loading Image Viewer...) fload apps\forthform\imagewindow.f create imagefiles \ image files that can be viewed z," *.bmp;*.dib;*.rle;*.jpg;*.jpeg;*.ico;*.pcd;*.psd;*.pcx;*.ppm;*.pgm;" +z," *.pbm;*.png;*.ras;*.tga;*.tif;*.gif" : is-image-file? ( addr cnt -- f ) ".ext-only" dup \ must have an extension if imagefiles zcount 2swap caps-search nip nip else 2drop false then ; :Class ImageViewChild <Super MDIChild :M Start: ( parent -- ) New> FreeImageWindow to ChildWindow self to ChildParent Start: super ;M :M On_Close: ( -- ) On_Close: super self ActiveChild = if 0 to ActiveChild then UpdateStatusBar EnableToolbar ;M :M GetFileName: ( -- addr ) ImageFileName: ChildWindow new$ dup>r place r> ;M :M SetWindowTitle: ( -- ) GetFileName: self count SetText: super ;M :M SetFileName: ( addr len -- ) SetImageFile: ChildWindow SetWindowTitle: self UpdateFileName: super ;M :M ?Modified: ( -- f ) false ;M :M GetFileType: ( -- n ) FT_BINARY ;M :M Update: ( -- ) ;M ;Class : NewImageViewWnd ( -- ) New> ImageViewChild to ActiveChild MDIClientWindow: Frame Start: ActiveChild ; \s Index: EdMenu.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdMenu.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EdMenu.f 8 Jun 2006 17:13:47 -0000 1.4 --- EdMenu.f 9 Jun 2006 04:31:07 -0000 1.5 *************** *** 166,170 **** EndBar ! 6 constant WINDOW-MENU : GetFileType ( -- n ) --- 166,170 ---- EndBar ! 7 constant WINDOW-MENU : GetFileType ( -- n ) Index: ProjectTree.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/ProjectTree.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ProjectTree.f 8 Jun 2006 17:13:47 -0000 1.4 --- ProjectTree.f 9 Jun 2006 04:31:07 -0000 1.5 *************** *** 517,526 **** #items: SelectedItem (.) pad +place pad dup +NULL 1+ - \ ReleaseBuffer: viewerfile FileExt off else GetName: SelectedItem dup zcount 2dup ".ext-only" 2dup lower FileExt place \ set FileExt - \ LoadFile: viewerfile drop GetName: SelectedItem zcount pad place --- 517,524 ---- Index: EdCommand.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdCommand.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EdCommand.f 7 Jun 2006 01:41:26 -0000 1.2 --- EdCommand.f 9 Jun 2006 04:31:07 -0000 1.3 *************** *** 94,98 **** count LoadFile: ViewerFile 0= ?exit GetName: ViewerFile count is-binary-file? ! if (OpenBinaryFile) else 2dup IsHtmlFile? if (OpenHtmlFile) --- 94,101 ---- count LoadFile: ViewerFile 0= ?exit GetName: ViewerFile count is-binary-file? ! if 2dup is-image-file? ! if (OpenImageFile) ! else (OpenBinaryFile) ! then else 2dup IsHtmlFile? if (OpenHtmlFile) Index: Main.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/Main.f,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Main.f 8 Jun 2006 17:13:47 -0000 1.6 --- Main.f 9 Jun 2006 04:31:07 -0000 1.7 *************** *** 611,614 **** --- 611,615 ---- fload ScintillaHyperMDI.f fload EdHexViewer.f + fload EdImageWindow.f \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ Define HTML Child Window class *************** *** 687,693 **** \ used by 'the class and vocabulary browser' and the \ 'Find text in Files' dialog ! ActiveBrowser 0= if NewEditWnd ActiveChild to ActiveBrowser ! then GetHandle: ActiveBrowser Activate: Frame ; is NewBrowseChild : NewRemoteChild ( -- ) \ open a new child window used to open a file --- 688,694 ---- \ used by 'the class and vocabulary browser' and the \ 'Find text in Files' dialog ! ActiveBrowser 0= if NewEditWnd ActiveChild to ActiveBrowser ! then GetHandle: ActiveBrowser Activate: Frame ; is NewBrowseChild : NewRemoteChild ( -- ) \ open a new child window used to open a file *************** *** 725,728 **** --- 726,738 ---- then Update ; + : (OpenImageFile) ( adr len -- ) + { \ temp$ -- } + MAX-PATH 2 + LocalAlloc: temp$ + temp$ place + temp$ FileNotFound: Frame + if NewImageViewWnd + temp$ count SetFileName: ActiveChild + then Update ; + : (OpenRemoteFile) ( adr len -- ) { \ temp$ -- } |