From: Dirk B. <db...@us...> - 2006-06-08 02:49:52
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9164/apps/Win32ForthIDE Modified Files: CommandID.f EdHexViewer.f EdMenu.f EdStatusbar.f Main.f ProjectTree.f Log Message: - Fixed Statusbar display when viewing binary files - "Project" menu added; most (all?) command's still doesn't work Index: EdMenu.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdMenu.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EdMenu.f 7 Jun 2006 10:08:13 -0000 1.2 --- EdMenu.f 7 Jun 2006 15:39:34 -0000 1.3 *************** *** 74,77 **** --- 74,103 ---- :MenuItem me_upper "&Uppercase\tCtrl+Shift+U" IDM_UPPERCASE DoCommand ; + Popup "&Project" + MenuItem "&New... \tCtrl+N" IDM_NEW_PRJ DoCommand ; + MenuItem "&Open... \tCtrl+O" IDM_OPEN_PRJ DoCommand ; + MenuItem "&Save \tCtrl+S" IDM_SAVE_PRJ DoCommand ; + MenuItem "Save &As..." IDM_SAVE_AS_PRJ DoCommand ; + MenuItem "&Rename...\tCtrl+R" IDM_RENAME_PRJ DoCommand ; + MenuSeparator + MenuItem "&Build \tCtrl+B" IDM_BUILD_PRJ DoCommand ; + MenuItem "Set search &path for build..." IDM_SET_BUILD_PATH_PRJ DoCommand ; + MenuSeparator + MenuItem "&Compile \tF12" IDM_COMPILE_PRJ DoCommand ; + MenuItem "&Set Forth Name..." IDM_SET_FORTH_PRJ DoCommand ; + MenuSeparator + MenuItem "&New Module... \tCtrl+M" IDM_NEW_MODULE_PRJ DoCommand ; + MenuSeparator + MenuItem "&Add files to project... \tCtrl+A" IDM_ADD_PRJ DoCommand ; + MenuItem "&Delete from project \tCtrl+D" IDM_DELETE_PRJ DoCommand ; + MenuItem "Add open &forms \tCtrl+F" IDM_ADD_FORMS_PRJ DoCommand ; + \ MenuSeparator + \ SubMenu "Copy/&Zip files" + \ MenuItem "&Zip non-library files..." IDM_ZIP_PRJ DoCommand ; + \ MenuItem "Zip all files..." IDM_ZIP_ALL_PRJ DoCommand ; + \ MenuItem "&Copy non-library files..." IDM_COPY_PRJ DoCommand ; + \ MenuItem "Copy all files..." IDM_COPY_ALL_PRJ DoCommand ; + \ EndSubMenu + Popup "&DexH" :MenuItem me_dexGlossary "&Glossary\tAlt+G" IDM_DEX_GLOSSARY DoCommand ; *************** *** 152,155 **** --- 178,184 ---- GetFileType FT_HTML = ; + : IsBinaryWnd? ( -- f ) + GetFileType FT_BINARY = ; + : NoTextToPad ( -- addr len ) \ copy empty string to PAD 0 pad ! pad count ; Index: ProjectTree.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/ProjectTree.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProjectTree.f 7 Jun 2006 01:41:26 -0000 1.2 --- ProjectTree.f 7 Jun 2006 15:39:34 -0000 1.3 *************** *** 18,22 **** 0 value ThisList \ temp pointer to list being used 0 value ThisItem \ temp pointer to new item - 0 value TheProjectWindow 0 value TheProject 0 value TheStatusBar --- 18,21 ---- *************** *** 28,43 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! [undefined] SaveFileDialog [if] ! FileSaveDialog SaveFileDialog "Save Project File" "Project Files|*.fpj|" : SaveProjectFile ( -- addr ) s" Project Files|*.fpj|" SetFilter: SaveFileDialog s" Save Project File" SetTitle: SaveFileDialog ! GetHandle: TheProjectWindow Start: SaveFileDialog ; ! [then] \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --- 27,64 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + \ \\\\\ Dialogs \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! MultiFileOpenDialog GetFilesDialog "Select File" "All Files|*.*|Forth Files|*.f|" ! FileOpenDialog OpenProjectDialog "Open Project File" "Project Files|*.fpj|" FileSaveDialog SaveFileDialog "Save Project File" "Project Files|*.fpj|" + NewEditDialog GetProjectNameDlg "New Project Name" "Project Name:" "Create" "Cancel" "" + NewEditDialog GetPathDialog "Set Build Search Path" "Search Path:" "&Apply" "Cancel" "Save to Disk" + NewEditDialog SetForthName "Win32Forth Name" "Win32For.exe:" "&Apply" "Cancel" + + : OpenProjectFile ( -- addr ) + s" Project Files|*.fpj|" SetFilter: OpenProjectDialog + s" Open Project File" SetTitle: OpenProjectDialog + Gethandle: MainWindow Start: OpenProjectDialog ; + + : SelectAFile ( -- addr ) + s" All Files|*.*|Forth Files|*.f|" SetFilter: GetFilesDialog + s" Select File" SetTitle: GetFilesDialog + GetHandle: MainWindow Start: GetFilesDialog ; : SaveProjectFile ( -- addr ) s" Project Files|*.fpj|" SetFilter: SaveFileDialog s" Save Project File" SetTitle: SaveFileDialog ! GetHandle: MainWindow Start: SaveFileDialog ; ! : SaveZipFile ( -- addr ) ! s" Zip files|*.zip|All Files|*.*|" SetFilter: SaveFileDialog ! s" Select archive file" SetTitle: SaveFileDialog ! Gethandle: MainWindow Start: SaveFileDialog ; ! ! : SaveModuleFile ( -- addr ) ! s" Forth Files|*.f|All Files|*.*" SetFilter: SaveFileDialog ! s" New Module File" SetTitle: SaveFileDialog ! GetHandle: MainWindow Start: SaveFileDialog ; \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ *************** *** 630,636 **** THEN THEN ! hwndmain TVE_EXPAND Expand: self ! hwndmain GetChild: self SelectItem: self ! ;M ;class --- 651,666 ---- THEN THEN ! hwndmain TVE_EXPAND Expand: self ! hwndmain GetChild: self SelectItem: self ! ;M ! ! :M Clear: ( -- ) ! TVI_ROOT DeleteItem: self ! ! DisposeLists ! RegisterList ! CreateTree ! AddParentLists ! ;M ;class *************** *** 639,642 **** --- 669,673 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + (( : Expand/Collapse ( a f -- ) swap to ThisList Handle: ThisList swap Expand: TheProject ; : Expand ( a -- ) TVE_EXPAND Expand/Collapse ; *************** *** 665,666 **** --- 696,726 ---- MainList: TheProject to ThisList Handle: ThisList SelectItem: TheProject ; \ IDM_COLLAPSE_ALL SetCommand + )) + + : (open-project) ( a1 n1 -- ) + \ clear-status-bar + \ GetProjectFileName: TheProject ?dup + \ IF pad place pad Insert: RecentFiles ELSE drop THEN + 2dup SetProjectFileName: TheProject + "path-only" 2dup SetDir: OpenProjectDialog + 2dup SetDir: SaveFileDialog SetDir: GetFilesDialog + \ Close: TheProject Leftpane Start: TheProject + \ ResetProject \ Reset the project window (close the current project; and open a new empty one) + + Clear: TheProject + OpenProject: TheProject + Rename: TheProject + SetFocus: TheProject + \ SetProjectTitle + \ reset-results + ReleaseBuffer: viewerfile + + \ IDM_SHOW_FILE_PRJ DoCommand + ; + + : new-project ( -- ) + \ SaveIfModified 0= ?exit + s" Project" SetProjectName: TheProject + pad 0 SetBuildFile: TheProject + pad 0 (open-project) + ; IDM_NEW_PRJ SetCommand Index: EdStatusbar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdStatusbar.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EdStatusbar.f 5 Jun 2006 09:19:00 -0000 1.1 --- EdStatusbar.f 7 Jun 2006 15:39:34 -0000 1.2 *************** *** 63,66 **** --- 63,70 ---- then pad +null pad 1+ LinePart SetText: self ; + : SetBinaryView ( -- ) + Clear: self + z" BIN view" EdPart SetText: self ; + :M Update: ( -- ) base @ >r decimal *************** *** 68,75 **** ActiveChild 0= if Clear: self ! else GetFileType: ActiveChild FT_SOURCE = ! if SetEditView ! else SetHtmlView ! then then --- 72,81 ---- ActiveChild 0= if Clear: self ! else GetFileType: ActiveChild ! case ! FT_SOURCE of SetEditView endof ! FT_HTML of SetHtmlView endof ! FT_BINARY of SetBinaryView endof ! endcase then Index: EdHexViewer.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdHexViewer.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EdHexViewer.f 7 Jun 2006 01:41:26 -0000 1.1 --- EdHexViewer.f 7 Jun 2006 15:39:34 -0000 1.2 *************** *** 50,54 **** :M GetFileType: ( -- n ) ! FT_HTML ;M :M Update: ( -- ) --- 50,54 ---- :M GetFileType: ( -- n ) ! FT_BINARY ;M :M Update: ( -- ) *************** *** 58,62 **** Dump: ChildWindow SetWindowTitle: self ;M ! ;Class --- 58,62 ---- Dump: ChildWindow SetWindowTitle: self ;M ! ;Class Index: Main.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/Main.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Main.f 7 Jun 2006 10:08:13 -0000 1.3 --- Main.f 7 Jun 2006 15:39:34 -0000 1.4 *************** *** 18,22 **** only forth also editor definitions \ put all words into the EDITOR vocabulary ! true value sysgen s" apps\Win32ForthIDE" "fpath+ --- 18,22 ---- only forth also editor definitions \ put all words into the EDITOR vocabulary ! \ true value sysgen s" apps\Win32ForthIDE" "fpath+ *************** *** 40,43 **** --- 40,45 ---- 0 value ActiveRemote \ the MDI child window used for remote opening a file from the console 0 value ACCEL-HNDL \ handle of the AcceleratorKeyTable + 0 value MainWindow \ the address of the main window object + ReadFile ViewerFile *************** *** 59,62 **** --- 61,65 ---- 0 constant FT_SOURCE 1 constant FT_HTML + 2 constant FT_BINARY needs EdToolbar.f *************** *** 69,72 **** --- 72,76 ---- defer Update ' noop is Update defer OnSelect ' drop is OnSelect \ called when item is selected in the file listview + defer ResetProject ' noop is ResetProject AcceleratorTable AccelTable \ create the Accelerator-Key-Table *************** *** 110,113 **** --- 114,121 ---- ;Object + :noname ( -- ) + \ Reset the project window (close the current project; and open a new empty one) + ResetProject cTabWindow ; is ResetProject + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\ Splitter window \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ *************** *** 408,411 **** --- 416,420 ---- :M On_Init: ( -- ) + self to MainWindow InitScintillaControl \ Dienstag, August 03 2004 dbu AccelTable EnableAccelerators \ init the accelerator table *************** *** 474,478 **** WM_USER 0x0202 + constant WM_UPDATE ! 0 value LastActiveChild :Class MDIChild <Super MDIChildWindow --- 483,487 ---- WM_USER 0x0202 + constant WM_UPDATE ! 0 value LastActiveChild \ the object address of the child window that was activated at last :Class MDIChild <Super MDIChildWindow *************** *** 493,497 **** :M UpdateFileName: ( -- ) ! self AddFile: cTabWindow ;M \ add the file to the file list :M Start: ( parent -- ) --- 502,507 ---- :M UpdateFileName: ( -- ) ! self UpdateFileName: cTabWindow \ update the File in the file list ! ;M :M Start: ( parent -- ) *************** *** 499,502 **** --- 509,513 ---- self start: ChildWindow 0 0 Width Height Move: ChildWindow + self AddFile: cTabWindow \ add the file to the file list SetFocus: ChildWindow ;M *************** *** 527,533 **** \ :M On_ChildActivate: ( -- ) ! \ LastActiveChild 0<> ! \ if LastActiveChild DeSelectFile: cTabWindow then \ deselect the file to the file list ! \ self dup to LastActiveChild SelectFile: cTabWindow \ select the file to the file list \ ;M --- 538,548 ---- \ :M On_ChildActivate: ( -- ) ! \ cr ." On_ChildActivate: entry" self h. ! \ self LastActiveChild <> ! \ if LastActiveChild 0<> ! \ if LastActiveChild DeSelectFile: cTabWindow then \ deselect the in the file list ! \ self dup to LastActiveChild SelectFile: cTabWindow \ select the in the file list ! \ then ! \ cr ." On_ChildActivate: exit" self h. \ ;M *************** *** 663,667 **** UpdateStatusBar EnableToolbar ! 0 0 WM_UPDATE SendMessageToAllChildren: Frame ; is Update : NewEditWnd ( -- ) \ open a new child window for editing --- 678,683 ---- UpdateStatusBar EnableToolbar ! 0 0 WM_UPDATE SendMessageToAllChildren: Frame ! ; is Update : NewEditWnd ( -- ) \ open a new child window for editing *************** *** 674,679 **** :noname ( -- ) \ open a new child window for browsing the source files ! \ used by 'the class and vocabulary browser' and the ! \ 'Find text in Files' dialog ActiveBrowser 0= if NewEditWnd ActiveChild to ActiveBrowser --- 690,695 ---- :noname ( -- ) \ open a new child window for browsing the source files ! \ used by 'the class and vocabulary browser' and the ! \ 'Find text in Files' dialog ActiveBrowser 0= if NewEditWnd ActiveChild to ActiveBrowser *************** *** 727,731 **** \ This is called from the File listview when a file is selected. \ addr is the object address of the mdi child window ! GetHandle: [ ] Activate: Frame Update ; is OnSelect \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --- 743,749 ---- \ This is called from the File listview when a file is selected. \ addr is the object address of the mdi child window ! GetHandle: [ ] Activate: Frame Update ! \ SetFocus: Frame ! ; is OnSelect \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Index: CommandID.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/CommandID.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CommandID.f 5 Jun 2006 09:19:00 -0000 1.1 --- CommandID.f 7 Jun 2006 15:39:34 -0000 1.2 *************** *** 112,118 **** NewID IDM_FORWARD ! \ for the ProjectTree ! NewID IDM_SHOW_FILE ! NewID IDM_EXECUTEFILE IdCounter constant IDM_LAST --- 112,131 ---- NewID IDM_FORWARD ! \ Project Manager ! \ NewID IDM_SHOW_FILE ! NewID IDM_EXECUTEFILE_PRJ ! NewID IDM_NEW_PRJ ! NewID IDM_OPEN_PRJ ! NewID IDM_SAVE_PRJ ! NewID IDM_SAVE_AS_PRJ ! NewID IDM_RENAME_PRJ ! NewID IDM_BUILD_PRJ ! NewID IDM_SET_BUILD_PATH_PRJ ! NewID IDM_COMPILE_PRJ ! NewID IDM_SET_FORTH_PRJ ! NewID IDM_NEW_MODULE_PRJ ! NewID IDM_ADD_PRJ ! NewID IDM_DELETE_PRJ ! NewID IDM_ADD_FORMS_PRJ IdCounter constant IDM_LAST |