From: Dirk B. <db...@us...> - 2006-05-20 07:41:14
|
Update of /cvsroot/win32forth/win32forth/src/console In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11154/src/console Modified Files: ConsoleStatbar.f Log Message: Fixed the permanent redraw of the console status bar. Index: ConsoleStatbar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/console/ConsoleStatbar.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ConsoleStatbar.f 14 May 2006 10:46:19 -0000 1.5 --- ConsoleStatbar.f 20 May 2006 07:41:05 -0000 1.6 *************** *** 29,56 **** :M Create: ( hParent -- ) Create: super ! \ 8 to display-depth ! MultiWidth 2 SetParts: self ! Show: self ! ;M :M SetSP: ( n -- ) ! to forth-sp ! ;M :M SetDepth: ( n -- ) ! to forth-depth ! ;M :M SetBase: ( n -- ) ! to forth-base ! ;M :M SetDisplayDepth: ( n -- ) ! to display-depth ! ;M :M SetText: ( a n -- ) \ set text a for part n ! swap dup +null 1+ swap SetText: super ! ;M :M Update: { \ buf$ buf1$ pad$ -- } --- 29,51 ---- :M Create: ( hParent -- ) Create: super ! GetHandle: self ! if MultiWidth 2 SetParts: self ! Show: self ! then ;M :M SetSP: ( n -- ) ! to forth-sp ;M :M SetDepth: ( n -- ) ! to forth-depth ;M :M SetBase: ( n -- ) ! to forth-base ;M :M SetDisplayDepth: ( n -- ) ! to display-depth ;M :M SetText: ( a n -- ) \ set text a for part n ! swap dup +null 1+ swap SetText: super ;M :M Update: { \ buf$ buf1$ pad$ -- } *************** *** 111,115 **** ;Object - \ ***************************************************************************** \ hook's for the interpreter --- 106,109 ---- *************** *** 117,125 **** : Update-Console-Statusbar ( -- ) \ update the status bar ! depth SetDepth: ConsoleStatusbar ! sp@ SetSP: ConsoleStatusbar ! base @ SetBase: ConsoleStatusbar ! source-id 0= ! if Update: ConsoleStatusbar then ; : Console-Statusbar-interpret ( -- ) \ hook for INTERPRET --- 111,121 ---- : Update-Console-Statusbar ( -- ) \ update the status bar ! GetHandle: ConsoleStatusbar ! if depth SetDepth: ConsoleStatusbar ! sp@ SetSP: ConsoleStatusbar ! base @ SetBase: ConsoleStatusbar ! source-id 0= ! if Update: ConsoleStatusbar then ! then ; : Console-Statusbar-interpret ( -- ) \ hook for INTERPRET *************** *** 143,156 **** \ ***************************************************************************** ! 0 value &Console-Window-Proc \ addr off org console window proc 4 Callback: Console-Statusbar-WindowProc ( hwnd msg wparam lparam -- res ) ! \ call org console window proc ! 4reverse &Console-Window-Proc Call CallWindowProc ! ! \ redraw our status bar ! Redraw: ConsoleStatusbar ; \ ***************************************************************************** --- 139,151 ---- \ ***************************************************************************** ! 0 value &Console-Window-Proc \ addr of the org console window proc 4 Callback: Console-Statusbar-WindowProc ( hwnd msg wparam lparam -- res ) ! \ redraw our status bar if needed ! 2 PICK WM_WINDOWPOSCHANGED = if Redraw: ConsoleStatusbar then + \ and call the org console window proc + 4reverse &Console-Window-Proc Call CallWindowProc ; \ ***************************************************************************** *************** *** 161,195 **** SetDisplayDepth: ConsoleStatusbar ; - \ ***************************************************************************** \ INIT-CONSOLE \ ***************************************************************************** ! : M_init_cons ( -- f ) ! _conHndl Create: ConsoleStatusbar ! ! \ hook into the interpreter ! ['] Console-Statusbar-interpret is interpret ! \ sublassing of the console window ! GWL_WNDPROC _conHndl Call GetWindowLong to &Console-Window-Proc ! &Console-Statusbar-WindowProc GWL_WNDPROC _conHndl Call SetWindowLong drop ! \ and update the status bar ! Update-Console-Statusbar ! ; : M_INIT-CONSOLE ( -- f ) \ create console window X_INIT-CONSOLE dup 0<> ! if \ create the status bar ! m_init_cons then ; ' M_INIT-CONSOLE is INIT-CONSOLE - \ force a paint?, rebuild the status bar - m_init_cons sw_hide show-window sw_show show-window Update: ConsoleStatusbar - MODULE --- 156,185 ---- SetDisplayDepth: ConsoleStatusbar ; \ ***************************************************************************** \ INIT-CONSOLE \ ***************************************************************************** ! : M_INIT_CONS ( -- ) ! _conHndl Create: ConsoleStatusbar ! GetHandle: ConsoleStatusbar ! if \ hook into the interpreter ! ['] Console-Statusbar-interpret is interpret ! \ sublassing of the console window ! &Console-Statusbar-WindowProc GWL_WNDPROC _conHndl ! Call SetWindowLong to &Console-Window-Proc ! \ and update the status bar ! Update-Console-Statusbar ! then ; : M_INIT-CONSOLE ( -- f ) \ create console window X_INIT-CONSOLE dup 0<> ! if M_INIT_CONS \ create the status bar then ; ' M_INIT-CONSOLE is INIT-CONSOLE MODULE |