\ File: Statbar.f \ Author: Jeff Kelm \ Created: 24-Sep-1998 \ Updated: 15-Oct-1998 \ Classes to handle Statusbars (simple and multipart) NEEDS WinBase.f \ Notes: \ 1) SBARS_SIZEGRIP don't appear to work. Always shows up with the size grip \ box. \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\ Simple Statusbar Class \ :Class Statusbar abs 0 SB_GETBORDERS SendMessage: self ?WinError HERE DUP @ SWAP CELL+ DUP @ SWAP CELL+ @ ;M :M Redraw: ( -- ) \ redraw the statusbar after changes (e.g., size) 0 0 WM_SIZE SendMessage: self DROP ;M :M SetStyle: ( style) \ set style of statusbar "on the fly" GWL_STYLE GetHandle: self Call SetWindowLong DROP Redraw: self ;M :M GetStyle: ( -- style) \ get current style of statusbar GWL_STYLE GetHandle: self Call GetWindowLong ;M :M SetText: ( szText) rel>abs 255 BorderStyle OR SB_SETTEXT SendMessage: self ?WinError ;M :M GetID: ( -- id) StatusID ;M ;Class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\ Multipart Statusbar Class \ :Class MultiStatusbar abs nParts SB_SETPARTS SendMessage: self ?WinError ;M :M GetParts: ( -- aWidths nParts) \ retrieve data structure info aWidths nParts ;M :M SetSimple: ( flag) 0 SWAP SB_SIMPLE SendMessage: self DROP ;M :M SetText: ( szText n) \ set text in n'th part BorderStyle OR SWAP rel>abs SWAP SB_SETTEXT SendMessage: self ?WinError ;M ;Class