From: Ezra B. <ezr...@us...> - 2010-07-11 02:46:52
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv7322 Modified Files: EdMenu.f EdTabControl.f Log Message: Index: EdTabControl.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdTabControl.f,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** EdTabControl.f 8 Sep 2008 03:02:34 -0000 1.21 --- EdTabControl.f 11 Jul 2010 02:46:44 -0000 1.22 *************** *** 161,164 **** --- 161,168 ---- ;M + :M InsertTab: ( index -- ndx ) + \ *G Inserts a new tab into the tab control. ndx is index of added tab or -1 + tc_item swap TCM_INSERTITEM SendMessage:Self ;M + ;class *************** *** 170,174 **** TabControlEx cTab FileListView cFileList - \ ProjectWindow ProjectWindow ClassBrowserWindow cClassTree ClassBrowserWindow cVocTree --- 174,177 ---- *************** *** 189,196 **** 4dup Move: cVocTree 4dup Move: TheFolderView detached? not ! if Move: FormWindow ! else 4drop then ;M --- 192,200 ---- 4dup Move: cVocTree 4dup Move: TheFolderView + 4dup Move: frmDebugDlg detached? not ! if 4dup Move: FormWindow then + 4drop ;M *************** *** 205,208 **** --- 209,213 ---- SW_HIDE Show: cClassTree SW_HIDE Show: TheFolderView + SW_HIDE Show: frmDebugDlg detached? not if SW_HIDE Show: FormWindow *************** *** 215,218 **** --- 220,224 ---- SW_HIDE Show: cClassTree SW_HIDE Show: TheFolderView + SW_HIDE Show: frmDebugDlg detached? not if SW_HIDE Show: FormWindow *************** *** 225,228 **** --- 231,235 ---- SW_HIDE Show: cClassTree SW_HIDE Show: TheFolderView + SW_HIDE Show: frmDebugDlg detached? not if SW_HIDE Show: FormWindow *************** *** 235,238 **** --- 242,246 ---- SW_HIDE Show: cVocTree SW_HIDE Show: TheFolderView + SW_HIDE Show: frmDebugDlg detached? not if SW_HIDE Show: FormWindow *************** *** 245,248 **** --- 253,257 ---- SW_HIDE Show: ProjectWindow SW_HIDE Show: cVocTree + SW_HIDE Show: frmDebugDlg detached? not if SW_HIDE Show: FormWindow *************** *** 258,261 **** --- 267,283 ---- SW_HIDE Show: cVocTree SW_HIDE Show: TheFolderView + SW_HIDE Show: frmDebugDlg + ; + + : ShowDebugForm ( -- ) + SW_SHOW Show: frmDebugDlg + SW_HIDE Show: cClassTree + SW_HIDE Show: cFileList + SW_HIDE Show: ProjectWindow + SW_HIDE Show: cVocTree + SW_HIDE Show: TheFolderView + detached? not + if SW_HIDE Show: FormWindow + then ; *************** *** 273,282 **** \ Show the control for the currently selected tab. GetSelectedTab: cTab ! case PROJECT_TAB of ShowProject endof ! FILE_TAB of ShowFiles endof ! FOLDER_TAB of ShowFolderView endof ! VOC_TAB of ShowVocs endof ! CLASS_TAB of ShowClasses endof ! FORM_TAB of ShowFormWindow endof endcase ;M --- 295,305 ---- \ Show the control for the currently selected tab. GetSelectedTab: cTab ! case projtab# of ShowProject endof ! filetab# of ShowFiles endof ! dirtab# of ShowFolderView endof ! voctab# of ShowVocs endof ! classtab# of ShowClasses endof ! formtab# of ShowFormWindow endof ! debugtab# of ShowDebugForm endof endcase ;M *************** *** 311,327 **** then then then then ;M :M AddFormTab: ( -- ) detached? not ! if GetTabCount: ctab 6 = ?exitm TCIF_TEXT IsMask: cTab z" Form Designer" IsPszText: cTab ! 6 InsertTab: cTab then ;M :M DeleteFormTab: ( -- ) ! GetTabCount: ctab 6 < ?exitm ! 5 DeleteTab: ctab ;M :M On_Init: ( -- ) self Start: cFileList --- 334,431 ---- then then then then ;M + : HideAllWindows ( -- ) + SW_HIDE Show: cFileList \ show before hide + SW_HIDE Show: ProjectWindow + SW_HIDE Show: cVocTree + SW_HIDE Show: cClassTree + SW_HIDE Show: TheFolderView + SW_HIDE Show: frmDebugDlg + detached? not + if SW_HIDE Show: FormWindow + then ; + + : DeleteAllTabs ( -- ) + DeleteAllTabs: ctab + -1 dup to projtab# + dup to filetab# + dup to dirtab# + dup to classtab# + dup to voctab# + dup to debugtab# + detached? not + if dup to formtab# + then drop + 0 to tabcount ; + :M AddFormTab: ( -- ) detached? not ! if formtab# -1 <> ?exitm TCIF_TEXT IsMask: cTab z" Form Designer" IsPszText: cTab ! tabcount InsertTab: cTab to formtab# then ;M + :M DeleteFormTab: ( -- ) ! formtab# -1 = ?exitm ! formtab# DeleteTab: ctab ! -1 to formtab# ;M + : ShowSelectedTabs { \ ndx -- } + 0 to ndx + show-projtab? + if 1 +to ndx + TCIF_TEXT IsMask: cTab + z" Project" IsPszText: cTab + ndx InsertTab: cTab to projtab# + then + show-filetab? + if 1 +to ndx + TCIF_TEXT IsMask: cTab + z" Files" IsPszText: cTab + ndx InsertTab: cTab to filetab# + then + show-dirtab? + if 1 +to ndx + TCIF_TEXT IsMask: cTab + z" Directory" IsPszText: cTab + ndx InsertTab: cTab to dirtab# + then + show-voctab? + if 1 +to ndx + TCIF_TEXT IsMask: cTab + z" Vocabularies" IsPszText: cTab + ndx InsertTab: cTab to voctab# + then + show-classtab? + if 1 +to ndx + TCIF_TEXT IsMask: cTab + z" Classes" IsPszText: cTab + ndx InsertTab: ctab to classtab# + then + show-debugtab? + if 1 +to ndx + TCIF_TEXT IsMask: cTab + z" Debug" IsPszText: cTab + ndx InsertTab: ctab to debugtab# + then + show-formtab? + if detached? not + if 1 +to ndx + TCIF_TEXT IsMask: cTab + z" Form Designer" IsPszText: cTab + ndx InsertTab: cTab to formtab# + then + then ndx to tabcount \ save total number of tabs added + IDM_SHOWPROJECT_TAB DoCommand ; + + :M Refresh: ( -- ) + HideAllWindows + DeleteAllTabs + ShowSelectedTabs + Resize: self + ;M + :M On_Init: ( -- ) self Start: cFileList *************** *** 330,333 **** --- 434,438 ---- self Start: cClassTree self Start: TheFolderView + self Start: frmDebugDlg detached? not *************** *** 340,368 **** ['] selchange-func IsChangeFunc: cTab ! TCIF_TEXT IsMask: cTab ! z" Project" IsPszText: cTab ! 1 InsertTab: cTab ! ! TCIF_TEXT IsMask: cTab ! z" Files" IsPszText: cTab ! 2 InsertTab: cTab ! ! TCIF_TEXT IsMask: cTab ! z" Directory" IsPszText: cTab ! 3 InsertTab: cTab ! ! TCIF_TEXT IsMask: cTab ! z" Vocabularies" IsPszText: cTab ! 4 InsertTab: cTab ! ! TCIF_TEXT IsMask: cTab ! z" Classes" IsPszText: cTab ! 5 InsertTab: cTab ! ! ! AddFormTab: self ! \ ------------------------------------------------------------------------ ! ! PROJECT_TAB ShowTab: Self SelChange: self \ show the control for the currently selected tab --- 445,449 ---- ['] selchange-func IsChangeFunc: cTab ! Refresh: self SelChange: self \ show the control for the currently selected tab *************** *** 395,398 **** --- 476,480 ---- ;class + TabWindow cTabWindow \s Index: EdMenu.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdMenu.f,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** EdMenu.f 1 Feb 2010 01:42:46 -0000 1.31 --- EdMenu.f 11 Jul 2010 02:46:44 -0000 1.32 *************** *** 134,137 **** --- 134,138 ---- MenuItem "Splitter Window Templates" IDM_FORM_Splitter DoCommand ; MenuItem "Define Menu" IDM_FORM_CreateMenu DoCommand ; + MenuItem "MessageBox Builder" IDM_MSGBOX_BUILDER DoCommand ; 8 RECENTFILES RecentFormFiles count IDM_FORM_(Open) DoCommand ; *************** *** 187,197 **** MenuItem "&Win32Forth" Start-Win32Forth ; MenuSeparator :MenuItem mp_compile "&Compile\tF12" IDM_COMPILE DoCommand ; - :MenuItem mp_compileSel "Compile selected &text" IDM_COMPILE_SELECTION DoCommand ; MenuSeparator MenuItem "BookMarks" IDM_BOOKMARKS DoCommand ; ! MenuSeparator ! :MenuItem mp_setbp "&Set breakpoint...\tCTRL+B" IDM_SET_BREAK_POINT DoCommand ; ! :MenuItem mp_debug "&Debug...\tF11" IDM_DEBUG DoCommand ; POPUP "&Window" --- 188,199 ---- MenuItem "&Win32Forth" Start-Win32Forth ; MenuSeparator + :MenuItem mp_compileLine "Compile current line\tF8" IDM_COMPILE_LINE DoCommand ; + :MenuItem mp_compileSel "Compile selected &text\tF9" IDM_COMPILE_SELECTION DoCommand ; :MenuItem mp_compile "&Compile\tF12" IDM_COMPILE DoCommand ; MenuSeparator MenuItem "BookMarks" IDM_BOOKMARKS DoCommand ; ! \ MenuSeparator ! \ :MenuItem mp_setbp "&Set breakpoint...\tCTRL+B" IDM_SET_BREAK_POINT DoCommand ; ! \ :MenuItem mp_debug "&Debug...\tF11" IDM_DEBUG DoCommand ; POPUP "&Window" *************** *** 269,273 **** dup Enable: me_findnext dup Enable: me_findprev ! dup Enable: me_replace dup Enable: me_date dup Enable: me_date&time --- 271,275 ---- dup Enable: me_findnext dup Enable: me_findprev ! \ dup Enable: me_replace dup Enable: me_date dup Enable: me_date&time *************** *** 309,315 **** \ Win32Forth menu ! dup Enable: mp_setbp ! dup Enable: mp_debug dup Enable: mp_compileSel dup Enable: mf_split_hor --- 311,318 ---- \ Win32Forth menu ! \ dup Enable: mp_setbp ! \ dup Enable: mp_debug dup Enable: mp_compileSel + dup Enable: mp_compileLine dup Enable: mf_split_hor *************** *** 372,375 **** --- 375,381 ---- Enable: mnu_merge ; + : ?EnableDebugWindow ( -- ) + ActiveRemote dup ActiveChild = swap 0<> and + GetHandle: frmDebugDlg Call EnableWindow drop ; : EnableMenuBar ( -- ) \ enable/disable the menu items *************** *** 394,398 **** ?Find: ActiveChild Enable: me_findnext ?Find: ActiveChild Enable: me_findprev ! GetTextLength: ActiveChild Enable: me_replace ?BrowseMode: ActiveChild not Enable: me_date ?BrowseMode: ActiveChild not Enable: me_date&time --- 400,404 ---- ?Find: ActiveChild Enable: me_findnext ?Find: ActiveChild Enable: me_findprev ! \ GetTextLength: ActiveChild Enable: me_replace ?BrowseMode: ActiveChild not Enable: me_date ?BrowseMode: ActiveChild not Enable: me_date&time *************** *** 432,438 **** \ Win32Forth menu ! ActiveRemote ActiveChild = Enable: mp_debug ! ActiveRemote ActiveChild = Enable: mp_setbp ?Selection: ActiveChild Enable: mp_compileSel then --- 438,445 ---- \ Win32Forth menu ! \ ActiveRemote ActiveChild = Enable: mp_debug ! \ ActiveRemote ActiveChild = Enable: mp_setbp ?Selection: ActiveChild Enable: mp_compileSel + GetCurrentLineLength: ActiveChild 2 - 0> Enable: mp_compileLine then |