From: Ezra B. <ezr...@us...> - 2008-09-08 03:05:13
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32741/apps/Win32ForthIDE Modified Files: EDSplitterWindow.f Log Message: IDE updates. EAB Index: EDSplitterWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EDSplitterWindow.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EDSplitterWindow.f 2 Sep 2008 03:15:10 -0000 1.1 --- EDSplitterWindow.f 8 Sep 2008 03:05:10 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- int TheEditor + int myparent :M ExWindowStyle: ( -- style ) *************** *** 13,21 **** ClassInit: super \ init super class 0 to TheEditor ;M :M On_Init: ( -- ) CS_DBLCLKS GCL_STYLE hWnd Call SetClassLong drop ! hwnd GetHandle: TheEditor Call SetParent drop ;M --- 14,23 ---- ClassInit: super \ init super class 0 to TheEditor + 0 to myparent ;M :M On_Init: ( -- ) CS_DBLCLKS GCL_STYLE hWnd Call SetClassLong drop ! hwnd GetHandle: TheEditor Call SetParent drop ;M *************** *** 35,40 **** l w WM_NOTIFY GetHandle: GrandParent Call SendMessage drop ;M ! ;Class :Class VertSplitterWindow <Super Child-Window --- 37,49 ---- l w WM_NOTIFY GetHandle: GrandParent Call SendMessage drop ;M ! :M WM_COMMAND ( h m w l -- res ) ! GetHandle: TheEditor = ! if HIWORD SCEN_SETFOCUS = ! if GetParent: Self to myparent ! TheEditor GetParent: myparent SetPrimaryEditor: [ ] ! then ! then 0 ;M + ;Class :Class VertSplitterWindow <Super Child-Window *************** *** 42,48 **** int dragging int mousedown ! 0 value ToolBarHeight \ set to height of toolbar if any ! 0 value StatusBarHeight \ set to height of status bar if any ! 250 value LeftWidth 5 value ThicknessV --- 51,55 ---- int dragging int mousedown ! int LeftWidth 5 value ThicknessV *************** *** 54,69 **** : RightWidth ( -- n ) Width RightXpos - ; : LeftWidthMin ( -- n ) LeftWidth width min ; ! : StatusBarYpos ( -- n ) height StatusbarHeight - ; ! : TotalHeight ( -- n ) Height ToolBarHeight - StatusBarHeight - ; : position-windows ( -- ) ! 0 ToolBarHeight LeftWidthMin TotalHeight Move: PrimaryPane ! RightXpos ToolBarHeight RightWidth TotalHeight Move: SecondaryPane ! LeftWidth ToolBarHeight ThicknessV TotalHeight Move: SplitV ; : Splitter ( -- n ) \ the splitter window the cursor is on hWnd get-mouse-xy ! ToolBarHeight StatusBarYpos within swap LeftWidth RightXpos within and IF 1 ELSE 0 THEN ; --- 61,76 ---- : RightWidth ( -- n ) Width RightXpos - ; : LeftWidthMin ( -- n ) LeftWidth width min ; ! : StatusBarYpos ( -- n ) height ; ! : TotalHeight ( -- n ) Height ; : position-windows ( -- ) ! 0 0 LeftWidthMin TotalHeight Move: PrimaryPane ! RightXpos 0 RightWidth TotalHeight Move: SecondaryPane ! LeftWidth 0 ThicknessV TotalHeight Move: SplitV ; : Splitter ( -- n ) \ the splitter window the cursor is on hWnd get-mouse-xy ! 0 StatusBarYpos within swap LeftWidth RightXpos within and IF 1 ELSE 0 THEN ; *************** *** 112,115 **** --- 119,123 ---- ['] On_DblClick SetDblClickFunc: self false to mousedown + 250 to LeftWidth ;M *************** *** 140,147 **** --- 148,157 ---- VertSplitterWindow SplitW ScintillaControl MirrorEditor + int TheChild :M Start: ( parent -- ) Start: super self Start: MirrorEditor + ChildWindow to TheChild \ save original ChildWindow MirrorEditor SetEditors: SplitW self Start: Splitw *************** *** 161,171 **** :M WM_UPDATE ( -- ) \ save the current child from global variables ! Update: self ! RefreshColors \ main window ! ChildWindow >r \ save on stack ! MirrorEditor to ChildWindow ! RefreshColors \ clone window ! Update: self ! r> to ChildWindow \ restore ;M --- 171,183 ---- :M WM_UPDATE ( -- ) \ save the current child from global variables ! ChildWindow >r ! TheChild ?dup ! if to ChildWindow ! Update: self ! RefreshColors \ main window ! MirrorEditor to ChildWindow ! RefreshColors \ clone window ! Update: self ! then r> to ChildWindow \ restore ;M *************** *** 175,188 **** :M WM_NOTIFY ( h m w l -- res ) dup 2 cells + @ SCN_UPDATEUI = ! if UpdateStatusBar: self ! EnableToolbar ! else 4 cells+ @ dup ?indent ! ChildWindow >r ! MirrorEditor to ChildWindow ! ?indent ! r> to ChildWindow then false ;M ;Class --- 187,216 ---- :M WM_NOTIFY ( h m w l -- res ) dup 2 cells + @ SCN_UPDATEUI = ! if UpdateStatusBar: self ! EnableToolbar ! else ChildWindow >r ! TheChild ?dup ! if to ChildWindow ! 4 cells+ @ dup ?indent ! MirrorEditor to ChildWindow ! ?indent ! then r> to ChildWindow then false ;M + :M SetPrimaryEditor: ( editor -- ) + to ChildWindow + ChildWindow to CurrentWindow ;M + + :M On_Close: ( -- ) + TheChild to ChildWindow \ restore original for disposing + On_Close: Super + ;M + + :M ClassInit: ( -- ) + ClassInit: Super + 0 to TheChild + ;M + ;Class *************** *** 197,203 **** WindowPane SecondaryPane \ clone editor window ! 0 value ToolBarHeight \ set to height of toolbar if any ! 0 value StatusBarHeight \ set to height of status bar if any ! 200 value TopHeight 5 value ThicknessH --- 225,231 ---- WindowPane SecondaryPane \ clone editor window ! \ 0 value ToolBarHeight \ set to height of toolbar if any ! \ 0 value StatusBarHeight \ set to height of status bar if any ! int TopHeight 5 value ThicknessH *************** *** 205,217 **** int mousedown ! : SplitterYpos ( -- n ) ToolBarHeight TopHeight + ; : BottomYpos ( -- n ) SplitterYpos ThicknessH + ; ! : StatusBarYpos ( -- n ) height StatusbarHeight - ; : BottomHeight ( -- n ) StatusBarYpos BottomYpos - ; ! : TotalHeight ( -- n ) StatusBarYpos ToolBarHeight - ; : TopHeightMin ( -- n ) TopHeight TotalHeight min ; : position-windows ( -- ) ! 0 ToolBarHeight Width TopHeightMin Move: PrimaryPane 0 BottomYpos Width BottomHeight Move: SecondaryPane 0 SplitterYpos Width ThicknessH Move: SplitterH --- 233,245 ---- int mousedown ! : SplitterYpos ( -- n ) TopHeight ; : BottomYpos ( -- n ) SplitterYpos ThicknessH + ; ! : StatusBarYpos ( -- n ) height ; : BottomHeight ( -- n ) StatusBarYpos BottomYpos - ; ! : TotalHeight ( -- n ) StatusBarYpos ; : TopHeightMin ( -- n ) TopHeight TotalHeight min ; : position-windows ( -- ) ! 0 0 Width TopHeightMin Move: PrimaryPane 0 BottomYpos Width BottomHeight Move: SecondaryPane 0 SplitterYpos Width ThicknessH Move: SplitterH *************** *** 220,224 **** : Splitter ( -- n ) \ the splitter window the cursor is on hWnd get-mouse-xy ! dup ToolBarHeight StatusBarYpos within IF SplitterYpos BottomYpos within swap 0 width within and IF 1 ELSE 0 THEN ELSE 2drop 0 THEN ; --- 248,252 ---- : Splitter ( -- n ) \ the splitter window the cursor is on hWnd get-mouse-xy ! dup 0 StatusBarYpos within IF SplitterYpos BottomYpos within swap 0 width within and IF 1 ELSE 0 THEN ELSE 2drop 0 THEN ; *************** *** 227,231 **** mousedown dragging or 0= ?EXIT dragging ! IF mousey ToolBarHeight - 0max TotalHeight min thicknessH 2/ - to TopHeight THEN position-windows WINPAUSE ; --- 255,259 ---- mousedown dragging or 0= ?EXIT dragging ! IF mousey TotalHeight min thicknessH 2/ - to TopHeight THEN position-windows WINPAUSE ; *************** *** 268,271 **** --- 296,300 ---- ['] On_DblClick SetDblClickFunc: self false to mousedown + 200 to TopHeight ;M *************** *** 297,304 **** --- 326,335 ---- HorizSplitterWindow SplitW ScintillaControl MirrorEditor + int TheChild :M Start: ( parent -- ) Start: super self Start: MirrorEditor + ChildWindow to TheChild \ save original ChildWindow MirrorEditor SetEditors: SplitW self Start: Splitw *************** *** 313,327 **** ;M :M On_Size: ( h m w l -- h m w l ) 0 0 Width Height Move: SplitW ;M :M WM_UPDATE ( -- ) \ save the current child from global variables ! Update: self ! RefreshColors \ main window ! ChildWindow >r \ save on stack ! MirrorEditor to ChildWindow ! RefreshColors \ clone window ! Update: self ! r> to ChildWindow \ restore ;M --- 344,361 ---- ;M + :M On_Size: ( h m w l -- h m w l ) 0 0 Width Height Move: SplitW ;M :M WM_UPDATE ( -- ) \ save the current child from global variables ! ChildWindow >r ! TheChild ?dup ! if to ChildWindow ! Update: self ! RefreshColors \ main window ! MirrorEditor to ChildWindow ! RefreshColors \ clone window ! Update: self ! then r> to ChildWindow \ restore ;M *************** *** 331,344 **** :M WM_NOTIFY ( h m w l -- res ) dup 2 cells + @ SCN_UPDATEUI = ! if UpdateStatusBar: self ! EnableToolbar ! else 4 cells+ @ dup ?indent ! ChildWindow >r ! MirrorEditor to ChildWindow ! ?indent ! r> to ChildWindow then false ;M ;Class --- 365,394 ---- :M WM_NOTIFY ( h m w l -- res ) dup 2 cells + @ SCN_UPDATEUI = ! if UpdateStatusBar: self ! EnableToolbar ! else ChildWindow >r ! TheChild ?dup ! if to ChildWindow ! 4 cells+ @ dup ?indent ! MirrorEditor to ChildWindow ! ?indent ! then r> to ChildWindow then false ;M + :M SetPrimaryEditor: ( editor -- ) + to ChildWindow + ChildWindow to CurrentWindow ;M + + :M On_Close: ( -- ) + TheChild to ChildWindow \ restore original for disposing + On_Close: Super + ;M + + :M ClassInit: ( -- ) + ClassInit: Super + 0 to TheChild + ;M + ;Class *************** *** 365,372 **** --- 415,425 ---- child1 GetTabInfo: OpenFilesTab LParam: OpenFilesTab to l1 + TCIF_PARAM IsMask: OpenFilesTab child2 GetTabInfo: OpenFilesTab LParam: OpenFilesTab to l2 + TCIF_PARAM IsMask: OpenFilesTab child1 SetTabInfo: OpenFilesTab l1 IsLparam: OpenFilesTab + TCIF_PARAM IsMask: OpenFilesTab child2 SetTabInfo: OpenFilesTab ; *************** *** 384,388 **** SetSavepoint: CurrentWindow \ mark as not modified ActiveChild >r ! win-func execute \ NewHSplitWnd textbuf SetText: CurrentWindow name$ count SetFileName: ActiveChild --- 437,441 ---- SetSavepoint: CurrentWindow \ mark as not modified ActiveChild >r ! win-func execute textbuf SetText: CurrentWindow name$ count SetFileName: ActiveChild *************** *** 393,397 **** r> GetHandle: [ ] CloseChild: Frame Update ! SetFocus: ActiveChild ; IDM_SPLIT_HORIZONTAL SetCommand : SplitWindowVertical ( -- ) --- 446,451 ---- r> GetHandle: [ ] CloseChild: Frame Update ! SetFocus: ActiveChild ! ; : SplitWindowVertical ( -- ) *************** *** 404,408 **** ['] NewEditWindow NO_SPLIT SplitWindow ; IDM_NO_SPLIT_WINDOW SetCommand - \s \ : SplitWindowHorizontal { \ modified? curpos textbuf textlen name$ -- } \ ActiveChild 0= ?exit --- 458,461 ---- *************** *** 476,478 **** \ Update \ SetFocus: ActiveChild ; IDM_NO_SPLIT_WINDOW SetCommand ! \ \s --- 529,532 ---- \ Update \ SetFocus: ActiveChild ; IDM_NO_SPLIT_WINDOW SetCommand ! ! \s |