From: Dirk B. <db...@us...> - 2006-06-11 18:04:17
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31890/apps/Win32ForthIDE Modified Files: CommandID.f EdCommand.f EdMenu.f EdTabControl.f Main.f ProjectTree.f Log Message: Some more work on the IDE. Index: EdTabControl.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdTabControl.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EdTabControl.f 11 Jun 2006 09:03:45 -0000 1.8 --- EdTabControl.f 11 Jun 2006 18:04:10 -0000 1.9 *************** *** 61,67 **** --- 61,69 ---- \ Find a file in the list view. \ addr is the object address of the mdi child window + cr ." FindFile: " dup h. LVFI_PARAM SetFlags: LvFindInfo SetlParam: LvFindInfo Addr: LvFindInfo -1 FindItem: self + ." returns " dup . ;M *************** *** 88,92 **** \ addr is the object address of the mdi child window addr FindFile: self -1 = ! if LVIF_TEXT LVIF_PARAM or SetMask: LvItem addr SetlParam: LvItem addr FileNameToBuffer SetpszText: LvItem --- 90,96 ---- \ addr is the object address of the mdi child window addr FindFile: self -1 = ! if LVIF_TEXT LVIF_PARAM or ! LVIF_STATE or SetMask: LvItem ! LVIS_SELECTED Setstate: LvItem addr SetlParam: LvItem addr FileNameToBuffer SetpszText: LvItem *************** *** 102,105 **** --- 106,110 ---- Setstate: LvItem -1 SetstateMask: LvItem + false to Enable_Notify? Addr: LvItem swap SetItemState: self drop *************** *** 127,133 **** Enable_Notify? if dup GetNotifyCode LVN_ITEMCHANGED = ! \ if dup GetNotifyCode LVN_ITEMACTIVATE = ! \ if dup GetNotifyCode NM_CLICK = ! if LVN_GetNotifyParam OnSelect else drop then --- 132,141 ---- Enable_Notify? if dup GetNotifyCode LVN_ITEMCHANGED = ! if ! cr ." Handle_Notify: enter" ! false to Enable_Notify? ! LVN_GetNotifyParam OnSelect ! true to Enable_Notify? ! cr ." Handle_Notify: exit" else drop then *************** *** 149,156 **** :M Handle_Notify: ( h m w l -- f ) \ Handle the notification messages of the treeview control. ! dup GetNotifyCode NM_DBLCLK = ! if IDM_EXECUTEFILE_PRJ DoCommand false ! else Handle_Notify: super ! then ;M ;class --- 157,166 ---- :M Handle_Notify: ( h m w l -- f ) \ Handle the notification messages of the treeview control. ! \ dup GetNotifyCode NM_DBLCLK = ! \ if IDM_EXECUTEFILE_PRJ DoCommand false ! \ else Handle_Notify: super ! \ then ;M ! Handle_Notify: super ! ;M ;class *************** *** 321,326 **** UpdateFileName: cFileList ;M - :M ResetProject: ( -- ) - Close: cProjectTree self Start: cProjectTree ;M - ;class --- 331,333 ---- Index: EdMenu.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdMenu.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EdMenu.f 11 Jun 2006 09:03:45 -0000 1.8 --- EdMenu.f 11 Jun 2006 18:04:10 -0000 1.9 *************** *** 104,107 **** --- 104,109 ---- \ MenuItem "Copy all files..." IDM_COPY_ALL_PRJ DoCommand ; \ EndSubMenu + \ MenuSeparator + 8 RECENTFILES RecentProjectFiles IDM_OPEN_RECENT_FILE_PRJ DoCommand ; Popup "&DexH" Index: ProjectTree.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/ProjectTree.f,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ProjectTree.f 11 Jun 2006 09:03:45 -0000 1.7 --- ProjectTree.f 11 Jun 2006 18:04:10 -0000 1.8 *************** *** 454,458 **** then ; ! : RegisterList ( -- ) \ register list with this treeview control hwndimage ?dup 0= ?exit TVSIL_NORMAL SetImageList: self ; --- 454,458 ---- then ; ! : RegisterList ( -- ) \ register imagelist with this treeview control hwndimage ?dup 0= ?exit TVSIL_NORMAL SetImageList: self ; *************** *** 481,502 **** :M On_SelChanged: ( -- f ) lparamNew to SelectedItem - itemid: SelectedItem - if - s" Number of files = " pad place - #items: SelectedItem (.) pad +place - pad dup +NULL 1+ - FileExt off - else - GetName: SelectedItem dup zcount - 2dup ".ext-only" 2dup lower FileExt place \ set FileExt ! GetName: SelectedItem zcount pad place ! pad dup IDM_OPEN_RECENT_FILE DoCommand ! ! then ! drop ( for now ) \ 0 Settext: TheStatusBar .buildfile ! SetFocus: self \ ProjectManager.htm item lost focus before ! false ! ;M :M Delete: ( -- ) --- 481,491 ---- :M On_SelChanged: ( -- f ) lparamNew to SelectedItem ! itemid: SelectedItem ! if ReleaseBuffer: viewerfile ! FileExt off ! else GetName: SelectedItem zcount pad place ! pad IDM_OPEN_RECENT_FILE DoCommand ! then false ;M :M Delete: ( -- ) *************** *** 531,535 **** :M SetProjectFileName: ( addr cnt -- ) ! SetName: ProjectFile ;M :M GetProjectFileName: ( -- addr cnt ) --- 520,526 ---- :M SetProjectFileName: ( addr cnt -- ) ! 2dup SetName: ProjectFile ! pad place pad Insert: RecentProjectFiles ! ;M :M GetProjectFileName: ( -- addr cnt ) *************** *** 601,605 **** else true abort" Build file name not found!" then bl get-word s" SearchPath=" caps-compare 0= ! if bl word count path-ptr place else true abort" Search path not found!" then \ now we read in files --- 592,596 ---- else true abort" Build file name not found!" then bl get-word s" SearchPath=" caps-compare 0= ! if bl word drop \ count path-ptr place TODO TODO TODO else true abort" Search path not found!" then \ now we read in files *************** *** 684,689 **** : (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 --- 675,679 ---- : (open-project) ( a1 n1 -- ) \ clear-status-bar ! wait-cursor 2dup SetProjectFileName: TheProject "path-only" 2dup SetDir: OpenProjectDialog *************** *** 698,701 **** --- 688,692 ---- reset-results ReleaseBuffer: viewerfile + arrow-cursor \ IDM_SHOW_FILE_PRJ DoCommand ; *************** *** 748,755 **** SaveIfModified 0= ?exit OpenProjectFile count ?dup ! if (open-project) else drop then ; IDM_OPEN_PRJ SetCommand : save-project ( -- ) \ Save the project --- 739,752 ---- SaveIfModified 0= ?exit OpenProjectFile count ?dup ! if WINPAUSE (open-project) else drop then ; IDM_OPEN_PRJ SetCommand + : OpenRecentProjectFile ( File$ -- ) + SaveIfModified + IF count (open-project) + ELSE drop + THEN ; IDM_OPEN_RECENT_FILE_PRJ SetCommand + : save-project ( -- ) \ Save the project Index: EdCommand.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdCommand.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EdCommand.f 11 Jun 2006 09:03:45 -0000 1.4 --- EdCommand.f 11 Jun 2006 18:04:10 -0000 1.5 *************** *** 98,106 **** else (OpenBinaryFile) then ! else 2dup IsHtmlFile? ! if (OpenHtmlFile) ! else (OpenSourceFile) ! then ! then ; IDM_OPEN_RECENT_FILE SetCommand : OpenHighlightedFile ( -- ) --- 98,108 ---- else (OpenBinaryFile) then ! else 2dup IsHtmlFile? ! if (OpenHtmlFile) ! else (OpenSourceFile) ! then ! then ! ActiveChild if SetFocus: ActiveChild then ! ; IDM_OPEN_RECENT_FILE SetCommand : OpenHighlightedFile ( -- ) Index: Main.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/Main.f,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Main.f 11 Jun 2006 09:03:45 -0000 1.10 --- Main.f 11 Jun 2006 18:04:10 -0000 1.11 *************** *** 304,325 **** then ; ! : SaveRecentFiles ( -- ) ! s" Recent Files" s" File1" 9 1 DO 2dup + 1- i 48 + swap c! ! 4dup i GetRecentFile: RecentFiles count 2rot 2rot 2swap RegSetString LOOP 4drop ; ! : RestoreRecentFiles ( -- ) ! 8 SetNumber: RecentFiles ! s" Recent Files" s" File1" 9 1 DO 2dup + 1- 57 i - swap c! 4dup 2swap RegGetString 2dup FILE-STATUS nip 0= \ we only add the file's witch still exist ! IF pad place pad Insert: RecentFiles ELSE 2drop THEN LOOP 4drop ; : save-defaults ( -- ) base @ >r decimal \ MUST be in decimal when saving defaults --- 304,337 ---- then ; ! : (SaveRecentFiles) { addr len menu -- } ! addr len s" File1" 9 1 DO 2dup + 1- i 48 + swap c! ! 4dup i GetRecentFile: menu count 2rot 2rot 2swap RegSetString LOOP 4drop ; ! : (RestoreRecentFiles) { addr len menu -- } ! 8 SetNumber: menu ! addr len s" File1" 9 1 DO 2dup + 1- 57 i - swap c! 4dup 2swap RegGetString 2dup FILE-STATUS nip 0= \ we only add the file's witch still exist ! IF pad place pad Insert: menu ELSE 2drop THEN LOOP 4drop ; + : SaveRecentFiles ( -- ) + s" Recent Files" RecentFiles (SaveRecentFiles) ; + + : RestoreRecentFiles ( -- ) + s" Recent Files" RecentFiles (RestoreRecentFiles) ; + + : SaveRecentProjectFiles ( -- ) + s" Recent Project Files" RecentProjectFiles (SaveRecentFiles) ; + + : RestoreRecentProjectFiles ( -- ) + s" Recent Project Files" RecentProjectFiles (RestoreRecentFiles) ; + : save-defaults ( -- ) base @ >r decimal \ MUST be in decimal when saving defaults *************** *** 358,361 **** --- 370,374 ---- SaveRecentFiles + SaveRecentProjectFiles SetRegistryKey: ControlToolBar *************** *** 396,399 **** --- 409,413 ---- RestoreRecentFiles + RestoreRecentProjectFiles SetRegistryKey: ControlToolBar *************** *** 512,521 **** ;M :M Start: ( parent -- ) Start: super self start: ChildWindow 0 0 Width Height Move: ChildWindow self AddFile: cTabWindow \ add the file to the file list ! SetFocus: ChildWindow ;M --- 526,539 ---- ;M + 0 value Starting? :M Start: ( parent -- ) + true to Starting? Start: super self start: ChildWindow 0 0 Width Height Move: ChildWindow self AddFile: cTabWindow \ add the file to the file list ! \ SetFocus: ChildWindow ! SetFocus: self ! false to Starting? ;M *************** *** 539,542 **** --- 557,561 ---- UpdateStatusBar: self EnableToolbar + \ self SelectFile: cTabWindow \ select the in the file list ;M *************** *** 554,557 **** --- 573,585 ---- \ ;M + \ :M On_ChildActivate: ( -- ) + \ cr ." On_ChildActivate: entry " self h. + \ Starting? 0= + \ if + \ self SelectFile: cTabWindow \ select the in the file list + \ then + \ cr ." On_ChildActivate: exit " self h. + \ ;M + : ?SaveMessage ( -- n ) \ IDYES, IDNO or IDCANCEL s" Do you want to save " pad place *************** *** 617,621 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Define EDITOR Child Window class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --- 645,649 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Define Editor, HexDump and ImageDisplay Child Window classes \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ *************** *** 624,627 **** --- 652,656 ---- fload EdHexViewer.f fload EdImageWindow.f + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ Define HTML Child Window class *************** *** 700,704 **** \ 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 --- 729,733 ---- \ 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 Index: CommandID.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/CommandID.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CommandID.f 11 Jun 2006 09:03:45 -0000 1.3 --- CommandID.f 11 Jun 2006 18:04:10 -0000 1.4 *************** *** 130,133 **** --- 130,134 ---- NewID IDM_DELETE_PRJ NewID IDM_ADD_FORMS_PRJ + NewID IDM_OPEN_RECENT_FILE_PRJ IdCounter constant IDM_LAST |