You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(70) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(38) |
Feb
(4) |
Mar
(11) |
Apr
(49) |
May
(81) |
Jun
(65) |
Jul
(36) |
Aug
(57) |
Sep
(63) |
Oct
(57) |
Nov
(49) |
Dec
(41) |
2006 |
Jan
(75) |
Feb
(80) |
Mar
(10) |
Apr
(13) |
May
(100) |
Jun
(100) |
Jul
(77) |
Aug
(87) |
Sep
(80) |
Oct
(124) |
Nov
(39) |
Dec
(41) |
2007 |
Jan
(20) |
Feb
(32) |
Mar
(32) |
Apr
(43) |
May
(146) |
Jun
(40) |
Jul
(49) |
Aug
(33) |
Sep
(25) |
Oct
(19) |
Nov
(11) |
Dec
(8) |
2008 |
Jan
(4) |
Feb
(11) |
Mar
(31) |
Apr
(40) |
May
(34) |
Jun
(24) |
Jul
(39) |
Aug
(104) |
Sep
(27) |
Oct
(35) |
Nov
(34) |
Dec
(97) |
2009 |
Jan
(75) |
Feb
(29) |
Mar
(45) |
Apr
(76) |
May
(121) |
Jun
(103) |
Jul
(67) |
Aug
(28) |
Sep
(22) |
Oct
(39) |
Nov
(9) |
Dec
(15) |
2010 |
Jan
(7) |
Feb
(39) |
Mar
(40) |
Apr
(57) |
May
(67) |
Jun
(69) |
Jul
(49) |
Aug
(68) |
Sep
(22) |
Oct
(7) |
Nov
(2) |
Dec
(10) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(4) |
May
(6) |
Jun
(10) |
Jul
(16) |
Aug
(23) |
Sep
(9) |
Oct
|
Nov
(28) |
Dec
(3) |
2012 |
Jan
(11) |
Feb
(10) |
Mar
(1) |
Apr
|
May
(4) |
Jun
(3) |
Jul
(3) |
Aug
(4) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
(7) |
Mar
(30) |
Apr
(4) |
May
(4) |
Jun
(8) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(24) |
Dec
(13) |
2014 |
Jan
(7) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(9) |
Jun
|
Jul
(3) |
Aug
(9) |
Sep
|
Oct
(2) |
Nov
|
Dec
(3) |
2015 |
Jan
(4) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(4) |
Nov
(7) |
Dec
(39) |
2016 |
Jan
(17) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
2017 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2018 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ezra B. <ezr...@us...> - 2006-06-06 03:06:57
|
Update of /cvsroot/win32forth/win32forth/apps/ForthForm/res In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10002/apps/ForthForm/res Added Files: folder.bmp Log Message: Improved FileLister class. EAB --- NEW FILE: folder.bmp --- (This appears to be a binary file; contents omitted.) |
From: Ezra B. <ezr...@us...> - 2006-06-06 03:04:06
|
Update of /cvsroot/win32forth/win32forth/apps/ForthForm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10002/apps/ForthForm Modified Files: FileLister.f Added Files: quiksort.f Log Message: Improved FileLister class. EAB Index: FileLister.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/ForthForm/FileLister.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileLister.f 5 May 2005 09:43:26 -0000 1.2 --- FileLister.f 6 Jun 2006 03:03:49 -0000 1.3 *************** *** 2,5 **** --- 2,6 ---- \ Thursday, August 19 2004 - Ezra Boyce \ Code adapted from ProjectManager.f, a.k.a shamelessly ripped off :-) + \ See the FileWindow class at end of file for available methods and uses anew -FileLister.f *************** *** 8,15 **** needs treeview.f needs bitmap.f [...1132 lines suppressed...] + if drop + SelectedItem: ThisFolder + tree-dblclick null-check execute + else -1 = \ .. selection? + if ascend: ThisFolder + else descend: ThisFolder + then + then + endof + \ right click in treeview opens browseforfolder dialog + NM_RCLICK of ChooseFolder: self + endof + endcase Handle_Notify: ThisFolder + else false + then + ;M + ;Class ! \s --- NEW FILE: quiksort.f --- anew wilsort \ ---------------------------------------------------------- \ Wil Baden's sorter \ Set PRECEDES for different datatypes or sort order. DEFER PRECEDES ' < IS PRECEDES \ For sorting character strings in increasing order: : SPRECEDES ( addr addr -- flag ) >R COUNT R> COUNT COMPARE 0< ; : IPRECEDES ( addr addr -- flag ) < ; ' SPRECEDES IS PRECEDES internal : EXCHANGE ( addr_1 addr_2 -- ) DUP @ >R OVER @ SWAP ! R> SWAP ! ; \ : -CELL ( -- n ) -1 CELLS ; \ : CELL- ( addr -- addr' ) 1 CELLS - ; : PARTITION ( lo hi -- lo_1 hi_1 lo_2 hi_2 ) 2DUP OVER - 2/ -CELL AND + @ >R ( R: median) 2DUP BEGIN ( lo_1 hi_2 lo_2 hi_1) SWAP BEGIN DUP @ R@ PRECEDES WHILE CELL+ REPEAT SWAP BEGIN R@ OVER @ PRECEDES WHILE CELL- REPEAT 2DUP > NOT IF 2DUP EXCHANGE >R CELL+ R> CELL- THEN 2DUP > UNTIL ( lo_1 hi_2 lo_2 hi_1) R>DROP SWAP ROT ( lo_1 hi_1 lo_2 hi_2) ; : QSORT ( lo hi -- ) PARTITION ( lo_1 hi_1 lo_2 hi_2) 2OVER 2OVER - + ( . . . . lo_1 hi_1+lo_2-hi_2) < IF 2SWAP THEN ( lo_1 hi_1 lo_2 hi_2) 2DUP < IF RECURSE ELSE 2DROP THEN 2DUP < IF RECURSE ELSE 2DROP THEN ; external : SORT ( addr n -- ) DUP 2 < IF 2DROP EXIT THEN 1- CELLS OVER + ( addr addr+{n-1}cells) QSORT ( ) ; module \ ---------------------------------------------------------- \s \ quickie tests: here ," nine" here ," fout" here ," three" here ," seven" here ," zero" here ," eight" here ," two" here ," six" here ," one" here ," five" create str-table , , , , , , , , , , \ table of counted strings : str_dump 10 0 do i cells STR-TABLE + @ count type space loop ; cr str_dump .( -> ) ' SPRECEDES IS PRECEDES STR-TABLE 10 sort cr str_dump CREATE INT-TABLE 9 , 4 , 3 , 7 , 0 , 8 , 2 , 6 , 1 , 5 , : int_dump 10 0 do i cells INT-TABLE + @ . loop ; cr int_dump .( -> ) ' IPRECEDES IS PRECEDES INT-TABLE 10 sort int_dump |
From: Ezra B. <ezr...@us...> - 2006-06-06 02:58:30
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7287/src/lib Modified Files: ExUtils.f excontrols.f Added Files: ButtonBar.f Buttons.f Calendar.f Label.f ListBox.f ProgressBar.f ScrollBar.f TabControl.f TextBox.f TrackBar.f UpDownControl.f Log Message: Put extended controls in their own files. EAB --- NEW FILE: ButtonBar.f --- anew -ButtonBar.f WinLibrary COMCTL32.DLL needs sendmessage.f INTERNAL EXTERNAL \ *T ExControls -- More (enhanced) classes for none standard windows controls. \ ------------------------------------------------------------------------ \ *W <a name="VertButtonBar"></a> \ *S VertButtonBar class \ ------------------------------------------------------------------------ :Class VertButtonBar <super VButtonBar \ *G VertButtonBar control \ *P This is an enhanced Version of the VButtonBar class. \ *P Note: this control isn't one of the standard control of MS windows. :M SetFont: { fonthndl \ hb1 -- } \ *G Set the font in the control. hbb to hb1 begin hb1 while fonthndl GetID: hb1 SetDlgItemFont: self GetPrev: hb1 to hb1 repeat ;M :M Enable: { flag \ hb1 -- } \ *G Enable the control. hbb to hb1 begin hb1 while flag GetID: hb1 EnableDlgitem: self GetPrev: hb1 to hb1 repeat ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M ;Class \ *G End of VertButtonBar class \ ------------------------------------------------------------------------ \ *W <a name="HorizButtonBar"></a> \ *S HorizButtonBar class \ ------------------------------------------------------------------------ :Class HorizButtonBar <super HButtonBar \ *G HorizButtonBar control \ *P This is an enhanced Version of the HButtonBar class. \ *P Note: this control isn't one of the standard control of MS windows. :M SetFont: { fonthndl \ hb1 -- } \ *G Set the font in the control. hbb to hb1 begin hb1 while fonthndl GetID: hb1 SetDlgItemFont: self GetPrev: hb1 to hb1 repeat ;M :M Enable: { flag \ hb1 -- } \ *G Enable the control. hbb to hb1 begin hb1 while flag GetID: hb1 EnableDlgitem: self GetPrev: hb1 to hb1 repeat ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M ;Class \ *G End of HorizButtonBar class MODULE --- NEW FILE: UpDownControl.f --- anew -UpDownControl.f WinLibrary COMCTL32.DLL needs sendmessage.f needs textbox.f INTERNAL EXTERNAL \ ------------------------------------------------------------------------ \ *W <a name="UpDownControl"></a> \ *S UpDownControl class \ ------------------------------------------------------------------------ :Class UpDownControl <Super Control \ *G Up-Down control \ *P An up-down control is a pair of arrow buttons that the user can click to \ ** increment or decrement a value, such as a scroll position or a number displayed \ ** in a companion control. \ *P For 16 Bit values only. int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: \ ** WS_BORDER, UDS_ARROWKEYS, UDS_SETBUDDYINT and UDS_ALIGNRIGHT. WindowStyle: super [ WS_BORDER UDS_ARROWKEYS OR UDS_SETBUDDYINT OR UDS_ALIGNRIGHT OR ] literal or style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M Start: ( Parent -- ) \ *G Create the control. to parent Z" msctls_updown32" create-control ;M :M StartSize: ( -- cx cy ) \ *G default window size 40 20 ;M :M StartPos: ( -- x y ) \ *G default window position 0 0 ;M :M SetBuddy: ( hBuddy -- ) \ *G Sets the buddy window for the up-down control. 0 SWAP UDM_SETBUDDY SendMessage:Self DROP ;M :M GetValue: ( -- n ) \ *G Retrieves the current position of the up-down control. \ ** Note: This method ABORT's on error. 0 0 UDM_GETPOS SendMessage:Self word-split ABORT" Up/Down Control read error" ;M :M SetValue: ( n -- ) \ *G Set the current position for the up-down control. 0 word-join 0 UDM_SETPOS SendMessage:Self DROP ;M :M SetDecimal: ( -- ) \ *G Sets the radix base for the control to decimal. \ ** Decimal numbers are signed. 0 10 UDM_SETBASE SendMessage:Self DROP ;M :M SetHex: ( -- ) \ *G Sets the radix base for the control to hexadecimal. \ ** Hexadecimal numbers are always unsigned. 0 16 UDM_SETBASE SendMessage:Self DROP ;M :M GetBase: ( -- n ) \ *G Get the current radix base (that is, either base 10 or 16). 0 0 UDM_GETBASE SendMessage:Self ;M :M SetRange: ( lower upper -- ) \ *G Sets the minimum and maximum positions (range) the control. \ ** Neither position can be greater than the UD_MAXVAL value or less than \ ** the UD_MINVAL value. In addition, the difference between the two positions \ ** cannot exceed UD_MAXVAL. swap word-join 0 UDM_SETRANGE SendMessage:Self DROP ;M :M GetRange: ( -- lower upper ) \ *G Retrieves the minimum and maximum positions (range) for the control. 0 0 UDM_GETRANGE SendMessage:Self word-split SWAP ;M :M Enable: ( f -- ) \ *G Enable the control. ID EnableDlgItem: parent ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M ;Class \ *G End of UpDownControl control :Class SpinnerControl <Super UpDownControl TextBox TheBox :m start: ( parent -- ) \ both must have same parent dup Start: TheBox Start: super ;m :m TheBox: ( -- spinbox ) \ in case we need it directly for some reason Addr: TheBox ;m :m Move: ( x y w h -- ) Move: TheBox \ allow the updowncontrol to move with the editcontrol GetHandle: TheBox SetBuddy: self ;m :m SetFont: ( hndl -- ) Setfont: TheBox ;m :M Close: ( -- ) Close: TheBox Close: self ;M ;class MODULE --- NEW FILE: Calendar.f --- anew -Calendar.f WinLibrary COMCTL32.DLL needs sendmessage.f INTERNAL EXTERNAL #IFNDEF wYear \ Because _SystemTime is a user variable The following need to be set at run time 0 value wyear 0 value wmonth 0 value wDayOfWeek 0 value wDay 0 value wHour 0 value wMinute 0 value wSecond 0 value wMilliSeconds 16 Constant sizeof(_systemTime) : set-time-pointers ( -- ) _SystemTime dup to wYear 2 + dup to wMonth 2 + dup to wDayOfWeek 2 + dup to wDay 2 + dup to wHour 2 + dup to wMinute 2 + dup to wSecond 2 + to wMilliSeconds ; initialization-chain chain-add set-time-pointers set-time-pointers \ TODO: Move the SystemTime-struct into class. So that every instance of the \ control becomes his own set of values. Comment: wYear The year (1601 - 30827). wMonth The month. January = 1 February = 2 March = 3 April = 4 May = 5 June = 6 July = 7 August = 8 September = 9 October = 10 November = 11 December = 12 wDayOfWeek The day of the week. Sunday = 0 Monday = 1 Tuesday = 2 Wednesday = 3 Thursday = 4 Friday = 5 Saturday = 6 wDay The day of the month (0-31). wHour The hour (0-23). wMinute The minute (0-59). wSecond The second (0-59). wMilliseconds The millisecond (0-999). Comment; #THEN \ ------------------------------------------------------------------------ \ *W <a name="MonthCalendar"></a> \ *S MonthCalendar class \ ------------------------------------------------------------------------ :Class MonthCalendar <Super Control \ *G Month Calendar control. \ ** A month calendar control implements a calendar-like user interface. This \ ** provides the user with a very intuitive and recognizable method of entering \ ** or selecting a date. int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M Start: ( Parent -- ) \ *G Create the control. to parent ICC_DATE_CLASSES 8 sp@ Call InitCommonControlsEx 3drop z" SysMonthCal32" Create-Control ;M :M MinSize: ( -- x y ) \ *G Return minimum size required to display a month. EraseRect: TempRect TempRect 0 MCM_GETMINREQRECT SendMessage:Self ?Win-Error Right: TempRect Bottom: TempRect ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: WS_BORDER. WindowStyle: super WS_BORDER or style or ;M :M GetDate: ( -- day month year ) \ *G Retrieves the currently selected date. \ *P \i day \d is the day of the month (0-31). \ *P \i Month \d is the month (January = 1; December = 12) \ *P \i year \d is the year (1601 - 30827). _SystemTime 0 MCM_GETCURSEL SendMessage:Self drop wday w@ wmonth w@ wyear w@ ;M :M GetToday: ( -- day month year ) \ *G Retrieves the date information for the date specified as "today". \ *P \i day \d is the day of the month (0-31). \ *P \i Month \d is the month (January = 1; December = 12) \ *P \i year \d is the year (1601 - 30827). _systemtime 0 MCM_GETTODAY SendMessage:Self ?Win-Error wday w@ wmonth w@ wyear w@ ;M ;Class \ *G End of MonthCalendar class \ ------------------------------------------------------------------------ \ *W <a name="DateTimePicker"></a> \ *S DateTimePicker class \ ------------------------------------------------------------------------ :Class DateTimePicker <Super Control \ *G Date and Time Picker control int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M Start: ( Parent -- ) \ *G Create the control. to parent ICC_DATE_CLASSES 8 sp@ Call InitCommonControlsEx 3drop z" SysDateTimePick32" Create-Control ;M /* Date and Time Picker Control Styles The window styles listed here are specific to date and time picker controls. Constants DTS_APPCANPARSE Allows the owner to parse user input and take necessary action. It enables users to edit within the client area of the control when they press the F2 key. The control sends DTN_USERSTRING notification messages when users are finished. DTS_LONGDATEFORMAT Displays the date in long format. The default format string for this style is defined by LOCALE_SLONGDATEFORMAT, which produces output like "Friday, April 19, 1996". DTS_RIGHTALIGN The drop-down month calendar will be right-aligned with the control instead of left-aligned, which is the default. DTS_SHOWNONE It is possible to have no date currently selected in the control. With this style, the control displays a check box that users can check once they have entered or selected a date. Until this check box is checked, the application will not be able to retrieve the date from the control because, in essence, the control has no date. This state can be set with the DTM_SETSYSTEMTIME message or queried with the DTM_GETSYSTEMTIME message. DTS_SHORTDATEFORMAT Displays the date in short format. The default format string for this style is defined by LOCALE_SSHORTDATE, which produces output like "4/19/96". DTS_SHORTDATECENTURYFORMAT Version 5.80. Similar to the DTS_SHORTDATEFORMAT style, except the year is a four-digit field. The default format string for this style is based on LOCALE_SSHORTDATE. The output looks like: "4/19/1996". DTS_TIMEFORMAT Displays the time. The default format string for this style is defined by LOCALE_STIMEFORMAT, which produces output like "5:31:42 PM". DTS_UPDOWN Places an up-down control to the right of the DTP control to modify date-time values. This style can be used in place of the drop-down month calendar, which is the default style. Remarks The DTS_XXXFORMAT styles that define the display format cannot be combined. If none of the format styles are suitable, use a DTM_SETFORMAT message to define a custom format. */ :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: WS_BORDER. WindowStyle: super WS_BORDER or style or ;M /* Format Strings A DTP format string consists of a series of elements that represent a particular piece of information and define its display format. The elements will be displayed in the order they appear in the format string. Date and time format elements will be replaced by the actual date and time. They are defined by the following groups of characters: Element Description "d" The one- or two-digit day. "dd" The two-digit day. Single-digit day values are preceded by a zero. "ddd" The three-character weekday abbreviation. "dddd" The full weekday name. "h" The one- or two-digit hour in 12-hour format. "hh" The two-digit hour in 12-hour format. Single-digit values are preceded by a zero. "H" The one- or two-digit hour in 24-hour format. "HH" The two-digit hour in 24-hour format. Single-digit values are preceded by a zero. "m" The one- or two-digit minute. "mm" The two-digit minute. Single-digit values are preceded by a zero. "M" The one- or two-digit month number. "MM" The two-digit month number. Single-digit values are preceded by a zero. "MMM" The three-character month abbreviation. "MMMM" The full month name. "t" The one-letter AM/PM abbreviation (that is, AM is displayed as "A"). "tt" The two-letter AM/PM abbreviation (that is, AM is displayed as "AM"). "yy" The last two digits of the year (that is, 1996 would be displayed as "96"). "yyyy" The full year (that is, 1996 would be displayed as "1996"). To make the information more readable, you can add body text to the format string by enclosing it in single quotes. Spaces and punctuation marks do not need to be quoted. Note Nonformat characters that are not delimited by single quotes will result in unpredictable display by the DTP control. For example, to display the current date with the format "'Today is: 04:22:31 Tuesday Mar 23, 1996", the format string is "'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy". To include a single quote in your body text, use two consecutive single quotes. For example, "'Don''t forget' MMM dd',' yyyy" produces output that looks like: Don't forget Mar 23, 1996. It is not necessary to use quotes with the comma, so "'Don''t forget' MMM dd, yyyy" is also valid, and produces the same output. */ :M SetCustomFormat: ( z"format" -- ) \ *G set the display format for time or date 0 DTM_SETFORMAT SendMessage:Self ?Win-Error ;M :M GetTime: ( -- hrs min secs ) \ *G get user selected time _SystemTime 0 DTM_GETSYSTEMTIME SendMessage:Self GDT_VALID = if wHour w@ wMinute w@ wSecond w@ else 0 0 0 then ;M :M SetTime: ( hr min sec -- ) \ *G set time for user to edit wSecond w! wMinute w! wHour w! 0 wMilliSeconds w! _SystemTime GDT_VALID DTM_SETSYSTEMTIME SendMessage:Self ?Win-Error ;M :M GetDate: ( -- day month year ) \ *G get user selected date GetTime: self 3dup or or 0<> if 3drop wDay w@ wMonth w@ wYear w@ then ;M ;Class \ *G End of DateTimePicker class MODULE Index: excontrols.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/excontrols.f,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** excontrols.f 4 Jun 2006 09:58:50 -0000 1.18 --- excontrols.f 6 Jun 2006 02:58:24 -0000 1.19 *************** *** 13,2498 **** IN-APPLICATION ! WinLibrary COMCTL32.DLL ! WinLibrary RichEd32.DLL ! ! needs sendmessage.f ! ! needs StatusBar.f \ in separate file ! ! internal [...2473 lines suppressed...] ! MODULE ! \ *Z --- 13,28 ---- IN-APPLICATION ! needs StatusBar.f ! needs Textbox.f \ textbox, passwordbox, multilinetextbox etc. ! needs Listbox.f \ listbox, combobox etc. ! needs UpDownControl.f \ updowncontrol, spinnercontrol ! needs Buttons.f \ checkbox, radiobutton, pushbutton,groupbox ! needs Label.f \ label, image labels etc. ! \ needs ProgressBar.f \ load as needed ! \ needs TrackBar.f \ ditto ! needs ScrollBar.f ! \ needs Calendar.f \ calendar, date/time picker, load as needed ! needs TabControl.f ! \ needs ButtonBar.f \ uncomment and complain if actually used :-) ! \s --- NEW FILE: ProgressBar.f --- anew -ProgressBar.f WinLibrary COMCTL32.DLL needs sendmessage.f INTERNAL EXTERNAL \ ------------------------------------------------------------------------ \ *W <a name="Progressbar"></a> \ *S Progressbar class \ ------------------------------------------------------------------------ :Class Progressbar <Super Control \ *G Progressbar control \ ** A progress bar is a window that an application can use to indicate the progress \ ** of a lengthy operation. It consists of a rectangle that is gradually filled with \ ** the system highlight color as an operation progresses. int style :M Start: ( Parent -- ) \ *G Create the control. TO Parent Z" msctls_progress32" Create-Control ;M :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. WindowStyle: super style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M +Value: ( n -- ) \ *G Advances the current position of the progress bar by a specified increment \ ** and redraws the bar to reflect the new position. 0 SWAP PBM_DELTAPOS SendMessage:Self DROP ;M :M GetValue: ( -- n ) \ *G Returns the current position of the progress bar. 0 0 PBM_DELTAPOS SendMessage:Self ;M :M SetValue: ( n -- ) \ *G Sets the current position for the progress bar and redraws the bar to \ ** reflect the new position. 0 SWAP PBM_SETPOS SendMessage:Self DROP ;M :M SetRange: ( min max -- ) \ *G Sets the minimum and maximum values for the progress bar and redraws the \ ** bar to reflect the new range. \ *P \i min \d is the minimum range value. By default, the minimum value is zero. \ *P \i max \d is the maximum range value. By default, the maximum value is 100. word-join 0 PBM_SETRANGE SendMessage:Self ?Win-error ;M : SetStep ( n -- n1 ) 0 SWAP PBM_SETSTEP SendMessage:Self ; :M SetStep: ( n -- ) \ *G Specifies the step increment for the progress bar. The step increment is \ the amount by which the progress bar increases its current position whenever \ the StepIt: method is used. By default, the step increment is set to 10. SetStep DROP ;M :M GetStep: ( -- n ) \ *G Returns the current step increment for the progress bar. 0 SetStep dup SetStep ;M :M StepIt: ( -- ) \ *G Advances the current position for the progress bar by the step increment \ ** and redraws the bar to reflect the new position. \ *P When the position exceeds the maximum range value, this method resets the current \ ** position so that the progress indicator starts over again from the beginning. 0 0 PBM_STEPIT SendMessage:Self DROP ;M ;Class \ *G End of Progressbar class \ ------------------------------------------------------------------------ \ *W <a name="SmoothProgressbar"></a> \ *S SmoothProgressbar class \ ------------------------------------------------------------------------ :Class SmoothProgressbar <Super Progressbar \ *G Progressbar control \ ** A progress bar is a window that an application can use to indicate the progress \ ** of a lengthy operation. It consists of a rectangle that is gradually filled with \ ** the system highlight color as an operation progresses. \ *P The progress bar displays progress status in a smooth scrolling bar instead of the \ ** default segmented bar. :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: PBS_SMOOTH. WindowStyle: super PBS_SMOOTH OR ;M ;Class \ *G End of SmoothProgressbar class MODULE --- NEW FILE: Buttons.f --- anew -Buttons.f WinLibrary COMCTL32.DLL needs sendmessage.f INTERNAL EXTERNAL \ ------------------------------------------------------------------------ \ *W <a name="CheckBox"></a> \ *S CheckBox class \ ------------------------------------------------------------------------ :Class CheckBox <super CheckControl \ *G Class for check buttons \ ** (enhanced Version of the CheckControl class) int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. WindowStyle: super style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M IsButtonChecked?: ( -- f ) \ *G send message to self through parent ID IsDlgButtonChecked: parent \ to checked ;M :M CheckButton: ( -- ) BST_CHECKED ID CheckDlgButton: parent ;M :M UnCheckButton: ( -- ) BST_UNCHECKED ID CheckDlgButton: parent ;M :M Check: ( f -- ) if CheckButton: self else UnCheckButton: self then ;M :M Enable: ( f -- ) \ *G Enable the control. ID EnableDlgItem: parent ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M :M Setfont: ( handle -- ) \ *G Set the font in the control. 1 swap WM_SETFONT SendMessage:Self drop ;M ;Class \ *G End of CheckBox class \ ------------------------------------------------------------------------ \ *W <a name="RadioButton"></a> \ *S RadioButton class \ ------------------------------------------------------------------------ :Class RadioButton <super RadioControl \ *G Class for radio buttons \ ** (enhanced Version of the RadioControl class) int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. WindowStyle: super style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. \ *P If you need more than one group of radio buttons within a dialog you must \ ** add the BS_GROUP style to the first button of each group. to style ;M :M IsButtonChecked?: ( -- f ) \ *G Check if the radio button is checked or unchecked. ID IsDlgButtonChecked: parent ;M :M CheckButton: ( -- ) \ *G Set the button state to checked. BST_CHECKED ID CheckDlgButton: parent ;M :M UnCheckButton: ( -- ) \ *G Set the button state to unchecked. BST_UNCHECKED ID CheckDlgButton: parent ;M :M Check: ( f -- ) \ *G Set the button state to either checked or unchecked. if CheckButton: self else UnCheckButton: self then ;M :M Enable: ( f -- ) \ *G Enable the control. ID EnableDlgItem: parent ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M :M Setfont: ( handle -- ) \ *G Set the font in the control. 1 swap WM_SETFONT SendMessage:Self drop ;M ;Class \ *G End of RadioButton class \ ------------------------------------------------------------------------ \ *W <a name="GroupRadioButton"></a> \ *S GroupRadioButton class \ ------------------------------------------------------------------------ :Class GroupRadioButton <super RadioButton \ *G Class for radio buttons. \ ** Use a GroupRadioButton object for the first radio button in every group \ ** of radio buttons within your dialog. :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default is BS_GROUP. WindowStyle: super WS_GROUP or ;M ;Class \ *G End of GroupRadioButton class \ ------------------------------------------------------------------------ \ *W <a name="PushButton"></a> \ *S PushButton class \ ------------------------------------------------------------------------ :Class PushButton <super ButtonControl \ *G Class for push buttons \ ** (enhanced Version of the ButtonControl class) int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. WindowStyle: super style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M Setfont: ( handle -- ) \ *G Set the font in the control. 1 swap WM_SETFONT SendMessage:Self drop ;M :M Enable: ( f -- ) \ *G Enable the control. ID EnableDlgItem: parent ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M ;Class \ *G End of PushButton class \ ------------------------------------------------------------------------ \ *W <a name="DefPushButton"></a> \ *S DefPushButton class \ ------------------------------------------------------------------------ :Class DefPushButton <Super PushButton \ *G Class for the default push buttons :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: BS_DEFPUSHBUTTON. WindowStyle: super BS_DEFPUSHBUTTON OR ;M ;Class \ *G End of DefPushButton class \ ------------------------------------------------------------------------ \ *W <a name="BitmapButton"></a> \ *S BitmapButton class \ ------------------------------------------------------------------------ :Class BitmapButton <Super PushButton \ *G BitmapButton control int hbitmap \ bitmap handle for button :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to hbitmap ;M :M DeleteBitmap: ( -- ) hbitmap if hbitmap Call DeleteObject drop 0 to hbitmap then ;M :M SetBitmap: ( hbitmap -- ) dup hbitmap <> if \ DeleteBitmap: self to hbitmap hbitmap IMAGE_BITMAP BM_SETIMAGE SendMessage:Self drop else drop then ;M :M SetImage: ( hbmp -- ) SetBitmap: self ;M :M GetBitmap: ( -- hbitmap ) \ 0 IMAGE_BITMAP BM_GETIMAGE SendMessage:Self to hbitmap hbitmap ;M :M GetImage: ( -- hbitmap ) GetBitmap: self ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: BS_BITMAP. WindowStyle: super BS_BITMAP or ;M :M ToolString: ( addr cnt -- ) binfo place binfo count \n->crlf ;M :M Close: ( -- ) \ DeleteBitmap: self Close: super ;M ;Class \ *G End of BitmapButton class \ ------------------------------------------------------------------------ \ *W <a name="IconButton"></a> \ *S IconButton class \ ------------------------------------------------------------------------ :Class IconButton <Super PushButton \ *G IconButton control int hicon :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to hicon ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: BS_ICON. WindowStyle: super BS_ICON OR ;M :M DeleteIcon: ( -- ) hicon if hicon Call DeleteObject drop 0 to hicon then ;M :M SetIcon: ( hIcon -- ) \ *G set the icon image to use with the button dup hicon <> if \ DeleteIcon: self to hicon hicon IMAGE_ICON BM_SETIMAGE SendMessage:Self DROP else drop then ;M :M SetImage: ( hicon -- ) SetIcon: self ;M :M GetIcon: ( -- hIcon) \ *G get the icon image used with the button \ 0 IMAGE_ICON BM_GETIMAGE SendMessage:Self to hicon hicon ;M :M GetImage: ( -- hicon ) GetIcon: self ;M :M ToolString: ( addr cnt -- ) binfo place binfo count \n->crlf ;M :M Close: ( -- ) \ DeleteIcon: self Close: super ;M ;Class \ *G End of IconButton class \ ------------------------------------------------------------------------ \ *W <a name="GroupBox"></a> \ *S GroupBox class \ ------------------------------------------------------------------------ :Class GroupBox <super GroupControl \ *G GroupBox control \ ** (enhanced Version of the GroupControl class) int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. WindowStyle: super style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M Setfont: ( handle -- ) \ *G Set the font in the control. 1 swap WM_SETFONT SendMessage:Self drop ;M :M Enable: ( f -- ) \ *G Enable the control. ID EnableDlgItem: parent ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M ;Class \ *G End of GroupBox class MODULE --- NEW FILE: ScrollBar.f --- anew -ScrollBar.f WinLibrary COMCTL32.DLL needs sendmessage.f INTERNAL EXTERNAL \ ------------------------------------------------------------------------ \ *W <a name="ScrollBar"></a> \ *S ScrollBar class \ ------------------------------------------------------------------------ |Class ScrollBar <Super Control \ *G Scrollbar control \ ** Note: this is an internal class. Don't use it directly. int style Record: ScrollInfo INT cbSize INT fMask int nMin int nMax INT nPage int nPos int nTrackPos ;RecordSize: sizeof(ScrollInfo) :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style sizeof(ScrollInfo) to cbSize 0 to nMin 100 to nMax 25 to nPage 0 to npos ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. WindowStyle: super style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M : SetScrollInfo ( -- n ) 1 ScrollInfo SB_CTL hwnd Call SetScrollInfo ; : GetScrollInfo ( -- n ) ScrollInfo SB_CTL hwnd Call GetScrollInfo ; :M SetRange: ( min max -- ) to nMax to nMin SIF_RANGE to fMask SetScrollInfo to npos ;M :M GetRange: ( -- min val ) SIF_RANGE to fmask GetScrollInfo drop nmin nmax ;M :M SetPosition: ( n -- prev ) to npos SIF_POS to fmask SetScrollInfo to npos ;M :M GetPosition: ( -- n ) SIF_POS to fmask GetScrollInfo drop npos ;M :M SetPage: ( page -- ) to npage SIF_PAGE to fmask SetScrollInfo drop ;M :M GetPage: ( -- page ) SIF_PAGE to fmask GetScrollInfo drop npage ;M :M Start: ( Parent -- ) \ *G Create the control. to parent z" SCROLLBAR" create-control ;M :M SetFont: ( hndl -- ) \ *G Set the font in the control. \ ** Note that this is a dummy method in this class. drop ;M :M Enable: ( f -- ) \ *G Enable the control. ID EnableDlgItem: parent ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M ;Class \ ------------------------------------------------------------------------ \ *W <a name="HorizScroll"></a> \ *S HorizScroll class \ ------------------------------------------------------------------------ :Class HorizScroll <Super ScrollBar \ *G Scrollbar control (vorizontal). :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: SBS_HORZ. WindowStyle: super SBS_HORZ or ;M ;Class \ *G End of HorizScroll class \ ------------------------------------------------------------------------ \ *W <a name="VertScroll"></a> \ *S VertScroll class \ ------------------------------------------------------------------------ :Class VertScroll <Super ScrollBar \ *G Scrollbar control (vertical). :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: SBS_VERT. WindowStyle: super SBS_VERT or ;M ;Class \ *G End of VertScroll class \ ------------------------------------------------------------------------ \ *W <a name="SizeBox"></a> \ *S SizeBox class \ ------------------------------------------------------------------------ :Class SizeBox <Super ScrollBar \ *G Size box control. :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: SBS_SIZEGRIP. WindowStyle: super SBS_SIZEGRIP or ;M ;Class \ *G End of SizeBox class MODULE --- NEW FILE: TabControl.f --- anew -TabControl.f.f WinLibrary COMCTL32.DLL needs sendmessage.f INTERNAL EXTERNAL \ ------------------------------------------------------------------------ \ *W <a name="TabControl"></a> \ *S TabControl class \ ------------------------------------------------------------------------ :Class TabControl <Super Control \ *G Tab control. \ *P A tab control is analogous to the dividers in a notebook or the labels in a \ ** file cabinet. By using a tab control, an application can define multiple pages \ ** for the same area of a window or dialog box. Each page consists of a certain \ ** type of information or a group of controls that the application displays when \ ** the user selects the corresponding tab. Record: tc_Item \ *G The TCITEM struct. INT mask // value specifying which members to retrieve or set INT lpReserved1 // reserved; do not use INT lpReserved2 // reserved; do not use int pszText // pointer to string containing tab text int cchTextMax // size of buffer pointed to by the pszText member int iImage // index to tab control's image int lParam // application-defined data associated with tab ;Recordsize: /tc_item int style \ additional styles to add before creation int selchange-func \ selection change function int selchanging-func \ selection changing function :M IsMask: ( n -- ) \ *G Set the \i mask \d member of the TCITEM struct. Possible values are: \ *L \ *| TCIF_TEXT | The pszText member is valid. | \ *| TCIF_IMAGE | The iImage member is valid. | \ *| TCIF_PARAM | The lParam member is valid. | \ *| TCIF_RTLREADING | Displays the text of pszText using right-to-left reading order on Hebrew or Arabic systems. | to mask ;M :M Mask: ( -- n ) \ *G Get the \i mask \d member of the TCITEM struct. mask ;M :M IsPszText: ( addr -- ) \ *G Set the \i mask \d member of the TCITEM struct. to pszText ;M :M PszText: ( -- n ) \ *G Get the \i pszText \d member of the TCITEM struct. pszText ;M :M IscchTextMax: ( n -- ) \ *G Set the \i pszText \d member of the TCITEM struct. to cchTextMax ;M :M cchTextMax: ( -- n ) \ *G Get the \i cchTextmax \d member of the TCITEM struct. cchTextmax ;M :M IsiImage: ( n -- ) \ *G Set the \i iImage \d member of the TCITEM struct. to iImage ;M :M iImage: ( -- n ) \ *G Get the \i iImage \d member of the TCITEM struct. iImage ;M :M IsLparam: ( n -- ) \ *G Set the \i lparam \d member of the TCITEM struct. to lparam ;M :M LParam: ( -- n ) \ *G Get the \i lparam \d member of the TCITEM struct. lparam ;M :M Start: ( Parent -- ) \ *G Create the control. to parent z" SysTabControl32" create-control ;M \ You can cause the tabs to look like buttons by specifying the TCS_BUTTONS style. Tabs in this type of tab control \ should serve the same function as button controls; that is, clicking a tab should carry out a command instead of \ displaying a page. Because the display area in a button tab control is typically not used, no border is drawn \ around it. \ \ You can cause a tab to receive the input focus when clicked by specifying the TCS_FOCUSONBUTTONDOWN style. This \ style is typically used only with the TCS_BUTTONS style. You can specify that a tab never receives the input \ focus by using the TCS_FOCUSNEVER style. \ \ By default, a tab control displays only one row of tabs. If not all tabs can be shown at once, the tab control \ displays an up-down control so that the user can scroll additional tabs into view. You can cause a tab control \ to display multiple rows of tabs, if necessary, by specifying the TCS_MULTILINE style. In this way, all tabs can \ be displayed at once. The tabs are left-aligned within each row unless you specify the TCS_RIGHTJUSTIFY style. \ In this case, the width of each tab is increased so that each row of tabs fills the entire width of the tab control. \ \ A tab control automatically sizes each tab to fit its icon, if any, and its label. To give all tabs the same width, \ you can specify the TCS_FIXEDWIDTH style. The control sizes all the tabs to fit the widest label, or you can assign \ a specific width and height by using the TCM_SETITEMSIZE message. Within each tab, the control centers the icon and \ label with the icon to the left of the label. You can force the icon to the left, leaving the label centered, by \ specifying the TCS_FORCEICONLEFT style. You can left-align both the icon and label by using the TCS_FORCELABELLEFT \ style. You cannot use the TCS_FIXEDWIDTH style with the TCS_RIGHTJUSTIFY style. :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: TCS_FOCUSONBUTTONDOWN. WindowStyle: Super TCS_FOCUSONBUTTONDOWN or style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. Possible values are: \ *L \ *| TCS_BOTTOM | Tabs appear at the bottom of the control. This value equals TCS_RIGHT. | \ *| TCS_BUTTONS | Tabs appear as buttons, and no border is drawn around the display area. | \ *| TCS_FIXEDWIDTH | All tabs are the same width. This style cannot be combined with the TCS_RIGHTJUSTIFY style. | \ *| TCS_FLATBUTTONS | Selected tabs appear as being indented into the background while other tabs appear as being on the same plane as the background. This style only affects tab controls with the TCS_BUTTONS style. | \ *| TCS_FOCUSNEVER | The tab control does not receive the input focus when clicked. | \ *| TCS_FOCUSONBUTTONDOWN | The tab control receives the input focus when clicked. | \ *| TCS_FORCEICONLEFT | Icons are aligned with the left edge of each fixed-width tab. This style can only be used with the TCS_FIXEDWIDTH style. | \ *| TCS_FORCELABELLEFT | Labels are aligned with the left edge of each fixed-width tab; that is, the label is displayed immediately to the right of the icon instead of being centered. | \ *| TCS_HOTTRACK | Items under the pointer are automatically highlighted. You can check whether or not hot tracking is enabled by calling SystemParametersInfo. | \ *| TCS_MULTILINE | Multiple rows of tabs are displayed, if necessary, so all tabs are visible at once. | \ *| TCS_MULTISELECT | Multiple tabs can be selected by holding down CTRL when clicking. This style must be used with the TCS_BUTTONS style. | \ *| TCS_OWNERDRAWFIXED | The parent window is responsible for drawing tabs. | \ *| TCS_RAGGEDRIGHT | Rows of tabs will not be stretched to fill the entire width of the control. This style is the default. | \ *| TCS_RIGHT | Tabs appear vertically on the right side of controls that use the TCS_VERTICAL style. This value equals TCS_BOTTOM. | \ *| TCS_RIGHTJUSTIFY | The width of each tab is increased, if necessary, so that each row of tabs fills the entire width of the tab control. | \ *| TCS_SCROLLOPPOSITE | Unneeded tabs scroll to the opposite side of the control when a tab is selected. | \ *| TCS_SINGLELINE | Only one row of tabs is displayed. The user can scroll to see more tabs, if necessary. This style is the default. | \ *| TCS_TABS | Tabs appear as tabs, and a border is drawn around the display area. This style is the default. | \ *| TCS_TOOLTIPS | The tab control has a tooltip control associated with it. | \ *| TCS_VERTICAL | Tabs appear at the left side of the control, with tab text displayed vertically. This style is valid only when used with the TCS_MULTILINE style. To make tabs appear on the right side of the control, also use the TCS_RIGHT style. | to style ;M :M TC_Item: ( -- addr ) \ *G Get the address of the TCITEM struct. tc_item ;M :M InsertTab: ( index -- ) \ *G Inserts a new tab into the tab control. \ *P \i mask \d and other members of the TCITEM struct must be set. tc_item swap TCM_INSERTITEM SendMessage:Self drop ;M :M GetTabInfo: ( index -- ) \ *G Retrieves information about a tab in the tab control. tc_item swap TCM_GETITEM SendMessage:Self ?win-error ;M :M SetTabInfo: ( index -- ) \ *G Sets some or all of a tab's attributes. \ *P \i mask \d and other members of the TCITEM struct must be set. tc_item swap TCM_SETITEM SendMessage:Self ?win-error ;M :M GetTabCount: ( -- n ) \ *G Retrieves the number of tabs in the tab control. 0 0 TCM_GETITEMCOUNT SendMessage:Self ;M :M DeleteTab: ( index -- ) \ *G Removes an item from the tab control. 0 swap TCM_DELETEITEM SendMessage:Self ?win-error ;M :M DeleteAllTabs: ( -- ) \ *G Removes all items from the tab control. 0 0 TCM_DELETEALLITEMS SendMessage:Self ?win-error ;M :M AdjustRect: ( rect flag -- ) \ *G Calculates a tab control's display area given a window rectangle, or \ ** calculates the window rectangle that would correspond to a specified \ ** display area. \ *P \i rect \d is the address of a RECT structure that specifies the given rectangle \ ** and receives the calculated rectangle. \ *P \i flag \d If this parameter is TRUE, prc specifies a display rectangle and receives \ ** the corresponding window rectangle. If this parameter is FALSE, prc specifies a window \ ** rectangle and receives the corresponding display area. TCM_ADJUSTRECT SendMessage:self drop ;M :M ClientSize: ( -- x y w h ) \ *G Return size of display area of the tab control. TempRect.addrof GetClientRect: self Temprect.addrof false AdjustRect: self temprect.left temprect.top temprect.right temprect.bottom ;M :M WindowSize: ( 0 0 width height -- x y w h ) \ *G Given display area return window size required. SetRect: Temprect Temprect true AdjustRect: self temprect.left temprect.top temprect.right temprect.bottom ;M :M GetSelectedTab: ( -- index ) \ *G Determines the currently selected tab in the tab control. 0 0 TCM_GETCURSEL SendMessage:self ;M :M SetSelectedTab: ( index -- ) \ *G Selects a tab in the tab control. \ *P Note: A tab control does not send a TCN_SELCHANGING or TCN_SELCHANGE \ ** notification message when a tab is selected using this message. 0 swap TCM_SETCURSEL SendMessage:self drop ;M :M GetRowCount: ( -- n ) \ *G Retrieves the current number of rows of tabs in a tab control. 0 0 TCM_GETROWCOUNT SendMessage:self ;M :M AutoSize: ( -- ) \ *G Resize the control to fit in the client area of the parent window. tempRect.AddrOf GetClientRect: Parent 0 0 Right: tempRect Bottom: tempRect \ x,y,h,w Move: self ;M :M Enable: ( f -- ) \ *G Enable the control. ID EnableDlgItem: parent ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M :M Setfont: ( handle -- ) \ *G Set the font in the control. 1 swap WM_SETFONT SendMessage:Self drop ;M :M WindowTitle: ( -- null$ ) \ *G SintillaControl asks for window title of parent z" " ;M :M Handle_Notify: { w l \ ncode tabid -- f } \ *G Handle the notification messages of the tab control. This method must \ ** be called within the WM_NOTIFY handler of the parent window. \ *P Currently only these notification messages are handled: \ *L \ *| TCN_SELCHANGE | Notifies a tab control's parent window that the currently selected tab has changed. | \ *| TCN_SELCHANGING | Notifies a tab control's parent window that the currently selected tab is about to change. | w LOWORD to tabID l 2 cells+ @ to ncode ncode case TCN_SELCHANGE of l On_SelChanged: [ self ] endof TCN_SELCHANGING of l On_SelChanging: [ self ] endof false swap \ default endcase ;M :M On_SelChanged: ( l -- f ) \ *G Handle the TCN_SELCHANGE notification message. \ ** Default calls the \i change function \d set with the \i IsChangeFunc: \d method. self selchange-func dup 0= abort" SelChanged function not set!" execute ;M :M On_SelChanging: ( l -- f ) \ *G Handle the TCN_SELCHANGING notification message. \ ** Default calls the \i changeing function \d set with the \i IsChangingFunc: \d method. self selchanging-func dup 0= abort" SelChanging function not set!" execute ;M :M IsChangeFunc: ( cfa -- ) \ *G Set the \i change function \d. This function es executed when \ ** the currently selected tab has changed. to selchange-func ;M :M IsChangingFunc: ( cfa -- ) \ *G Set the \i changeing function \d. This function es executed when \ ** the currently selected tab is about to change. to selchanging-func ;M : default-func ( lParam obj -- false ) \ *G The default \i change(-ing) function \d. \ *P \i lParam \d is the adress of the Address of an NMHDR structure. \ ** \i obj \d is the address of the TabControl object that has send the \ ** notification message. 2drop false ; :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: Super 0 to style tc_item /tc_item erase -1 to iImage \ default no image ['] default-func to selchange-func ['] default-func to selchanging-func ;M ;Class \ *G End of TabControl class \ *P For a demo how to use the TabControl see: TabControlDemo.f MODULE --- NEW FILE: Label.f --- anew -Label.f WinLibrary COMCTL32.DLL needs sendmessage.f INTERNAL EXTERNAL \ ------------------------------------------------------------------------ \ *W <a name="Label"></a> \ *S Label class \ ------------------------------------------------------------------------ :Class Label <super StaticControl \ *G Class for static controls int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. WindowStyle: super style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M Setfont: ( handle -- ) \ *G Set the font in the control. 1 swap WM_SETFONT SendMessage:Self drop ;M :M Enable: ( f -- ) \ *G Enable the control. ID EnableDlgItem: parent ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M ;Class \ *G End of Label class \ ------------------------------------------------------------------------ \ *W <a name="StaticImage"></a> \ *S StaticImage class \ ------------------------------------------------------------------------ |Class StaticImage <Super Label \ *G Base class for static control showing an image. \ ** This is an internal class; don't use it directly. :M ImageType: ( -- ImageType ) \ *G Get the image type of the control. \i ImageType \d is IMAGE_BITMAP. IMAGE_BITMAP ;M :M GetImage: ( -- hImage ) \ *G Retrieve a handle to the image associated with the control. 0 ImageType: [ self ] STM_GETIMAGE SendMessage:Self ;M :M SetImage: ( hImage -- ) \ *G Associate a new image (icon or bitmap) with the control. GetImage: self over <> if ImageType: [ self ] STM_SETIMAGE SendMessage:Self DROP else drop then ;M :M SetFont: ( fhndl -- ) \ *G Set the font in the control. drop ;M ;Class \ *G End of StaticImage class \ ------------------------------------------------------------------------ \ *W <a name="StaticBitmap"></a> \ *S StaticBitmap class \ ------------------------------------------------------------------------ :Class StaticBitmap <Super StaticImage \ *G Static control showing a bitmap. :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: SS_BITMAP. WindowStyle: super SS_BITMAP OR ;M ;Class \ *G End of StaticImage class \ ------------------------------------------------------------------------ \ *W <a name="StaticIcon"></a> \ *S StaticIcon class \ ------------------------------------------------------------------------ :Class StaticIcon <Super StaticImage \ *G Static control showing an icon. :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: SS_ICON. WindowStyle: super SS_ICON OR ;M :M ImageType: ( -- ImageType ) \ *G Get the image type of the control. \i ImageType \d is IMAGE_ICON. IMAGE_ICON ;M ;Class \ *G End of StaticIcon class \ ------------------------------------------------------------------------ \ *W <a name="StaticMetafile"></a> \ *S StaticMetafile class \ ------------------------------------------------------------------------ :Class StaticMetafile <Super StaticImage \ *G Static control showing an enhanced metafile. :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: SS_ENHMETAFILE. WindowStyle: super SS_ENHMETAFILE OR ;M :M ImageType: ( -- ImageType ) \ *G Get the image type of the control. \i ImageType \d is IMAGE_ENHMETAFILE. IMAGE_ENHMETAFILE ;M ;Class \ *G End of StaticMetafile class \ ------------------------------------------------------------------------ \ *W <a name="StaticFrame"></a> \ *S StaticFrame class \ ------------------------------------------------------------------------ :Class StaticFrame <Super Label \ *G Static control showing a frame. :M BlackRect: ( -- ) \ *G Rectangle in the window frame color (default is black). WindowStyle: super SS_BLACKRECT OR SetStyle: self ;M :M GrayRect: ( -- ) \ *G Rectangle in the screen background color (default is gray). WindowStyle: super SS_GRAYRECT OR SetStyle: self ;M :M WhiteRect: ( -- ) \ *G Rectangle in the window background color (default is white). WindowStyle: super SS_WHITERECT OR SetStyle: self ;M :M BlackFrame: ( -- ) \ *G Frame in the window frame color (default is black). WindowStyle: super SS_BLACKFRAME OR SetStyle: self ;M :M GrayFrame: ( -- ) \ *G Frame in the screen background color (default is gray). WindowStyle: super SS_GRAYFRAME OR SetStyle: self ;M :M WhiteFrame: ( -- ) \ *G Frame in the window background color (default is white). WindowStyle: super SS_WHITEFRAME OR SetStyle: self ;M :M EtchedFrame: ( -- ) \ *G draws an etched frame (frame appears lower than background) WindowStyle: super SS_ETCHEDFRAME OR SetStyle: self ;M :M SunkenFrame: ( -- ) \ *G Draws frame with half-sunken border. WindowStyle: super SS_SUNKEN OR SetStyle: self ;M ;Class \ *G End of StaticFrame class MODULE --- NEW FILE: ListBox.f --- anew -ListBox.f WinLibrary COMCTL32.DLL needs sendmessage.f INTERNAL EXTERNAL \ ------------------------------------------------------------------------ \ *W <a name="ComboBox"></a> \ *S ComboBox class \ ------------------------------------------------------------------------ :Class ComboBox <super ComboControl \ *G ComboBox control \ ** (enhanced Version of the ComboControl class) int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. WindowStyle: super style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M SetDir: ( dirz$ attrib -- ) \ *G Add the names of directories and files that match a specified string and \ ** set of file attributes. SetDir: can also add mapped drive letters to the list. \ *P \i attrib \d Specifies the attributes of the files or directories to be added to \ ** the combo box. This parameter can be one or more of the following values: \ *L \ *| DDL_ARCHIVE | Includes archived files. | \ *| DDL_DIRECTORY | Includes subdirectories, which are enclosed in square brackets ([ ]). | \ *| DDL_DRIVES All | mapped drives are added to the list. Drives are listed in the form [-x-], where x is the drive letter. | \ *| DDL_EXCLUSIVE | Includes only files with the specified attributes. By default, read-write files are listed even if DDL_READWRITE is not specified. | \ *| DDL_HIDDEN | Includes hidden files. | \ *| DDL_READONLY | Includes read-only files. | \ *| DDL_READWRITE | Includes read-write files with no additional attributes. This is the default. | \ *| DDL_SYSTEM | Includes system files. | \ *P \i dirz$ \d specifies an absolute path, relative path, or file name. An absolute path \ ** can begin with a drive letter (for example, d:\) or a UNC name (for example, \\machinename\sharename). \ ** If the string specifies a file name or directory that has the attributes specified by \ ** the wParam parameter, the file name or directory is added to the list. If the file name \ ** or directory name contains wildcard characters (? or *), all files or directories that \ ** match the wildcard expression and have the attributes specified by the wParam parameter \ ** are added to the list displayed in the combo box. CB_DIR SendMessage:Self drop ;M :M AddStringTo: ( z"string" -- ) \ *G Add a string to the list box of a combo box. If the combo box does not have the \ ** CBS_SORT style, the string is added to the end of the list. Otherwise, the string \ ** is inserted into the list, and the list is sorted. 0 CB_ADDSTRING SendMessage:Self drop ;M :M SetSelection: ( n -- ) \ *G Select a string in the list of a combo box. 0 swap CB_SETCURSEL SendMessage:Self drop ;M :M GetSelectedString: ( -- addr cnt ) \ *G Get the selected from the combo box. \ ** Note: The string is returned in the global \i NEW$ \d. 0 0 CB_GETCURSEL SendMessage:Self new$ dup rot CB_GETLBTEXT SendMessage:Self ;M :M Setfont: ( handle -- ) \ *G Set the font in the control. 1 swap WM_SETFONT SendMessage:Self drop ;M :M InsertStringAt: ( lpszString posn -- ) \ *G Insert string at the specified position. \ *P \i posn \d specifies the zero-based index of the position at which to insert \ ** the string. If this parameter is -1, the string is added to the end of the list. \ *P \i lpszString \d is a null-terminated string to be inserted. CB_INSERTSTRING SendMessage:Self CB_ERR OVER = SWAP CB_ERRSPACE = OR ABORT" Error adding string to combo box" ;M :M DeleteString: ( index -- ) \ *G Delete a string. \ *P \i index \d specifies the zero-based index of the string to delete. 0 SWAP CB_DELETESTRING SendMessage:Self DROP ;M :M Clear: ( -- ) \ *G Remove all strings from the combo box 0 0 CB_RESETCONTENT SendMessage:Self DROP ;M :M Find: ( lpszString -- index ) \ *G Search the list for an item beginning with the string (case-insensitive) -1 CB_FINDSTRING SendMessage:Self ;M :M FindExact: ( lpszString -- index ) \ *G Find the first item that matches the string exactly (case-insensitive) -1 CB_FINDSTRINGEXACT SendMessage:Self ;M :M GetCount: ( -- n ) \ *G Return count of items in list 0 0 CB_GETCOUNT SendMessage:Self ;M :M SelectString: ( lpszString -- index ) \ *G Select item beginning with string -1 CB_SELECTSTRING SendMessage:Self ;M :M GetStringAt: ( index -- a n ) \ *G Return string of specified item. \ TODO: Don't use HERE here !!! HERE SWAP CB_GETLBTEXT SendMessage:Self HERE SWAP ;M :M GetCurrent: ( -- index ) \ *G return current selection item 0 0 CB_GETCURSEL SendMessage:Self ;M :M Enable: ( f -- ) \ *G Enable the control. ID EnableDlgItem: parent ;M :M Disable: ( -- ) \ *G Disable the control. false Enable: self ;M ;Class \ *G End of ComboBox class \ ------------------------------------------------------------------------ \ *W <a name="ComboListBox"></a> \ *S ComboListBox class \ ------------------------------------------------------------------------ :Class ComboListBox <super ComboBox \ *G ComboBox list control :M WindowStyle: ( -- style ) \ *G Get the window style of the control. The default style is: CBS_DROPDOWNLIST WindowStyle: SUPER CBS_DROPDOWNLIST OR ;M :M Start: ( Parent -- ) \ *G Create the control. \ We don't want the editcontrol in this control to be subclassed as with \ super class. It shows the ibeam cursor so we override the start method. TO Parent z" COMBOBOX" Create-Control ;M ;Class \ *G End of ComboListBox class \ ------------------------------------------------------------------------ \ *W <a name="ListBox"></a> \ *S ListBox class \ ------------------------------------------------------------------------ :Class ListBox <super ListControl \ *G ListBox control (single selection) \ ** (enhanced Version of the ListControl class) int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. WindowStyle: super style or ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M SetDir: ( dirz$ attrib -- ) \ *G Add the names of directories and files that match a specified string and \ ** set of file attributes. SetDir: can also add mapped drive letters to the list. \ *P \i attrib \d Specifies the attributes of the files or directories to be added to \ ** the combo box. This parameter can be one or more of the following values: \ *L \ *| DDL_ARCHIVE | Includes archived files. | \ *| DDL_DIRECTORY | Includes subdirectories, which are enclosed in square brackets ([ ]). | \ *| DDL_DRIVES All | mapped drives are added to the list. Drives are listed in the form [-x-], where x is the drive letter. | \ *| DDL_EXCLUSIVE | Includes only files with the specified attributes. By default, read-write files are listed even if DDL_READWRITE is not specified. | \ *| DDL_HIDDEN | Includes hidden files. | \ *| DDL_READONLY | Includes read-only files. | \ *| DDL_READWRITE | Includes read-write files with no additional attributes. This is the default. | \ *| DDL_SYSTEM | Includes system files. | \ *P \i dirz$ \d specifies an absolute path, relative p... [truncated message content] |
From: Rod O. <rod...@us...> - 2006-06-06 02:53:14
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17440/src/lib Modified Files: RebarControl.f Log Message: Rod: Load Common Controls in Start: method, added On_Done: method Index: RebarControl.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/RebarControl.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RebarControl.f 4 Jun 2006 21:13:02 -0000 1.3 --- RebarControl.f 5 Jun 2006 16:53:52 -0000 1.4 *************** *** 43,48 **** :M ClassInit: ( -- ) ClassInit: super - \ Make sure Common Controls are loaded - ICC_COOL_CLASSES 8 sp@ Call InitCommonControlsEx 3drop Eraseband-info ;M --- 43,46 ---- *************** *** 68,72 **** ;Record ! :M HitTest: ( -- iBand ) hWnd get-mouse-XY to y to x RBHITTESTINFO 0 RB_HITTEST SendMessage:Self ;M --- 66,70 ---- ;Record ! :M HitTest: ( -- uBand ) hWnd get-mouse-XY to y to x RBHITTESTINFO 0 RB_HITTEST SendMessage:Self ;M *************** *** 78,87 **** :M InsertBand: ( -- ) -1 InsertBandAt: self ;M \ band info should have been set ! :M MaximizeBand: ( fIdeal iBand -- ) RB_MAXIMIZEBAND SendMessage:SelfDrop ;M ! :M MinimizeBand: ( iBand -- ) 0 swap RB_MINIMIZEBAND SendMessage:SelfDrop ;M :M SetBarInfo: ( himl fmask -- ) 12 sp@ 0 RB_SETBARINFO SendMessage:SelfDrop 3drop ;M :M Start: ( Parent -- ) hWnd --- 76,87 ---- :M InsertBand: ( -- ) -1 InsertBandAt: self ;M \ band info should have been set ! :M MaximizeBand: ( fIdeal uBand -- ) RB_MAXIMIZEBAND SendMessage:SelfDrop ;M ! :M MinimizeBand: ( uBand -- ) 0 swap RB_MINIMIZEBAND SendMessage:SelfDrop ;M :M SetBarInfo: ( himl fmask -- ) 12 sp@ 0 RB_SETBARINFO SendMessage:SelfDrop 3drop ;M + :M ShowBand: ( f uBand -- ) RB_SHOWBAND SendMessage:SelfDrop ;M + :M Start: ( Parent -- ) hWnd *************** *** 90,96 **** --- 90,107 ---- else to Parent + \ Make sure Common Controls are loaded + ICC_COOL_CLASSES 8 sp@ Call InitCommonControlsEx 3drop z" ReBarWindow32" Create-Control 0 0 SetBarInfo: self then ;M + + :M On_Done: ( -- ) ;M + + :M WM_DESTROY ( h m w l -- res ) + On_Done: [ self ] + old-wndproc CallWindowProc + 0 to hWnd ;M + + (( \ Not yet used/tested *************** *** 113,117 **** :M SetTextColor: ( clrText -- ) 0 RB_SETTEXTCOLOR SendMessage:SelfDrop ;M :M SetToolTips: ( hwndToolTip -- ) 0 swap RB_SETTOOLTIPS SendMessage:SelfDrop ;M - :M ShowBand: ( f i -- ) RB_SHOWBAND SendMessage:SelfDrop ;M :M SizeToRect: ( rect -- ) 0 RB_SIZETORECT SendMessage:SelfDrop ;M )) --- 124,127 ---- |
Update of /cvsroot/win32forth/win32forth/doc/classes In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7998/doc/classes Modified Files: AXControl.htm Childwnd.htm Control.htm Controls.htm Dialog.htm File.htm Generic.htm HTMLcontrol.htm MdiDialog.htm TrayWindow.htm Window.htm gdiBase.htm gdiBitmap.htm gdiBrush.htm gdiDC.htm gdiFont.htm gdiMetafile.htm gdiMetafileDC.htm gdiPen.htm gdiStruct.htm gdiWindowDc.htm mdi.htm Log Message: DexH documentation updated to refelect the latest changes. Index: Childwnd.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/Childwnd.htm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Childwnd.htm 9 May 2006 16:18:48 -0000 1.8 --- Childwnd.htm 5 Jun 2006 09:28:42 -0000 1.9 *************** *** 20,41 **** </h2><pre><b><a name="0">:CLASS Child-Window <Super Window </a></b></pre><p>Child-Window is the base class for all child windows. ! </p><p>The windows have a parent, which is the object address, ! not the window handle. This allows the child to send messages ! to its parent. ! </p><pre><b><a name="1">:M GetParent: ( -- parent ) </a></b></pre><p>Get the object address of the parent window. ! </p><pre><b><a name="2">:M SetID: ( n -- ) ! </a></b></pre><p>Set the ID for this child window ! </p><pre><b><a name="3">:M GetID: ( -- n ) ! </a></b></pre><p>Get the ID for this child window ! </p><pre><b><a name="4">:M WindowStyle: ( -- style ) </a></b></pre><p>User windows should override the WindowStyle: method to set the window style. Default is WS_CHILD and WS_VISIBLE. ! </p><pre><b><a name="5">:M WindowTitle: ( -- Zstring ) </a></b></pre><p>User windows should override the WindowTitle: method to set the window caption. Default is "". ! </p><pre><b><a name="6">:M Start: ( Parent -- ) ! </a></b></pre><p>Create the child window. ! </p><pre><b><a name="7">;Class </a></b></pre><p>End of Child-Window class </p><hr><p>Document $Id$</p> --- 20,46 ---- </h2><pre><b><a name="0">:CLASS Child-Window <Super Window </a></b></pre><p>Child-Window is the base class for all child windows. ! </p><p>The windows has a parent, which is the object address, ! not the window handle. This allows the child to send ! messages to its parent. ! </p><pre><b><a name="1">:M ClassInit: ( -- ) ! </a></b></pre><p>Initialise the class. ! </p><pre><b><a name="2">:M SetParent: ( parent -- ) ! </a></b></pre><p>Set the object address of the parent window. ! </p><pre><b><a name="3">:M GetParent: ( -- parent ) </a></b></pre><p>Get the object address of the parent window. ! </p><pre><b><a name="4">:M SetID: ( n -- ) ! </a></b></pre><p>Set the ID for this child window. ! </p><pre><b><a name="5">:M GetID: ( -- n ) ! </a></b></pre><p>Get the ID for this child window. ! </p><pre><b><a name="6">:M WindowStyle: ( -- style ) </a></b></pre><p>User windows should override the WindowStyle: method to set the window style. Default is WS_CHILD and WS_VISIBLE. ! </p><pre><b><a name="7">:M WindowTitle: ( -- Zstring ) </a></b></pre><p>User windows should override the WindowTitle: method to set the window caption. Default is "". ! </p><pre><b><a name="8">:M Start: ( Parent -- ) ! </a></b></pre><p>Create this child window. Parent is the object address of the ! parent window. ! </p><pre><b><a name="9">;Class </a></b></pre><p>End of Child-Window class </p><hr><p>Document $Id$</p> Index: mdi.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/mdi.htm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mdi.htm 8 Feb 2006 14:26:34 -0000 1.7 --- mdi.htm 5 Jun 2006 09:28:42 -0000 1.8 *************** *** 112,116 **** </p><a name="MDIChildWindow"></a> <h2>MDI Child window class ! </h2><pre><b><a name="28">:Class MDIChildWindow <super Window </a></b></pre><p>This is the base class for all windows that should be displayed within the client area of a MDIFrameWindow. --- 112,116 ---- </p><a name="MDIChildWindow"></a> <h2>MDI Child window class ! </h2><pre><b><a name="28">:Class MDIChildWindow <super child-window </a></b></pre><p>This is the base class for all windows that should be displayed within the client area of a MDIFrameWindow. Index: Window.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/Window.htm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Window.htm 28 May 2006 09:50:12 -0000 1.15 --- Window.htm 5 Jun 2006 09:28:42 -0000 1.16 *************** *** 23,27 **** </a></b></pre><p>Initialise the class. </p><h3>Window sizing ! </h3><pre><b><a name="2">:M GetSize: ( -- w h ) </a></b></pre><p>Get the size (width and height) of the window. </p><pre><b><a name="3">:M Width: ( -- width ) --- 23,27 ---- </a></b></pre><p>Initialise the class. </p><h3>Window sizing ! </h3><pre><b><a name="2">:M GetSize: ( --width height ) </a></b></pre><p>Get the size (width and height) of the window. </p><pre><b><a name="3">:M Width: ( -- width ) *************** *** 29,36 **** </p><pre><b><a name="4">:M Height: ( -- height ) </a></b></pre><p>Get the height of the window. ! </p><pre><b><a name="5">:M SetSize: ( w h -- ) ! </a></b></pre><p>Set the size (width and height) of the window. <br /> Note: The window itself will not be resized. ! </p><pre><b><a name="6">:M On_Size: ( -- ) </a></b></pre><p>User windows should override the On_Size: method. When this method is called, the variables Width and Height will have already been set. <br /> --- 29,36 ---- </p><pre><b><a name="4">:M Height: ( -- height ) </a></b></pre><p>Get the height of the window. ! </p><pre><b><a name="5">:M SetSize: ( width height -- ) ! </a></b></pre><p>Set the size of the window. <br /> Note: The window itself will not be resized. ! </p><pre><b><a name="6">:M On_Size: ( wParam -- ) </a></b></pre><p>User windows should override the On_Size: method. When this method is called, the variables Width and Height will have already been set. <br /> *************** *** 112,152 **** </p><pre><b><a name="19">:M GetClassName: ( -- addr len ) </a></b></pre><p>Get the window class name. ! </p><pre><b><a name="20">:M SetParent: ( Parent -- ) ! </a></b></pre><p>Set owner window (0 if no parent). ! Note: The parent is the object address of the parent window ! class not the window handle. ! </p><pre><b><a name="21">:M ParentWindow: ( -- Parent | 0 if no parent ) ! </a></b></pre><p>Get owner window. ! Note: The parent is the object address of the parent window ! class not the window handle. ! </p><pre><b><a name="22">:M DefaultCursor: ( -- cursor-id ) </a></b></pre><p>User windows should override the DefaultCursor: method to set the default cursor for window. Default is IDC_ARROW. ! </p><pre><b><a name="23">:M DefaultIcon: ( -- hIcon ) </a></b></pre><p>User windows should override the WindowStyle: method to set the default icon handle for window. Default is the W32F icon. ! </p><pre><b><a name="24">:M WindowStyle: ( -- style ) </a></b></pre><p>User windows should override the WindowStyle: method to set the window style. Default is WS_OVERLAPPEDWINDOW. ! </p><pre><b><a name="25">:M ExWindowStyle: ( -- extended_style ) </a></b></pre><p>User windows should override the ExWindowStyle: method to set the extended window style. Default is NULL. ! </p><pre><b><a name="26">:M WindowTitle: ( -- Zstring ) </a></b></pre><p>User windows should override the WindowTitle: method to set the window caption. Default is "Window". </p><h3>Painting ! </h3><pre><b><a name="27">WinDC dc </a></b></pre><p>The window's device context. <br /> It will be valid only when handling the WM_PAINT message (see On_Paint: method) ! </p><pre><b><a name="28">Record: &ps </a></b></pre><p>The PAINTSTRUCT for Begin- and EndPaint <br /> It will be valid only when handling the WM_PAINT message (see On_Paint: method) ! </p><pre><b><a name="29">:M On_EraseBackground: ( hwnd msg wparam lparam -- res ) </a></b></pre><p>User windows should override the On_EraseBackground: method to handle WM_ERASEBKGND messages. <br /> Default does nothing. ! </p><pre><b><a name="30">:M On_Paint: ( -- ) </a></b></pre><p>User windows should override the On_Paint: method to handle WM_PAINT messages. <br /> Before this method is called BeginPaint will be called so that the PAINTSTRUCT --- 112,154 ---- </p><pre><b><a name="19">:M GetClassName: ( -- addr len ) </a></b></pre><p>Get the window class name. ! </p><pre><b><a name="20">:M SetParentWindow: ( hWndParent -- ) ! </a></b></pre><p>Set handle of the owner window (0 if no parent). ! </p><pre><b><a name="21">:M GetParentWindow: ( -- hWndParent ) ! </a></b></pre><p>Get the handle of the owner window (0 if no parent). ! </p><pre><b><a name="22">:M SetParent: ( hWndParent -- ) ! </a></b></pre><p>Set handle of the owner window (0 if no parent). ! </p><p>NOTE: This method is depreacted. Use SetParentWindow: instead. ! </p><pre><b><a name="23">:M ParentWindow: ( -- hWndParent ) ! </a></b></pre><p>Get the handle of the owner window (0 if no parent). ! </p><p>NOTE: This method is depreacted. Use GetParentWindow: instead. ! </p><pre><b><a name="24">:M DefaultCursor: ( -- cursor-id ) </a></b></pre><p>User windows should override the DefaultCursor: method to set the default cursor for window. Default is IDC_ARROW. ! </p><pre><b><a name="25">:M DefaultIcon: ( -- hIcon ) </a></b></pre><p>User windows should override the WindowStyle: method to set the default icon handle for window. Default is the W32F icon. ! </p><pre><b><a name="26">:M WindowStyle: ( -- style ) </a></b></pre><p>User windows should override the WindowStyle: method to set the window style. Default is WS_OVERLAPPEDWINDOW. ! </p><pre><b><a name="27">:M ExWindowStyle: ( -- extended_style ) </a></b></pre><p>User windows should override the ExWindowStyle: method to set the extended window style. Default is NULL. ! </p><pre><b><a name="28">:M WindowTitle: ( -- Zstring ) </a></b></pre><p>User windows should override the WindowTitle: method to set the window caption. Default is "Window". </p><h3>Painting ! </h3><pre><b><a name="29">WinDC dc </a></b></pre><p>The window's device context. <br /> It will be valid only when handling the WM_PAINT message (see On_Paint: method) ! </p><pre><b><a name="30">Record: &ps </a></b></pre><p>The PAINTSTRUCT for Begin- and EndPaint <br /> It will be valid only when handling the WM_PAINT message (see On_Paint: method) ! </p><pre><b><a name="31">:M On_EraseBackground: ( hwnd msg wparam lparam -- res ) </a></b></pre><p>User windows should override the On_EraseBackground: method to handle WM_ERASEBKGND messages. <br /> Default does nothing. ! </p><pre><b><a name="32">:M On_Paint: ( -- ) </a></b></pre><p>User windows should override the On_Paint: method to handle WM_PAINT messages. <br /> Before this method is called BeginPaint will be called so that the PAINTSTRUCT *************** *** 157,175 **** Default does nothing. </p><h3>Menu support ! </h3><pre><b><a name="31">:M WindowHasMenu: ( -- flag ) </a></b></pre><p>Flag is true if the window has a menu. Override this method if your window has a menu. Default is false. </p><h3>Cursor (caret) support ! </h3><pre><b><a name="32">:M MoveCursor: ( gx gy -- ) </a></b></pre><p>Move the caret. ! </p><pre><b><a name="33">:M MakeCursor: ( gx gy width height -- ) </a></b></pre><p>Create the caret. ! </p><pre><b><a name="34">:M DestroyCursor: ( -- ) </a></b></pre><p>Destroy the caret. ! </p><pre><b><a name="35">:M ShowCursor: ( -- ) </a></b></pre><p>Show the caret. ! </p><pre><b><a name="36">:M HideCursor: ( -- ) </a></b></pre><p>Hide the caret. ! </p><pre><b><a name="37">:M On_SetFocus: ( h m w l -- ) </a></b></pre><p>Override the method to handle the WM_SETFOCUS message. <br /> Example: When cursor is used, you will need something like the following --- 159,177 ---- Default does nothing. </p><h3>Menu support ! </h3><pre><b><a name="33">:M WindowHasMenu: ( -- flag ) </a></b></pre><p>Flag is true if the window has a menu. Override this method if your window has a menu. Default is false. </p><h3>Cursor (caret) support ! </h3><pre><b><a name="34">:M MoveCursor: ( gx gy -- ) </a></b></pre><p>Move the caret. ! </p><pre><b><a name="35">:M MakeCursor: ( gx gy width height -- ) </a></b></pre><p>Create the caret. ! </p><pre><b><a name="36">:M DestroyCursor: ( -- ) </a></b></pre><p>Destroy the caret. ! </p><pre><b><a name="37">:M ShowCursor: ( -- ) </a></b></pre><p>Show the caret. ! </p><pre><b><a name="38">:M HideCursor: ( -- ) </a></b></pre><p>Hide the caret. ! </p><pre><b><a name="39">:M On_SetFocus: ( h m w l -- ) </a></b></pre><p>Override the method to handle the WM_SETFOCUS message. <br /> Example: When cursor is used, you will need something like the following *************** *** 178,216 **** cursor-row char-height * char-width char-height MakeCursor: self ! </pre><pre><b><a name="38">:M On_KillFocus: ( h m w l -- ) </a></b></pre><p>Override the method to handle the WM_KILLFOCUS message. <br /> Example: Use only when you are displaying a cursor in the window: </p><pre> DestroyCursor: self </pre><h3>Keyboard and mouse handling ! </h3><pre><b><a name="39">:M PushKey: ( c1 -- ) </a></b></pre><p>override to process keys yoruself. </p><h3>Message handling ! </h3><pre><b><a name="40">:M Win32Forth: ( h m w l -- ) </a></b></pre><p>If you define an application specific window class or window object that redefines the method Win32Forth: to perform its own function rather than just doing a beep, then your window will be able to handle interprocess messages. ! </p><pre><b><a name="41">:M DefWindowProc: ( h m w l -- res ) </a></b></pre><p>Call the DefaultWindowProc for the window. </p><h3>everything else... ! </h3><pre><b><a name="42">:M CenterWindow: ( -- x y ) </a></b></pre><p>Calculate the position of the window to center it in the middle of it's parent window. When the windows has no parent it will be placed in the middle of the primary display monitor. ! </p><pre><b><a name="43">:M Enable: ( f1 -- ) </a></b></pre><p>Enable or disable the window. ! </p><pre><b><a name="44">:M GetWindowRect: ( -- left top right bottom ) </a></b></pre><p>The GetWindowRect method retrieves the dimensions of the bounding rectangle of the window. ! The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. ! </p><pre><b><a name="45">:M SetTitle: { adr len \ temp$ -- } </a></b></pre><p>Set the window title. ! </p><pre><b><a name="46">;CLASS </a></b></pre><p>End of window class. </p><h2>Helper words outside the class ! </h2><pre><b><a name="47">: find-window ( z"a1 -- hWnd ) \ w32f </a></b></pre><p>Find a window. ! </p><pre><b><a name="48">: send-window ( lParam wParam Message_ID hWnd -- ) \ w32f </a></b></pre><p>Send a message to a window. ! </p><pre><b><a name="49">: LoadIconFile ( adr len -- hIcon ) \ w32f </a></b></pre><p>Load an icon from an icon file. </p><hr><p>Document $Id$</p> --- 180,218 ---- cursor-row char-height * char-width char-height MakeCursor: self ! </pre><pre><b><a name="40">:M On_KillFocus: ( h m w l -- ) </a></b></pre><p>Override the method to handle the WM_KILLFOCUS message. <br /> Example: Use only when you are displaying a cursor in the window: </p><pre> DestroyCursor: self </pre><h3>Keyboard and mouse handling ! </h3><pre><b><a name="41">:M PushKey: ( c1 -- ) </a></b></pre><p>override to process keys yoruself. </p><h3>Message handling ! </h3><pre><b><a name="42">:M Win32Forth: ( h m w l -- ) </a></b></pre><p>If you define an application specific window class or window object that redefines the method Win32Forth: to perform its own function rather than just doing a beep, then your window will be able to handle interprocess messages. ! </p><pre><b><a name="43">:M DefWindowProc: ( h m w l -- res ) </a></b></pre><p>Call the DefaultWindowProc for the window. </p><h3>everything else... ! </h3><pre><b><a name="44">:M CenterWindow: ( -- x y ) </a></b></pre><p>Calculate the position of the window to center it in the middle of it's parent window. When the windows has no parent it will be placed in the middle of the primary display monitor. ! </p><pre><b><a name="45">:M Enable: ( f1 -- ) </a></b></pre><p>Enable or disable the window. ! </p><pre><b><a name="46">:M GetWindowRect: ( -- left top right bottom ) </a></b></pre><p>The GetWindowRect method retrieves the dimensions of the bounding rectangle of the window. ! The dimensions are given in screen coordinates that are relative to the upper-left corner ! </p><pre><b><a name="47">:M SetTitle: { adr len \ temp$ -- } </a></b></pre><p>Set the window title. ! </p><pre><b><a name="48">;CLASS </a></b></pre><p>End of window class. </p><h2>Helper words outside the class ! </h2><pre><b><a name="49">: find-window ( z"a1 -- hWnd ) \ w32f </a></b></pre><p>Find a window. ! </p><pre><b><a name="50">: send-window ( lParam wParam Message_ID hWnd -- ) \ w32f </a></b></pre><p>Send a message to a window. ! </p><pre><b><a name="51">: LoadIconFile ( adr len -- hIcon ) \ w32f </a></b></pre><p>Load an icon from an icon file. </p><hr><p>Document $Id$</p> Index: Controls.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/Controls.htm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Controls.htm 28 May 2006 09:48:21 -0000 1.14 --- Controls.htm 5 Jun 2006 09:28:42 -0000 1.15 *************** *** 1408,1414 **** the corresponding window rectangle. If this parameter is FALSE, prc specifies a window rectangle and receives the corresponding display area. ! </p><pre><b><a name="334">:M ClientSize: ( -- x y w h ) </a></b></pre><p>Return size of display area of the tab control. ! </p><pre><b><a name="335">:M WindowSize: ( 0 0 width height -- x y w h ) </a></b></pre><p>Given display area return window size required. </p><pre><b><a name="336">:M GetSelectedTab: ( -- index ) --- 1408,1414 ---- the corresponding window rectangle. If this parameter is FALSE, prc specifies a window rectangle and receives the corresponding display area. ! </p><pre><b><a name="334">:M ClientSize: ( -- left top right bottom ) </a></b></pre><p>Return size of display area of the tab control. ! </p><pre><b><a name="335">:M WindowSize: ( 0 0 width height -- left top right bottom ) </a></b></pre><p>Given display area return window size required. </p><pre><b><a name="336">:M GetSelectedTab: ( -- index ) Index: Generic.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/Generic.htm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Generic.htm 8 Feb 2006 14:26:34 -0000 1.13 --- Generic.htm 5 Jun 2006 09:28:42 -0000 1.14 *************** *** 65,69 **** </p><pre><b><a name="8">:M Paint: ( -- ) </a></b></pre><p>Force window repaint. A WM_PAINT message is posted to the message queue. ! </p><pre><b><a name="9">:M Show: ( state -- ) </a></b></pre><p>The ShowWindow function sets the specified window's show state. <br /> Possible values for state are: --- 65,74 ---- </p><pre><b><a name="8">:M Paint: ( -- ) </a></b></pre><p>Force window repaint. A WM_PAINT message is posted to the message queue. ! </p><pre><b><a name="9">:M SetRedraw: ( f -- ) ! </a></b></pre><p>Set the redraw state of the window. ! </p><p><i> f </i> Specifies the redraw state. If this parameter is TRUE, the ! content can be redrawn after a change. If this parameter is FALSE, ! the content cannot be redrawn after a change. ! </p><pre><b><a name="10">:M Show: ( state -- ) </a></b></pre><p>The ShowWindow function sets the specified window's show state. <br /> Possible values for state are: *************** *** 133,164 **** </td> </tr> ! </table><pre><b><a name="10">:M GDIFlush: ( -- ) </a></b></pre><p>The GdiFlush function flushes the calling thread's current batch. ! </p><pre><b><a name="11">:M Update: ( -- ) </a></b></pre><p>The UpdateWindow function updates the client area of the window by sending a WM_PAINT message to the window if the window's update region is not empty. The function sends a WM_PAINT message directly to the window procedure of the window, bypassing the application queue. If the update region is empty, no message is sent. ! </p><pre><b><a name="12">:M Scroll: { x y -- } </a></b></pre><p>The ScrollWindow function scrolls the contents of the specified window's client area. ! </p><pre><b><a name="13">:M Move: { x y w h -- } </a></b></pre><p>The MoveWindow function changes the position and dimensions of window. For a top-level window, the position and dimensions are relative to the upper-left corner of the screen. For a child window, they are relative to the upper-left corner of the parent window's client area. ! </p><pre><b><a name="14">:M SetWindowPos: { x y -- } </a></b></pre><p>The SetWindowPos function changes the position of a child, pop-up, or top-level window. <br /> X Specifies the new position of the left side of the window, in client coordinates. <br /> Y Specifies the new position of the top of the window, in client coordinates. ! </p><pre><b><a name="15">:M SetMenu: ( MenuHandle -- ) </a></b></pre><p>The SetMenu function assigns a new menu to the window. If MenuHandle is NULL, the window's current menu is removed. ! </p><pre><b><a name="16">:M SetText: { addr len \ text$ -- } </a></b></pre><p>The SetWindowText function changes the text of the window's title bar (if it has one). If the window is a control, the text of the control is changed. ! </p><pre><b><a name="17">:M GetText: ( -- addr len ) </a></b></pre><p>The GetWindowText function copies the text of the window's title bar (if it has one) into a buffer. If the window is a control, the text of the control is copied. ! </p><pre><b><a name="18">:M SetTextAlign: ( flag -- ) </a></b></pre><p>Set the text-alignment for the window. <br /> The current position is updated after each text output call. --- 138,169 ---- </td> </tr> ! </table><pre><b><a name="11">:M GDIFlush: ( -- ) </a></b></pre><p>The GdiFlush function flushes the calling thread's current batch. ! </p><pre><b><a name="12">:M Update: ( -- ) </a></b></pre><p>The UpdateWindow function updates the client area of the window by sending a WM_PAINT message to the window if the window's update region is not empty. The function sends a WM_PAINT message directly to the window procedure of the window, bypassing the application queue. If the update region is empty, no message is sent. ! </p><pre><b><a name="13">:M Scroll: { x y -- } </a></b></pre><p>The ScrollWindow function scrolls the contents of the specified window's client area. ! </p><pre><b><a name="14">:M Move: { x y w h -- } </a></b></pre><p>The MoveWindow function changes the position and dimensions of window. For a top-level window, the position and dimensions are relative to the upper-left corner of the screen. For a child window, they are relative to the upper-left corner of the parent window's client area. ! </p><pre><b><a name="15">:M SetWindowPos: { x y -- } </a></b></pre><p>The SetWindowPos function changes the position of a child, pop-up, or top-level window. <br /> X Specifies the new position of the left side of the window, in client coordinates. <br /> Y Specifies the new position of the top of the window, in client coordinates. ! </p><pre><b><a name="16">:M SetMenu: ( MenuHandle -- ) </a></b></pre><p>The SetMenu function assigns a new menu to the window. If MenuHandle is NULL, the window's current menu is removed. ! </p><pre><b><a name="17">:M SetText: { addr len \ text$ -- } </a></b></pre><p>The SetWindowText function changes the text of the window's title bar (if it has one). If the window is a control, the text of the control is changed. ! </p><pre><b><a name="18">:M GetText: ( -- addr len ) </a></b></pre><p>The GetWindowText function copies the text of the window's title bar (if it has one) into a buffer. If the window is a control, the text of the control is copied. ! </p><pre><b><a name="19">:M SetTextAlign: ( flag -- ) </a></b></pre><p>Set the text-alignment for the window. <br /> The current position is updated after each text output call. *************** *** 180,188 **** </td> </tr> ! </table><pre><b><a name="19">:M GetDC: ( -- hdc ) </a></b></pre><p>The GetDC function retrieves a handle to a display device context (DC) for the client area of the window. <br /> You have to call ReleaseDC when the DC isn't needed any longer. ! </p><pre><b><a name="20">:M GetWindowDC: ( -- hdc ) </a></b></pre><p>The GetWindowDC function retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars. A window device context --- 185,193 ---- </td> </tr> ! </table><pre><b><a name="20">:M GetDC: ( -- hdc ) </a></b></pre><p>The GetDC function retrieves a handle to a display device context (DC) for the client area of the window. <br /> You have to call ReleaseDC when the DC isn't needed any longer. ! </p><pre><b><a name="21">:M GetWindowDC: ( -- hdc ) </a></b></pre><p>The GetWindowDC function retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars. A window device context *************** *** 192,210 **** retrieves the device context. Previous attributes are lost. <br /> You have to call ReleaseDC when the DC isn't needed any longer. ! </p><pre><b><a name="21">:M ReleaseDC: ( hdc -- ) </a></b></pre><p>The ReleaseDC function releases the device context (DC) of the window. <br /> Call only after GetDC or GetWindowDC. ! </p><pre><b><a name="22">:M BeginPaint: ( ps -- hdc ) </a></b></pre><p>The BeginPaint function prepares the window for painting and fills a PAINTSTRUCT (ps) structure with information about the painting. ! </p><pre><b><a name="23">:M EndPaint: ( ps -- ) </a></b></pre><p>The EndPaint function marks the end of painting in the window. This function is required for each call to the BeginPaint function, but only after painting is complete. ! </p><pre><b><a name="24">:M GetClientRect: ( rect -- ) </a></b></pre><p>The GetClientRect function retrieves the coordinates of the window's client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0). ! </p><pre><b><a name="25">:M GetWindowLong: ( index -- value ) </a></b></pre><p>The GetWindowLong function retrieves information about the window. The function also retrieves the 32-bit (long) value at the specified offset into the extra --- 197,215 ---- retrieves the device context. Previous attributes are lost. <br /> You have to call ReleaseDC when the DC isn't needed any longer. ! </p><pre><b><a name="22">:M ReleaseDC: ( hdc -- ) </a></b></pre><p>The ReleaseDC function releases the device context (DC) of the window. <br /> Call only after GetDC or GetWindowDC. ! </p><pre><b><a name="23">:M BeginPaint: ( ps -- hdc ) </a></b></pre><p>The BeginPaint function prepares the window for painting and fills a PAINTSTRUCT (ps) structure with information about the painting. ! </p><pre><b><a name="24">:M EndPaint: ( ps -- ) </a></b></pre><p>The EndPaint function marks the end of painting in the window. This function is required for each call to the BeginPaint function, but only after painting is complete. ! </p><pre><b><a name="25">:M GetClientRect: ( rect -- ) </a></b></pre><p>The GetClientRect function retrieves the coordinates of the window's client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0). ! </p><pre><b><a name="26">:M GetWindowLong: ( index -- value ) </a></b></pre><p>The GetWindowLong function retrieves information about the window. The function also retrieves the 32-bit (long) value at the specified offset into the extra *************** *** 250,254 **** </td> </tr> ! </table><pre><b><a name="26">:M SetWindowLong: ( value index -- oldval ) </a></b></pre><p>The SetWindowLong function changes an attribute of the window. The function also sets the 32-bit (long) value at the specified offset into the extra window memory. --- 255,259 ---- </td> </tr> ! </table><pre><b><a name="27">:M SetWindowLong: ( value index -- oldval ) </a></b></pre><p>The SetWindowLong function changes an attribute of the window. The function also sets the 32-bit (long) value at the specified offset into the extra window memory. *************** *** 283,298 **** </td> </tr> ! </table><pre><b><a name="27">:M GetStyle: ( -- style ) </a></b></pre><p>Retrieves the window styles. ! </p><pre><b><a name="28">:M SetStyle: ( style -- ) </a></b></pre><p>Sets a new window style. ! </p><pre><b><a name="29">:M +Style: ( style -- ) </a></b></pre><p>Add a window style. ! </p><pre><b><a name="30">:M -Style: ( style -- ) </a></b></pre><p>Remove a window style. ! </p><pre><b><a name="31">:M SetFocus: ( -- ) </a></b></pre><p>The SetFocus function sets the keyboard focus to the window. The window must be attached to the calling thread's message queue. ! </p><pre><b><a name="32">:M SetForegroundWindow: ( -- ) </a></b></pre><p>The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, --- 288,303 ---- </td> </tr> ! </table><pre><b><a name="28">:M GetStyle: ( -- style ) </a></b></pre><p>Retrieves the window styles. ! </p><pre><b><a name="29">:M SetStyle: ( style -- ) </a></b></pre><p>Sets a new window style. ! </p><pre><b><a name="30">:M +Style: ( style -- ) </a></b></pre><p>Add a window style. ! </p><pre><b><a name="31">:M -Style: ( style -- ) </a></b></pre><p>Remove a window style. ! </p><pre><b><a name="32">:M SetFocus: ( -- ) </a></b></pre><p>The SetFocus function sets the keyboard focus to the window. The window must be attached to the calling thread's message queue. ! </p><pre><b><a name="33">:M SetForegroundWindow: ( -- ) </a></b></pre><p>The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, *************** *** 321,325 **** process, or the next time a process calls AllowSetForegroundWindow, unless that process is specified. <br /> The foreground process can disable calls to SetForegroundWindow by calling the LockSetForegroundWindow function. ! </p><pre><b><a name="33">:M SetActiveWindow: ( -- ) </a></b></pre><p>The SetActiveWindow function activates a window. The window must be attached to the calling thread's message queue. <br /> The SetActiveWindow function activates a window, but not if the application is in the background. The window will be --- 326,330 ---- process, or the next time a process calls AllowSetForegroundWindow, unless that process is specified. <br /> The foreground process can disable calls to SetForegroundWindow by calling the LockSetForegroundWindow function. ! </p><pre><b><a name="34">:M SetActiveWindow: ( -- ) </a></b></pre><p>The SetActiveWindow function activates a window. The window must be attached to the calling thread's message queue. <br /> The SetActiveWindow function activates a window, but not if the application is in the background. The window will be *************** *** 329,333 **** By using the AttachThreadInput function, a thread can attach its input processing to another thread. This allows a thread to call SetActiveWindow to activate a window attached to another thread's message queue. ! </p><pre><b><a name="34">:M MessageBox: ( szText szTitle style -- result ) </a></b></pre><p>The MessageBox function creates, displays, and operates a message box. The message box contains an application-defined message and title, plus any combination of predefined icons and push buttons. --- 334,338 ---- By using the AttachThreadInput function, a thread can attach its input processing to another thread. This allows a thread to call SetActiveWindow to activate a window attached to another thread's message queue. ! </p><pre><b><a name="35">:M MessageBox: ( szText szTitle style -- result ) </a></b></pre><p>The MessageBox function creates, displays, and operates a message box. The message box contains an application-defined message and title, plus any combination of predefined icons and push buttons. *************** *** 492,496 **** </td> </tr> ! </table><pre><b><a name="35">:M InvalidateRect: ( bgflag rectangle -- ) </a></b></pre><p>The InvalidateRect function adds a rectangle to the window's update region. The update region represents the portion of the window's client area that must be redrawn. --- 497,501 ---- </td> </tr> ! </table><pre><b><a name="36">:M InvalidateRect: ( bgflag rectangle -- ) </a></b></pre><p>The InvalidateRect function adds a rectangle to the window's update region. The update region represents the portion of the window's client area that must be redrawn. *************** *** 505,523 **** </td> </tr> ! </table><pre><b><a name="36">:M GetDlgItem: ( id -- handle ) </a></b></pre><p>The GetDlgItem function retrieves a handle of the control (id) in the window. ! </p><pre><b><a name="37">:M GetDlgItemText: ( addr len id -- len ) </a></b></pre><p>The GetDlgItemText function retrieves the title or text associated with a control in the window. ! </p><pre><b><a name="38">:M SetDlgItemText: ( addr len id -- ) </a></b></pre><p>The SetDlgItemText function sets the title or text of a control in then window. ! </p><pre><b><a name="39">:M SetDlgItemFocus: ( id -- ) </a></b></pre><p>Set the focus to the control (id) in the window. ! </p><pre><b><a name="40">:M SelectDlgItemAll: ( id -- ) </a></b></pre><p>Selects all characters in the edit control (id). You can use this forn an edit control or a rich edit control. ! </p><pre><b><a name="41">:M IsDlgButtonChecked: ( id -- f1 ) </a></b></pre><p>The IsDlgButtonChecked function determines whether a button control has a check mark next to it or whether a three-state button control is grayed, checked, or neither. ! </p><pre><b><a name="42">:M CheckDlgButton: ( uCheck id -- ) </a></b></pre><p>The CheckDlgButton function changes the check state of a button control. Possible values for uCheck are: --- 510,528 ---- </td> </tr> ! </table><pre><b><a name="37">:M GetDlgItem: ( id -- handle ) </a></b></pre><p>The GetDlgItem function retrieves a handle of the control (id) in the window. ! </p><pre><b><a name="38">:M GetDlgItemText: ( addr len id -- len ) </a></b></pre><p>The GetDlgItemText function retrieves the title or text associated with a control in the window. ! </p><pre><b><a name="39">:M SetDlgItemText: ( addr len id -- ) </a></b></pre><p>The SetDlgItemText function sets the title or text of a control in then window. ! </p><pre><b><a name="40">:M SetDlgItemFocus: ( id -- ) </a></b></pre><p>Set the focus to the control (id) in the window. ! </p><pre><b><a name="41">:M SelectDlgItemAll: ( id -- ) </a></b></pre><p>Selects all characters in the edit control (id). You can use this forn an edit control or a rich edit control. ! </p><pre><b><a name="42">:M IsDlgButtonChecked: ( id -- f1 ) </a></b></pre><p>The IsDlgButtonChecked function determines whether a button control has a check mark next to it or whether a three-state button control is grayed, checked, or neither. ! </p><pre><b><a name="43">:M CheckDlgButton: ( uCheck id -- ) </a></b></pre><p>The CheckDlgButton function changes the check state of a button control. Possible values for uCheck are: *************** *** 537,541 **** </td> </tr> ! </table><pre><b><a name="43">:M SetDlgItemAlign: ( flag id -- ) </a></b></pre><p>Set the text-alignment for a control (id) in the window. <br /> The current position is updated after each text output call. --- 542,546 ---- </td> </tr> ! </table><pre><b><a name="44">:M SetDlgItemAlign: ( flag id -- ) </a></b></pre><p>Set the text-alignment for a control (id) in the window. <br /> The current position is updated after each text output call. *************** *** 557,563 **** </td> </tr> ! </table><pre><b><a name="44">:M SetAlign: ( flag id -- ) \ DEPRECATED </a></b></pre><p>Obsolescent Method use SetDlgItemAlign: instead. ! </p><pre><b><a name="45">:M EnableDlgItem: ( flag id -- ) </a></b></pre><p>Enable or disable a control (id) in the window. Possible values for flag are: --- 562,568 ---- </td> </tr> ! </table><pre><b><a name="45">:M SetAlign: ( flag id -- ) \ DEPRECATED </a></b></pre><p>Obsolescent Method use SetDlgItemAlign: instead. ! </p><pre><b><a name="46">:M EnableDlgItem: ( flag id -- ) </a></b></pre><p>Enable or disable a control (id) in the window. Possible values for flag are: *************** *** 572,576 **** </td> </tr> ! </table><pre><b><a name="46">:M ShowDlgItem: ( flag id -- ) </a></b></pre><p>Hide or show a control (id) in the window. Possible values for flag are: --- 577,581 ---- </td> </tr> ! </table><pre><b><a name="47">:M ShowDlgItem: ( flag id -- ) </a></b></pre><p>Hide or show a control (id) in the window. Possible values for flag are: *************** *** 585,589 **** </td> </tr> ! </table><pre><b><a name="47">:M CheckRadioButton: ( check_id first_id last_id -- ) </a></b></pre><p>The CheckRadioButton function adds a check mark to (checks) a specified radio button in a group and removes a check mark from (clears) all other radio buttons in the group. --- 590,594 ---- </td> </tr> ! </table><pre><b><a name="48">:M CheckRadioButton: ( check_id first_id last_id -- ) </a></b></pre><p>The CheckRadioButton function adds a check mark to (checks) a specified radio button in a group and removes a check mark from (clears) all other radio buttons in the group. *************** *** 603,614 **** </td> </tr> ! </table><pre><b><a name="48">:M SendDlgItemMessage: ( lParam wParam message id -- long ) </a></b></pre><p>Send a message to the control (id) in the window. ! </p><pre><b><a name="49">:M SetDlgItemFont: ( FontObject id -- ) </a></b></pre><p>Specify the font that the control (id) is to use when drawing text. <br /> FontObject must be the HANDLE of a font. If this parameter is NULL, the control uses the default system font to draw text. ! </p><pre><b><a name="50">;CLASS </a></b></pre><p>End of generic-window class </p><hr><p>Document $Id$</p> </body></html> --- 608,633 ---- </td> </tr> ! </table><pre><b><a name="49">:M SendDlgItemMessage: ( lParam wParam message id -- long ) </a></b></pre><p>Send a message to the control (id) in the window. ! </p><pre><b><a name="50">:M SetDlgItemFont: ( FontObject id -- ) </a></b></pre><p>Specify the font that the control (id) is to use when drawing text. <br /> FontObject must be the HANDLE of a font. If this parameter is NULL, the control uses the default system font to draw text. ! </p><pre><b><a name="51">;CLASS </a></b></pre><p>End of generic-window class + </p><a name="DIALOG&CONTROL"></a> + <h2>Generic class for Dialog- and Control-Window objects. + </h2><pre><b><a name="52">|CLASS DIALOG&CONTROL <SUPER Generic-Window + </a></b></pre><p>Base class for all dialog and control objects. + </p><p>Since DIALOG&CONTROL is a generic class it should not be used to create + any instances. + </p><pre><b><a name="53">:M Classinit: ( -- ) + </a></b></pre><p>Initialise the class. + </p><pre><b><a name="54">:M GetWindowRect: ( -- left top right bottom ) + </a></b></pre><p>The GetWindowRect method retrieves the dimensions of the bounding rectangle of the window. + The dimensions are given in screen coordinates that are relative to the upper-left corner + of the screen. + </p><pre><b><a name="55">;CLASS + </a></b></pre><p>End of DIALOG&CONTROL class </p><hr><p>Document $Id$</p> </body></html> |
From: Dirk B. <db...@us...> - 2006-06-06 02:50:39
|
Update of /cvsroot/win32forth/win32forth/proj In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4388/proj Modified Files: ProMgr.fpj Log Message: ProjectManager Project updated. Index: ProMgr.fpj =================================================================== RCS file: /cvsroot/win32forth/win32forth/proj/ProMgr.fpj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProMgr.fpj 1 Jan 2005 17:07:22 -0000 1.2 --- ProMgr.fpj 5 Jun 2006 09:20:57 -0000 1.3 *************** *** 1,12 **** ! ProjectName= Project Manager ! BuildFile= src\ProMgr\ProjectManager.f ! SearchPath= .;SRC;SRC\LIB;RES;DEMOS;SRC\CONSOLE;HTM;src\ProMgr;src\ProMgr\res ! Project Manager,0 ! Modules,27 apps\ProMgr\ProjectManager.f - SRC\LIB\RegistryWindowPos.f - SRC\LIB\GetWindowPlacment.f - SRC\lib\Struct.f - SRC\LIB\BROWSEFLD.F SRC\LIB\linklist.f SRC\LIB\treeview.f --- 1,8 ---- ! ProjectName= Project ! BuildFile= apps\ProMgr\ProjectManager.f ! SearchPath= .;SRC;SRC\LIB;RES;DEMOS;SRC\CONSOLE;HTM;src\ProMgr;src\ProMgr\res;APPS\PROMGR;APPS\PROMGR\RES ! Project,0 ! Modules,32 apps\ProMgr\ProjectManager.f SRC\LIB\linklist.f SRC\LIB\treeview.f *************** *** 17,26 **** SRC\LIB\excontrols.f SRC\LIB\sendmessage.f SRC\LIB\toolbar.f apps\ProMgr\zipper.f SRC\LIB\eStruct.f SRC\LIB\multiopen.f ! apps\ProMgr\AboutForm.f ! SRC\LIB\formutils.f SRC\LIB\ScintillaHyperEdit.f SRC\LIB\ScintillaEdit.f --- 13,22 ---- SRC\LIB\excontrols.f SRC\LIB\sendmessage.f + SRC\LIB\StatusBar.f SRC\LIB\toolbar.f apps\ProMgr\zipper.f SRC\LIB\eStruct.f SRC\LIB\multiopen.f ! SRC\LIB\exutils.f SRC\LIB\ScintillaHyperEdit.f SRC\LIB\ScintillaEdit.f *************** *** 29,46 **** SRC\LIB\HyperLink.f SRC\LIB\HtmlDisplayWindow.f ! SRC\LIB\HtmlDisplayControl.f SRC\LIB\RebarControl.f ! DLLs,1 Zip32.dll Forms,0 ! Auxiliary Files,0 ! Resources,3 apps\ProMgr\RES\treeimages.bmp ! apps\ProMgr\RES\pbitmaps.BMP ! apps\SciEdit\res\toolbar.bmp ! Docs,5 ! doc\ProMgr\prjFile Menu.gif ! doc\ProMgr\prjHelp Menu.gif ! doc\ProMgr\prjProject Menu.gif ! doc\ProMgr\prjProject Window.gif ! doc\ProMgr\ProjectManager.htm --- 25,54 ---- SRC\LIB\HyperLink.f SRC\LIB\HtmlDisplayWindow.f ! SRC\LIB\HtmlControl.f ! SRC\LIB\AXControl.F ! SRC\LIB\fcom.F SRC\LIB\RebarControl.f ! apps\ProMgr\hexviewer.f ! SRC\LIB\RegistrySupport.f ! SRC\LIB\RecentFiles.f ! apps\ProMgr\PMMenu.f ! SRC\LIB\AcceleratorTables.f ! apps\ProMgr\AboutForm.f ! SRC\LIB\Resources.F ! DLLs,2 Zip32.dll + w32fScintilla.dll Forms,0 ! Auxiliary Files,5 ! doc\promgr\prjProjectWindow.gif ! doc\promgr\prjFileMenu.gif ! doc\promgr\prjViewMenu.gif ! doc\promgr\prjProjectMenu.gif ! doc\promgr\prjHelpMenu.gif ! Resources,4 ! apps\sciedit\res\toolbar.bmp ! apps\ProMgr\RES\ToolbarBitmaps.bmp apps\ProMgr\RES\treeimages.bmp ! src\res\Project.ico ! Docs,1 ! doc\promgr\ProjectManager.htm |
From: Dirk B. <db...@us...> - 2006-06-06 02:50:38
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/res In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2866/res Log Message: Directory /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/res added to the repository |
From: Dirk B. <db...@us...> - 2006-06-06 02:50:35
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2376/Win32ForthIDE Log Message: Directory /cvsroot/win32forth/win32forth/apps/Win32ForthIDE added to the repository |
From: Dirk B. <db...@us...> - 2006-06-06 02:49:49
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20986/src Modified Files: CHILDWND.F Window.f Log Message: window class changes: - New ivar hWndParent added as a replacement for the Parent ivar. - New methods SetParentWindow: and GetParentWindow: added - The SetParent: and ParentWindow: methods are depreacted. - some minor cleanup child-window class changes: - SetParent: method added - some minor cleanup Index: Window.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Window.f,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Window.f 28 May 2006 09:50:12 -0000 1.15 --- Window.f 5 Jun 2006 07:37:15 -0000 1.16 *************** *** 66,78 **** int clicking? MAXSTRING bytes WindowClassName ! int Parent - int mydialoglink \ The following is for backward compatibility. Use WinRect for new code since it will \ be early bound whereas wRect will be latebound. int wRect Rectangle WinRect ! synonym WndRect wrect ! synonym tempRect wrect :M ClassInit: ( -- ) --- 66,82 ---- int clicking? MAXSTRING bytes WindowClassName ! int Parent \ object address of the parent window ! \ Note: this ivar was moved here form the child-window class some ! \ time ago. Altough it's not realy needed in the window class I ! \ left it here in order not to brake to mutch code (Sonntag, Juni 04 2006 dbu). ! int hWndParent \ handle of the parent window (added Sonntag, Juni 04 2006 dbu) ! int mydialoglink \ The following is for backward compatibility. Use WinRect for new code since it will \ be early bound whereas wRect will be latebound. int wRect Rectangle WinRect ! synonym WndRect wrect ! synonym TempRect wrect :M ClassInit: ( -- ) *************** *** 87,90 **** --- 91,97 ---- 0 to CurrentPopup 0 to CurrentMenu + 0 to Parent \ added Sonntag, Juni 04 2006 dbu + 0 to hWndParent \ added Sonntag, Juni 04 2006 dbu + 0 to mydialoglink \ added Sonntag, Juni 04 2006 dbu 640 to Width 480 to Height *************** *** 109,113 **** \ ----------------------------------------------------------------- ! :M GetSize: ( -- w h ) \ *G Get the size (width and height) of the window. Width Height ;M --- 116,120 ---- \ ----------------------------------------------------------------- ! :M GetSize: ( --width height ) \ *G Get the size (width and height) of the window. Width Height ;M *************** *** 121,130 **** Height ;M ! :M SetSize: ( w h -- ) ! \ *G Set the size (width and height) of the window. \n \ ** Note: The window itself will not be resized. to Height to Width ;M ! :M On_Size: ( -- ) \ *G User windows should override the On_Size: method. When this method is \ ** called, the variables Width and Height will have already been set. \n --- 128,137 ---- Height ;M ! :M SetSize: ( width height -- ) ! \ *G Set the size of the window. \n \ ** Note: The window itself will not be resized. to Height to Width ;M ! :M On_Size: ( wParam -- ) \ *G User windows should override the On_Size: method. When this method is \ ** called, the variables Width and Height will have already been set. \n *************** *** 135,142 **** word-split to Height to Width ; ! :M WM_SIZE ( hndl msg wparam lparam -- res ) set-size On_Size: [ self ] 0 ;M ! :M WM_MOVE ( hwnd msg wparam lparam -- res ) EraseRect: WinRect \ make a new rectangle WinRect --- 142,149 ---- word-split to Height to Width ; ! :M WM_SIZE ( hndl msg wParam lParam -- res ) set-size On_Size: [ self ] 0 ;M ! :M WM_MOVE ( hwnd msg wParam lParam -- res ) EraseRect: WinRect \ make a new rectangle WinRect *************** *** 302,306 **** register-the-class ; ! : create-frame-window ( -- hwnd ) \ calc window rect 0 0 \ adjust x,y relative to 0,0 --- 309,313 ---- register-the-class ; ! : create-frame-window ( -- hwnd ) \ calc window rect 0 0 \ adjust x,y relative to 0,0 *************** *** 321,325 **** ParentWindow: [ self ] \ parent window handle Height: WinRect \ adjusted height ! Width: WinRect \ adjusted width StartPos: [ self ] swap \ y, x starting position WindowStyle: [ self ] \ the window style --- 328,332 ---- ParentWindow: [ self ] \ parent window handle Height: WinRect \ adjusted height ! Width: WinRect \ adjusted width StartPos: [ self ] swap \ y, x starting position WindowStyle: [ self ] \ the window style *************** *** 438,452 **** WindowClassName count ;M ! :M SetParent: ( Parent -- ) ! \ *G Set owner window (0 if no parent). ! \ ** Note: The parent is the object address of the parent window ! \ ** class not the window handle. ! to Parent ;M ! :M ParentWindow: ( -- Parent | 0 if no parent ) ! \ *G Get owner window. ! \ ** Note: The parent is the object address of the parent window ! \ ** class not the window handle. ! Parent ;M :M DefaultCursor: ( -- cursor-id ) --- 445,465 ---- WindowClassName count ;M ! :M SetParentWindow: ( hWndParent -- ) ! \ *G Set handle of the owner window (0 if no parent). ! to hWndParent ;M ! :M GetParentWindow: ( -- hWndParent ) ! \ *G Get the handle of the owner window (0 if no parent). ! hWndParent ;M ! ! :M SetParent: ( hWndParent -- ) ! \ *G Set handle of the owner window (0 if no parent). ! \ *P NOTE: This method is depreacted. Use SetParentWindow: instead. ! to hWndParent ;M DEPRECATED ! ! :M ParentWindow: ( -- hWndParent ) ! \ *G Get the handle of the owner window (0 if no parent). ! \ *P NOTE: This method is depreacted. Use GetParentWindow: instead. ! hWndParent ;M DEPRECATED :M DefaultCursor: ( -- cursor-id ) *************** *** 825,829 **** : GetPositionParent ( -- x y wb hb ) ! Parent dup 0> if pad 16 erase pad swap Call GetWindowRect ?win-error --- 838,842 ---- : GetPositionParent ( -- x y wb hb ) ! hWndParent dup 0> if pad 16 erase pad swap Call GetWindowRect ?win-error *************** *** 855,858 **** --- 868,872 ---- \ I (dbu) think the methods should be in the base class, but... + \ the rectangle winrect was moved to after the ints width are height since their offsets \ are hard-coded in the file lib\RegistrySupport.f (gah). The same applies to parent. *************** *** 864,868 **** :M GetWindowRect: ( -- left top right bottom ) \ *G The GetWindowRect method retrieves the dimensions of the bounding rectangle of the window. ! \ ** The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. hWnd if EraseRect: WinRect --- 878,883 ---- :M GetWindowRect: ( -- left top right bottom ) \ *G The GetWindowRect method retrieves the dimensions of the bounding rectangle of the window. ! \ ** The dimensions are given in screen coordinates that are relative to the upper-left corner ! \ of the screen. hWnd if EraseRect: WinRect Index: CHILDWND.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/CHILDWND.F,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CHILDWND.F 14 May 2006 09:54:12 -0000 1.6 --- CHILDWND.F 5 Jun 2006 07:37:15 -0000 1.7 *************** *** 18,21 **** --- 18,36 ---- int id \ id for this child window + \ int Parent \ object address of the parent window + \ Note: this ivar was moved into the window class some time ago. + \ Altough it's not realy needed in the window class I (dbu) left + \ it there in oder not to brake to mutch code (Sonntag, Juni 04 2006 dbu). + + :M ClassInit: ( -- ) + \ *G Initialise the class. + ClassInit: super + 0 to id + ;M + + :M SetParent: ( parent -- ) + \ *G Set the object address of the parent window. + Parent ;M + :M GetParent: ( -- parent ) \ *G Get the object address of the parent window. *************** *** 23,31 **** :M SetID: ( n -- ) ! \ *G Set the ID for this child window to id ;M :M GetID: ( -- n ) ! \ *G Get the ID for this child window id ;M --- 38,46 ---- :M SetID: ( n -- ) ! \ *G Set the ID for this child window. to id ;M :M GetID: ( -- n ) ! \ *G Get the ID for this child window. id ;M *************** *** 45,73 **** : register-child-window ( -- f ) ! WndClassStyle: [ self ] to Style ! TheWndProc to WndProc ! 0 to ClsExtra ! 4 to WndExtra ! appInst to hInstance ! NULL to hIcon ! IDC_ARROW NULL Call LoadCursor to hCursor ! NULL to hbrBackground ! NULL to MenuName \ Set the window class name for this child window. Every window \ will become it's own class name and it's own window class. ! default-class-name ! WindowClassName 1+ to ClassName register-the-class ; ! : create-child-window ( -- hWnd ) ^base \ creation parameters appInst \ program instance id \ child id ! Parent conhndl = ! if conhndl ! else GetHandle: Parent \ parent window handle ! then StartSize: [ self ] swap \ height, width StartPos: [ self ] swap \ y, x starting position --- 60,97 ---- : register-child-window ( -- f ) ! \ Register the window class for this child window. ! WndClassStyle: [ self ] to Style ! TheWndProc to WndProc ! 0 to ClsExtra ! 4 to WndExtra ! appInst to hInstance ! NULL to hIcon ! IDC_ARROW NULL Call LoadCursor to hCursor ! NULL to hbrBackground ! NULL to MenuName \ Set the window class name for this child window. Every window \ will become it's own class name and it's own window class. ! default-class-name WindowClassName 1+ to ClassName register-the-class ; ! : GetParentWindow ( -- hWnd ) ! \ Get the parent window handle for this child window. ! \ If this window has no parent the window of the console is used as the parent. ! \ If no console is pressent the parent handle will be NULL. ! Parent if GetHandle: parent else conhndl then ! ! \ make shure that we have a valid window handle ! \ and tell the super class about it. ! dup call IsWindow 0= if drop NULL then ! dup SetParentWindow: super ; ! ! : create-child-window ( -- hWnd ) ! \ Create this child window. ^base \ creation parameters appInst \ program instance id \ child id ! GetParentWindow \ parent window handle StartSize: [ self ] swap \ height, width StartPos: [ self ] swap \ y, x starting position *************** *** 89,93 **** :M Start: ( Parent -- ) ! \ *G Create the child window. to Parent register-child-window drop --- 113,118 ---- :M Start: ( Parent -- ) ! \ *G Create this child window. Parent is the object address of the ! \ ** parent window. to Parent register-child-window drop |
From: Dirk B. <db...@us...> - 2006-06-06 02:49:49
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27118/src/lib Modified Files: Listview.f Log Message: Fixed a bug in the definition of the LV_FINDINFO class and added some helper words for WM_NOTIFY handling. Index: Listview.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/Listview.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Listview.f 23 May 2006 19:42:38 -0000 1.8 --- Listview.f 5 Jun 2006 06:39:23 -0000 1.9 *************** *** 169,175 **** ( LV_FINDINFO ) ! :Class _LV_FINDINFO <Super Object ! Record: LV_FINDINFO int flags int psz --- 169,175 ---- ( LV_FINDINFO ) ! :Class LV_FINDINFO <Super Object ! Record: _LV_FINDINFO int flags int psz *************** *** 442,445 **** --- 442,467 ---- ;Class + ( -------------------------------------------------------------------) + ( Helper words for WM_NOTIFY handling + ( -------------------------------------------------------------------) + + : LVN_GetNotifyItem ( addr -- Item ) + 3 cells + @ ; + + : LVN_GetNotifySubItem ( addr -- SubItem ) + 4 cells + @ ; + + : LVN_GetNotifyNewState ( addr -- NewState ) + 6 cells + @ ; + + : LVN_GetNotifyOldState ( addr -- OldState ) + 7 cells + @ ; + + : LVN_GetNotifyChanged ( addr -- Changed ) + 8 cells + @ ; + + : LVN_GetNotifyParam ( addr -- lParam ) + 10 cells + @ ; + module |
From: Dirk B. <db...@us...> - 2006-06-06 02:43:30
|
Update of /cvsroot/win32forth/win32forth/demos In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21263/demos Modified Files: TabControlDemo.f Log Message: Fixed the resizing of the windows within the TabControl and corrected some doc of the TabControl. Index: TabControlDemo.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/demos/TabControlDemo.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TabControlDemo.f 28 May 2006 09:05:31 -0000 1.1 --- TabControlDemo.f 4 Jun 2006 09:58:50 -0000 1.2 *************** *** 35,38 **** --- 35,39 ---- :M WindowStyle: ( -- style ) + \ Return the window style. WindowStyle: super [ LVS_REPORT LVS_SHOWSELALWAYS OR LVS_EDITLABELS or ] literal or *************** *** 59,76 **** \ Resize the controls within the main window. AutoSize: cTab ! ClientSize: cTab Move: cFileList ! ClientSize: cTab Move: cBrowserList ;M :M On_Size: ( -- ) \ Handle the WM_SIZE message. ! On_Size: super ! ! \ Note: This method can be called before the controls within the window ! \ are created, so we should better check if the parent of the tab control ! \ is valid or not! ! GetParent: cTab ! if ReSize: self ! then ;M :M SelChange: ( -- ) --- 60,72 ---- \ Resize the controls within the main window. AutoSize: cTab ! ! ClientSize: cTab 2over d- ( x y w h ) ! 4dup Move: cFileList ! Move: cBrowserList ;M :M On_Size: ( -- ) \ Handle the WM_SIZE message. ! On_Size: super ReSize: self ;M :M SelChange: ( -- ) *************** *** 99,104 **** ;M ! :M Start: ( -- ) ! Start: super self Start: cFileList --- 95,103 ---- ;M ! :M StartPos: ( -- x y ) ! CenterWindow: self ;M ! ! :M On_Init: ( -- ) ! On_Init: super self Start: cFileList *************** *** 132,135 **** --- 131,135 ---- \ ------------------------------------------------------------------------ + \ Note: You must first set the mask and than the other struct members !!! LVIF_TEXT SetMask: LvItem *************** *** 146,149 **** --- 146,278 ---- Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" File 1" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" File 2" SetpszText: LvItem + Addr: LvItem InsertItem: cFileList drop + z" abc" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + z" def" SetpszText: LvItem + Addr: LvItem InsertItem: cBrowserList drop + \ ------------------------------------------------------------------------ |
From: Dirk B. <db...@us...> - 2006-06-06 02:43:05
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21263/src/lib Modified Files: excontrols.f Log Message: Fixed the resizing of the windows within the TabControl and corrected some doc of the TabControl. Index: excontrols.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/excontrols.f,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** excontrols.f 29 May 2006 16:47:46 -0000 1.17 --- excontrols.f 4 Jun 2006 09:58:50 -0000 1.18 *************** *** 2321,2325 **** TCM_ADJUSTRECT SendMessage:self drop ;M ! :M ClientSize: ( -- x y w h ) \ *G Return size of display area of the tab control. TempRect.addrof GetClientRect: self --- 2321,2325 ---- TCM_ADJUSTRECT SendMessage:self drop ;M ! :M ClientSize: ( -- left top right bottom ) \ *G Return size of display area of the tab control. TempRect.addrof GetClientRect: self *************** *** 2327,2331 **** temprect.left temprect.top temprect.right temprect.bottom ;M ! :M WindowSize: ( 0 0 width height -- x y w h ) \ *G Given display area return window size required. SetRect: Temprect --- 2327,2331 ---- temprect.left temprect.top temprect.right temprect.bottom ;M ! :M WindowSize: ( 0 0 width height -- left top right bottom ) \ *G Given display area return window size required. SetRect: Temprect *************** *** 2351,2356 **** tempRect.AddrOf GetClientRect: Parent 0 0 Right: tempRect Bottom: tempRect \ x,y,h,w ! Move: self ! ;M :M Enable: ( f -- ) --- 2351,2355 ---- tempRect.AddrOf GetClientRect: Parent 0 0 Right: tempRect Bottom: tempRect \ x,y,h,w ! Move: self ;M :M Enable: ( f -- ) |
From: Rod O. <rod...@us...> - 2006-06-06 01:24:34
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1425/src/lib Modified Files: RebarControl.f Log Message: Rod: Changed to use Control rather than Child-Window, added more methods Index: RebarControl.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/RebarControl.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RebarControl.f 1 May 2005 06:27:42 -0000 1.2 --- RebarControl.f 4 Jun 2006 21:13:02 -0000 1.3 *************** *** 1,103 **** ! \ RebarControl.f Rebar Control Object ! WinLibrary COMCTL32.DLL ! :Class RebarControl <Super Child-Window - record: rbinfo - int cbsize - int fmask \ ( RBIM_IMAGELIST ) - int himl \ image list handle if any - ;recordsize: sizeof(rbinfo) ! /* ! record: icexinfo ! int icexsize ! int icexclass ! ;recordsize: sizeof(icexinfo) ! */ ! record: rbbandinfo ! INT binfoSize ! INT bfMask ! INT fStyle int clrFore int clrBack int lpText ! INT cch int iImage int hwndChild ! INT cxMinChild ! INT cyMinChild ! INT cx int hbmBack ! INT wID ! INT cyChild ! INT cyMaxChild ! INT cyIntegral ! INT cxIdeal int lParam ! INT cxHeader ! ;recordsize: sizeof(rbbandinfo) ! create rebar-class z," ReBarWindow32" \ Pre-registered class ! : create-rebar ( -- hWnd ) ! \ Make sure Common Controls are loaded ! ICC_COOL_CLASSES 8 sp@ Call InitCommonControlsEx 3drop ! NULL \ Creation parameter ! appInst \ Instance handle ! ID \ Child id ! Parent conhndl = ! if conhndl ! else GetHandle: Parent \ parent window handle ! then ! 0 0 \ Size h,w ! 0 0 \ Position y,x ! WindowStyle: [ self ] \ Style ! NULL \ Window name ! rebar-class \ Pre-registered class ! WS_EX_TOOLWINDOW \ Extended style ! Call CreateWindowEx ! ; ! : eraseband-info ( -- ) ! rbbandinfo sizeof(rbbandinfo) dup>r erase ! r> to binfosize ; ! :M ClassInit: ( -- ) ! ClassInit: super ! rbinfo sizeof(rbinfo) dup>r erase ! r> to cbsize ! eraseband-info ;M ! :M SetRebarInfo: ( hwndiml mask -- ) ! to fmask to himl ! rbinfo 0 RB_SETBARINFO hwnd Call SendMessage drop ;M ! :M InsertBand: ( -- ) \ band info should have been set ! rbbandinfo -1 RB_INSERTBAND hwnd Call SendMessage drop ! ;M ! :M Start: ( Parent -- ) ! hWnd ! if drop ! SW_SHOWNOACTIVATE Show: self ! else ! to Parent ! create-rebar to hWnd ! 0 0 SetRebarInfo: self ! then ! ;M ! :M WindowStyle: ( -- style ) ! [ WS_CHILD WS_VISIBLE or ] literal ! ;M ;Class \s **************************** Some Information On Rebar Controls ******************************* --- 1,122 ---- ! \ $Id$ ! \ RebarControl.f Rebar Control Class ! \ Changed to use Control rather than Child-Window ! \ Added more methods - Sunday, June 04 2006 21:20:10 Rod ! WinLibrary COMCTL32.DLL ! :Class RebarControl <Super Control ! ! : SendMessage:Self ( lParam wParam message -- result ) hWnd call SendMessage ; ! : SendMessage:SelfDrop ( lParam wParam message -- ) SendMessage:Self drop ; ! ! Record: REBARBBANDINFO ! int binfoSize ! int bfMask ! int fStyle int clrFore int clrBack int lpText ! int cch int iImage int hwndChild ! int cxMinChild ! int cyMinChild ! int cx int hbmBack ! int wID ! int cyChild ! int cyMaxChild ! int cyIntegral ! int cxIdeal int lParam ! int cxHeader ! ;Recordsize: sizeof(REBARBBANDINFO) ! : Eraseband-info ( -- ) ! REBARBBANDINFO sizeof(REBARBBANDINFO) dup>r erase ! r> to binfoSize ; ! :M ClassInit: ( -- ) ! ClassInit: super ! \ Make sure Common Controls are loaded ! ICC_COOL_CLASSES 8 sp@ Call InitCommonControlsEx 3drop ! Eraseband-info ;M ! :M WindowStyle: ( -- style ) [ WS_CHILD WS_VISIBLE or ] literal ;M ! :M ExWindowStyle: ( -- style ) WS_EX_TOOLWINDOW ;M ! :M AutoSize: ( -- ) 0 0 WM_SIZE SendMessage:SelfDrop ;M ! :M DeleteBand: ( uBand -- ) 0 swap RB_DELETEBAND SendMessage:SelfDrop ;M ! :M EndDrag: ( -- ) 0 0 RB_ENDDRAG SendMessage:SelfDrop ;M ! :M GetBarHeight: ( -- h ) 0 0 RB_GETBARHEIGHT SendMessage:SelfDrop ;M ! :M Height: ( -- h ) GetWindowRect: self nip swap - nip ;M ! Record: RBHITTESTINFO ! int x ! int y ! int flags ! int ib ! ;Record ! :M HitTest: ( -- iBand ) ! hWnd get-mouse-XY to y to x ! RBHITTESTINFO 0 RB_HITTEST SendMessage:Self ;M ! ! :M IdToIndex: ( uBandID -- uBand ) 0 swap RB_IDTOINDEX SendMessage:Self ;M ! ! :M InsertBandAt: ( uBand -- ) REBARBBANDINFO swap RB_INSERTBAND SendMessage:SelfDrop ;M ! ! :M InsertBand: ( -- ) -1 InsertBandAt: self ;M \ band info should have been set ! ! :M MaximizeBand: ( fIdeal iBand -- ) RB_MAXIMIZEBAND SendMessage:SelfDrop ;M + :M MinimizeBand: ( iBand -- ) 0 swap RB_MINIMIZEBAND SendMessage:SelfDrop ;M + + :M SetBarInfo: ( himl fmask -- ) 12 sp@ 0 RB_SETBARINFO SendMessage:SelfDrop 3drop ;M + + :M Start: ( Parent -- ) + hWnd + if drop + SW_SHOWNOACTIVATE Show: self + else + to Parent + z" ReBarWindow32" Create-Control + 0 0 SetBarInfo: self + then ;M + (( + \ Not yet used/tested + :M BeginDrag: ( uBand -- ) ( GetHandle: self get-mouse-XY word-join ) -1 swap RB_BEGINDRAG SendMessage:SelfDrop ;M + :M DragMove: ( -- ) -1 0 RB_DRAGMOVE SendMessage:SelfDrop ;M + :M GetBandBorders: ( rect uBand -- ) 0 RB_GETBANDBORDERS SendMessage:SelfDrop ;M + :M GetBandCount: ( -- n ) 0 0 RB_GETBANDCOUNT SendMessage:Self ;M + :M GetBkColor: ( -- clrBk ) 0 0 RB_GETBKCOLOR SendMessage:Self ;M + :M GetPalette: ( -- hpal ) 0 0 RB_GETPALETTE SendMessage:Self ;M + :M GetRect: ( rect uBand -- ) 0 RB_GETRECT SendMessage:SelfDrop ;M + :M GetRowCount: ( -- n ) 0 0 RB_GETROWCOUNT SendMessage:Self ;M + :M GetRowHeight: ( iRow -- height ) 0 swap RB_GETROWHEIGHT SendMessage:Self ;M + :M GetTextColor: ( -- clrText ) 0 0 RB_GETTEXTCOLOR SendMessage:Self ;M + :M GetToolTips: ( -- hwndToolTip ) 0 0 RB_GETTOOLTIPS SendMessage:Self ;M + :M MoveBand: ( iTo iFrom -- ) RB_MOVEBAND SendMessage:SelfDrop ;M + :M SetBandInfo: ( uBand -- ) REBARBBANDINFO swap RB_SETBANDINFO SendMessage:SelfDrop ;M + :M SetBkColor: ( clrBk -- ) 0 swap RB_SETBKCOLOR SendMessage:SelfDrop ;M + :M SetPalette: ( hpal -- ) 0 swap RB_SETPALETTE SendMessage:SelfDrop ;M + :M SetParent: ( hwndParent -- ) 0 swap RB_SETPARENT SendMessage:SelfDrop ;M + :M SetTextColor: ( clrText -- ) 0 RB_SETTEXTCOLOR SendMessage:SelfDrop ;M + :M SetToolTips: ( hwndToolTip -- ) 0 swap RB_SETTOOLTIPS SendMessage:SelfDrop ;M + :M ShowBand: ( f i -- ) RB_SHOWBAND SendMessage:SelfDrop ;M + :M SizeToRect: ( rect -- ) 0 RB_SIZETORECT SendMessage:SelfDrop ;M + )) ;Class + \s **************************** Some Information On Rebar Controls ******************************* |
From: George H. <geo...@us...> - 2006-06-01 08:12:39
|
Update of /cvsroot/win32forth/win32forth/src/console In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv985/win32forth/src/console Modified Files: ConsoleMenu.f Log Message: gah: Reverted to push-keys version, which works correctly with the latest console (since the line wrapping problem has been solved) so loading doesn't occur within the callback, which could produce funny results due to extra values on the stack. Index: ConsoleMenu.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/console/ConsoleMenu.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ConsoleMenu.f 20 Dec 2005 18:02:03 -0000 1.5 --- ConsoleMenu.f 1 Jun 2006 08:12:35 -0000 1.6 *************** *** 29,44 **** \ changed to work with blanks in file name \ January 31st, 2004 - 20:38 dbu ! \ corrected to allow very long filenames that wrap on the console ! \ James Boyd June 10th, 2004 - 1:02 ! : load-forth ( -- ) \ load and compile a forth file ! conhndl start: LoadForth count dup ! if ! s" FLOAD '" type \ FLOAD ' ! 2dup type \ filename ! [char] ' emit \ ' ! \in-system-ok nostack1 included cr \ use \in-system-ok nostack1 to avoid warnings ! 0x0D pushkey \ to prompt OK ! else 2drop ! then ; : print-forth ( -- ) \ print a forth file --- 29,41 ---- \ changed to work with blanks in file name \ January 31st, 2004 - 20:38 dbu ! : load-forth ( -- ) ! conhndl start: LoadForth dup c@ ! IF count pocket place ! s" FLOAD '" "pushkeys ! pocket count "pushkeys ! s" '" "pushkeys ! 0x0D pushkey ! ELSE drop ! THEN ; : print-forth ( -- ) \ print a forth file *************** *** 56,60 **** THEN ; ! : edit-log ( -- ) \ edit a makro file conhndl start: EditLog dup c@ IF count pocket place --- 53,57 ---- THEN ; ! : edit-log ( -- ) \ edit a macro file conhndl start: EditLog dup c@ IF count pocket place |
From: George H. <geo...@us...> - 2006-06-01 08:08:23
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31965/win32forth/src Modified Files: Class.f Log Message: gah: Added extra documentation Index: Class.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Class.f,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Class.f 8 Feb 2006 10:54:43 -0000 1.16 --- Class.f 1 Jun 2006 08:08:18 -0000 1.17 *************** *** 950,964 **** : [[ true abort" [[ must be preceeded by a selector " ; IMMEDIATE ! : <noClassPointer ( -- ) -1 ^class XFA ! ; \ XFA is -1 when no class pointer ! ! \ Set a class and its subclasses to indexed ! ! : <Indexed ( width -- ) ?Class ^Class XFA ! ( <ClassPointer ) ; ! \ Compile a self reference, but only if the class is guaranteed to ! \ have a class pointer. We can send ourself late-bound messages ! \ with the syntax: Msg: [ self ] : Self ( -- addr ) POSTPONE ^base ; IMMEDIATE --- 950,966 ---- : [[ true abort" [[ must be preceeded by a selector " ; IMMEDIATE ! : <noClassPointer ( -- ) ! \ *G Set a class and its subclasses to suppress the class pointer when used as IVARs. ! \ XFA is -1 when no class pointer is reserved for IVARs. ! -1 ^class XFA ! ; ! : <Indexed ( width -- ) ! \ *G Set a class and its subclasses to indexed. ! ?Class ^Class XFA ! ( <ClassPointer ) ; : Self ( -- addr ) + \ *G Compile a self reference, but only if the class is guaranteed to + \ ** have a class pointer. We can send ourself late-bound messages + \ ** with the syntax: Msg: [ self ]. POSTPONE ^base ; IMMEDIATE |
From: Rod O. <rod...@us...> - 2006-05-30 18:56:08
|
Update of /cvsroot/win32forth/win32forth In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24967 Modified Files: w32fConsole.dll Log Message: Rod: Fixed to redraw last character on a line while resizing console Index: w32fConsole.dll =================================================================== RCS file: /cvsroot/win32forth/win32forth/w32fConsole.dll,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 Binary files /tmp/cvsPKYWbl and /tmp/cvs1TVBhQ differ |
From: Rod O. <rod...@us...> - 2006-05-30 18:55:16
|
Update of /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24830/extsrc/w32fConsole Modified Files: Term.cpp Log Message: Rod: Fixed to redraw last character on a line while resizing console Index: Term.cpp =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole/Term.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Term.cpp 27 May 2006 08:29:35 -0000 1.9 --- Term.cpp 30 May 2006 18:55:06 -0000 1.10 *************** *** 974,977 **** --- 974,980 ---- case WM_WINDOWPOSCHANGED: { + RECT RectConsole; + GetClientRect( hWndConsole, &RectConsole ); + RECT Rect; GetClientRect( hwnd, &Rect ); *************** *** 983,986 **** --- 986,992 ---- SWP_FRAMECHANGED ); + RectConsole.left = RectConsole.right - charW ; + InvalidateRect( hWndConsole, &RectConsole, true ); + return 0; } *************** *** 1331,1335 **** // Register console window class ! wndclass.style = CS_DBLCLKS | CS_OWNDC; wndclass.lpfnWndProc = ConsoleWndProc; wndclass.cbClsExtra = 0; --- 1337,1341 ---- // Register console window class ! wndclass.style = CS_DBLCLKS | CS_OWNDC ; wndclass.lpfnWndProc = ConsoleWndProc; wndclass.cbClsExtra = 0; |
From: Jos v.d.V. <jo...@us...> - 2006-05-30 09:40:56
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13520/src/lib Modified Files: Joystick.f Log Message: Jos: Added: joyGetPosEx to complete the source. Index: Joystick.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/Joystick.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Joystick.f 27 May 2006 15:13:36 -0000 1.1 --- Joystick.f 30 May 2006 09:40:48 -0000 1.2 *************** *** 46,66 **** :struct joyinfoex ! DWORD dwSize; /* size of structure */ ! DWORD dwFlags; /* flags to indicate what to return */ ! DWORD dwXpos; /* x position */ ! DWORD dwYpos; /* y position */ ! DWORD dwZpos; /* z position */ ! DWORD dwRpos; /* rudder/4th axis position */ ! DWORD dwUpos; /* 5th axis position */ ! DWORD dwVpos; /* 6th axis position */ ! DWORD dwButtons; /* button states */ ! DWORD dwButtonNumber; /* current button number pressed */ ! DWORD dwPOV; /* point of view state */ ! DWORD dwReserved1; /* reserved for communication between winmm & driver */ ! DWORD dwReserved2; /* reserved for future expansion */ ;struct sizeof joyinfoex mkstruct: *lpjoyinfoex : GetJoystickInfo ( id -- x y z buttons ) *lpjoyinfo [ sizeof joyinfo ] literal erase --- 46,97 ---- :struct joyinfoex ! DWORD dwSize /* size of structure */ ! DWORD dwFlags /* flags to indicate what to return */ ! DWORD dwXpos /* x position */ ! DWORD dwYpos /* y position */ ! DWORD dwZpos /* z position */ ! DWORD dwRpos /* rudder/4th axis position */ ! DWORD dwUpos /* 5th axis position */ ! DWORD dwVpos /* 6th axis position */ ! DWORD dwButtons /* button states */ ! DWORD dwButtonNumber /* current button number pressed */ ! DWORD dwPOV /* point of view state */ ! DWORD dwReserved1 /* reserved for communication between winmm & driver */ ! DWORD dwReserved2 /* reserved for future expansion */ ;struct sizeof joyinfoex mkstruct: *lpjoyinfoex + : joyGetPosEx ( dwFlags id -- result ) + >r [ sizeof joyinfoex ] literal + struct, *lpjoyinfoex joyinfoex dwSize ! + struct, *lpjoyinfoex joyinfoex dwFlags ! + *lpjoyinfoex r> call joyGetPosEx + ; + + + (( About joyGetPosEx: + The information returned from joyGetPosEx depends on the flags you specify in dwFlags. + + Result JOYERR_NOERROR if successful or one of the following error values. + + Value Description + MMSYSERR_NODRIVER The joystick driver is not present. + MMSYSERR_INVALPARAM An invalid parameter was passed. + Windows 95/98/Me: The specified joystick identifier is invalid. + + MMSYSERR_BADDEVICEID Windows 95/98/Me: The specified joystick identifier is invalid. + JOYERR_UNPLUGGED The specified joystick is not connected to the system. + JOYERR_PARMS Windows NT/2000/XP: The specified joystick identifier is invalid. + + + Remarks + + This function provides access to extended devices such as rudder pedals, + point-of-view hats, devices with a large number of buttons, and coordinate + systems using up to six axes. For joystick devices that use three axes or + fewer and have fewer than four buttons, use the joyGetPos function. + )) + : GetJoystickInfo ( id -- x y z buttons ) *lpjoyinfo [ sizeof joyinfo ] literal erase *************** *** 72,76 **** ; ! 4 constant MaxJoysticks : FindFirstJoyStick ( - *lpjoycapsa ID ) \ ID should be <= MaxJoysticks --- 103,107 ---- ; ! 15 constant MaxJoysticks : FindFirstJoyStick ( - *lpjoycapsa ID ) \ ID should be <= MaxJoysticks *************** *** 83,87 **** ! \s Test and demo: : JoystickTest ( - ) \ Move the joystick and press some buttons --- 114,118 ---- ! \s Tests and demo: : JoystickTest ( - ) \ Move the joystick and press some buttons *************** *** 97,99 **** --- 128,132 ---- JoystickTest + \ joy_returnall FindFirstJoyStick joyGetPosEx . *lpjoyinfoex sizeof joyinfoex dump + \s |
From: Dirk B. <db...@us...> - 2006-05-29 17:13:22
|
Update of /cvsroot/win32forth/win32forth/apps/ForthForm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31280/apps/ForthForm Modified Files: FORMOBJECT.F FORTHFORM.F Log Message: Changed the name of the ivar 'parent' in the dialog objects to 'hWndParent'. Index: FORTHFORM.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/ForthForm/FORTHFORM.F,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** FORTHFORM.F 1 Feb 2006 17:08:24 -0000 1.13 --- FORTHFORM.F 29 May 2006 17:13:14 -0000 1.14 *************** *** 99,103 **** \ adapted from WinEd ! 20206 constant fform_version# \ 2.02.06 \ Version numbers: v.ww.rr --- 99,103 ---- \ adapted from WinEd ! 20207 constant fform_version# \ 2.02.07 \ Version numbers: v.ww.rr Index: FORMOBJECT.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/ForthForm/FORMOBJECT.F,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** FORMOBJECT.F 1 Feb 2006 17:08:24 -0000 1.10 --- FORMOBJECT.F 29 May 2006 17:13:14 -0000 1.11 *************** *** 1509,1513 **** if s" MultiStatusBar TheStatusBar" append&crlf then GetSuperclass: self DIALOG-CLASS = \ only for dialogwindow super class ! if SaveScreen? if frmXPos #append frmYPos #append s" 2value XYPos \ save screen location of form" append&crlf --- 1509,1514 ---- if s" MultiStatusBar TheStatusBar" append&crlf then GetSuperclass: self DIALOG-CLASS = \ only for dialogwindow super class ! if s" 0 value hWndParent \ window handle of the parent of form" append&crlf ! SaveScreen? if frmXPos #append frmYPos #append s" 2value XYPos \ save screen location of form" append&crlf *************** *** 1738,1746 **** s" \ if this form is a modal form a non-zero parent must be set" append&crlf s" :M ParentWindow: ( -- hwndparent | 0 if no parent )" append&crlf ! 2tabs s" parent" append&crlf 2tabs s" ;M" append&crlf \ write function for setting parent window +crlf s" :M SetParent: ( hwndparent -- ) \ set owner window" append&crlf ! 2tabs s" to parent" append&crlf 2tabs s" ;M" append&crlf ; --- 1739,1747 ---- s" \ if this form is a modal form a non-zero parent must be set" append&crlf s" :M ParentWindow: ( -- hwndparent | 0 if no parent )" append&crlf ! 2tabs s" hWndParent" append&crlf 2tabs s" ;M" append&crlf \ write function for setting parent window +crlf s" :M SetParent: ( hwndparent -- ) \ set owner window" append&crlf ! 2tabs s" to hWndParent" append&crlf 2tabs s" ;M" append&crlf ; |
From: Dirk B. <db...@us...> - 2006-05-29 16:49:46
|
Update of /cvsroot/win32forth/win32forth/apps/Chess In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11469/apps/Chess Modified Files: fcp3d.f Log Message: Fixed a bug in: init-3Dfont (thank's Andrew for the bug report). Index: fcp3d.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Chess/fcp3d.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fcp3d.f 13 Dec 2005 21:45:08 -0000 1.2 --- fcp3d.f 29 May 2006 16:20:46 -0000 1.3 *************** *** 217,221 **** : init-3Dfont ( - ) s" Comic Sans MS" SetFaceName: vFont ! Create: vFont drop Handle: vFont ghdc call SelectObject drop ghdc 1 255 1 .0200e .0880e WGL_FONT_POLYGONS lpgmf_buffer wglUseFontOutlines --- 217,221 ---- : init-3Dfont ( - ) s" Comic Sans MS" SetFaceName: vFont ! Create: vFont ( drop ) \ removed the invalid DROP Montag, Mai 29 2006 dbu Handle: vFont ghdc call SelectObject drop ghdc 1 255 1 .0200e .0880e WGL_FONT_POLYGONS lpgmf_buffer wglUseFontOutlines |
From: Dirk B. <db...@us...> - 2006-05-29 16:47:57
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22111/src/lib Modified Files: excontrols.f Log Message: Fixed a bug in the SetTextZ: method of the TextBox class (thank's Richard for the bug report). Index: excontrols.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/excontrols.f,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** excontrols.f 28 May 2006 09:48:21 -0000 1.16 --- excontrols.f 29 May 2006 16:47:46 -0000 1.17 *************** *** 216,220 **** \ *G Copy the text from the 0 terminated string \i addrz \d into the edit control. hwnd ! if hwnd swap Call SetWindowText ?win-error else drop then ;M --- 216,220 ---- \ *G Copy the text from the 0 terminated string \i addrz \d into the edit control. hwnd ! if hwnd Call SetWindowText ?win-error else drop then ;M |
From: Dirk B. <db...@us...> - 2006-05-28 09:50:24
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6202/src Modified Files: Window.f Log Message: Minor update of the window class docu. Index: Window.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Window.f,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Window.f 20 May 2006 12:02:06 -0000 1.14 --- Window.f 28 May 2006 09:50:12 -0000 1.15 *************** *** 376,382 **** :M On_Init: ( -- ) \ *G Thing's to do during creation of the window. ! \ ** The Default is setting the WNDCLASS style to the value ! \ ** the WndClassStyle: method returns. ! \ SetWndClassStyle ;M ;M --- 376,380 ---- :M On_Init: ( -- ) \ *G Thing's to do during creation of the window. ! \ ** Default does nothing. ;M *************** *** 902,905 **** --- 900,905 ---- \ *G End of window class. + \ *S Helper words outside the class + : find-window ( z"a1 -- hWnd ) \ w32f \ *G Find a window. |
From: Dirk B. <db...@us...> - 2006-05-28 09:50:24
|
Update of /cvsroot/win32forth/win32forth/doc/classes In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6202/doc/classes Modified Files: Window.htm Log Message: Minor update of the window class docu. Index: Window.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/Window.htm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Window.htm 9 May 2006 16:18:48 -0000 1.14 --- Window.htm 28 May 2006 09:50:12 -0000 1.15 *************** *** 61,68 **** set the style member of the the WNDCLASS structure associated with the window. Default style is CS_DBLCLKS, CS_HREDRAW and CS_VREDRAW. </p><pre><b><a name="15">:M Start: ( -- ) </a></b></pre><p>Create the window. </p><pre><b><a name="16">:M On_Init: ( -- ) ! </a></b></pre><p>Thing's to do during creation of the window. Default does nothing. </p><pre><b><a name="17">:M On_Done: ( -- ) </a></b></pre><p>Thing's to do when the window will be destroyed. Default does nothing. --- 61,75 ---- set the style member of the the WNDCLASS structure associated with the window. Default style is CS_DBLCLKS, CS_HREDRAW and CS_VREDRAW. + </p><p>To prevent flicker on sizing of the window your method should return CS_DBLCLKS + only. </p><pre><b><a name="15">:M Start: ( -- ) </a></b></pre><p>Create the window. + </p><p>Before the window is created a default window class name for this window will + be set. Every window will become it's own class name and it's own window class. + Note: If the window class name is set with SetClassName: before the Start: method + is called no default class name will be set. </p><pre><b><a name="16">:M On_Init: ( -- ) ! </a></b></pre><p>Thing's to do during creation of the window. ! Default does nothing. </p><pre><b><a name="17">:M On_Done: ( -- ) </a></b></pre><p>Thing's to do when the window will be destroyed. Default does nothing. *************** *** 101,112 **** On_Done: super \ cleanup the super class 0 ;M ! </pre><pre><b><a name="18">:M SetClassName: ( adr len -- ) </a></b></pre><p>Set the window class name. ! </p><pre><b><a name="19">:M GetClassName: ( -- adr len ) </a></b></pre><p>Get the window class name. ! </p><pre><b><a name="20">:M SetParent: ( hwndParent -- ) </a></b></pre><p>Set owner window (0 if no parent). ! </p><pre><b><a name="21">:M ParentWindow: ( -- hwndparent | 0 if no parent ) </a></b></pre><p>Get owner window. </p><pre><b><a name="22">:M DefaultCursor: ( -- cursor-id ) </a></b></pre><p>User windows should override the DefaultCursor: method to --- 108,123 ---- On_Done: super \ cleanup the super class 0 ;M ! </pre><pre><b><a name="18">:M SetClassName: ( addr len -- ) </a></b></pre><p>Set the window class name. ! </p><pre><b><a name="19">:M GetClassName: ( -- addr len ) </a></b></pre><p>Get the window class name. ! </p><pre><b><a name="20">:M SetParent: ( Parent -- ) </a></b></pre><p>Set owner window (0 if no parent). ! Note: The parent is the object address of the parent window ! class not the window handle. ! </p><pre><b><a name="21">:M ParentWindow: ( -- Parent | 0 if no parent ) </a></b></pre><p>Get owner window. + Note: The parent is the object address of the parent window + class not the window handle. </p><pre><b><a name="22">:M DefaultCursor: ( -- cursor-id ) </a></b></pre><p>User windows should override the DefaultCursor: method to *************** *** 120,124 **** </p><pre><b><a name="25">:M ExWindowStyle: ( -- extended_style ) </a></b></pre><p>User windows should override the ExWindowStyle: method to ! set the extended window style. Default is null. </p><pre><b><a name="26">:M WindowTitle: ( -- Zstring ) </a></b></pre><p>User windows should override the WindowTitle: method to --- 131,135 ---- </p><pre><b><a name="25">:M ExWindowStyle: ( -- extended_style ) </a></b></pre><p>User windows should override the ExWindowStyle: method to ! set the extended window style. Default is NULL. </p><pre><b><a name="26">:M WindowTitle: ( -- Zstring ) </a></b></pre><p>User windows should override the WindowTitle: method to *************** *** 196,200 **** </p><pre><b><a name="46">;CLASS </a></b></pre><p>End of window class. ! </p><pre><b><a name="47">: find-window ( z"a1 -- hWnd ) \ w32f </a></b></pre><p>Find a window. </p><pre><b><a name="48">: send-window ( lParam wParam Message_ID hWnd -- ) \ w32f --- 207,212 ---- </p><pre><b><a name="46">;CLASS </a></b></pre><p>End of window class. ! </p><h2>Helper words outside the class ! </h2><pre><b><a name="47">: find-window ( z"a1 -- hWnd ) \ w32f </a></b></pre><p>Find a window. </p><pre><b><a name="48">: send-window ( lParam wParam Message_ID hWnd -- ) \ w32f |
From: Dirk B. <db...@us...> - 2006-05-28 09:48:30
|
Update of /cvsroot/win32forth/win32forth/doc/classes In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5515/doc/classes Modified Files: Controls.htm Log Message: Documentation for the TabControl class added. Index: Controls.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/Controls.htm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Controls.htm 9 Feb 2006 18:04:10 -0000 1.13 --- Controls.htm 28 May 2006 09:48:21 -0000 1.14 *************** *** 528,532 **** </p><p>The return value is the zero-based index of the currently selected item. If there is no selection, the return value is LB_ERR. ! </p><pre><b><a name="84">:M GetString: ( n addr -- n ) </a></b></pre><p>Retrieve a string from the list box. </p><p>The return value is the length of the string, in chars, excluding the terminating null character. --- 528,532 ---- </p><p>The return value is the zero-based index of the currently selected item. If there is no selection, the return value is LB_ERR. ! </p><pre><b><a name="84">:M GetString: ( index -- addr n ) </a></b></pre><p>Retrieve a string from the list box. [...1699 lines suppressed...] </a></b></pre><p>Enable the control. ! </p><pre><b><a name="355">:M Disable: ( -- ) </a></b></pre><p>Disable the control. ! </p><pre><b><a name="356">;Class </a></b></pre><p>End of VertButtonBar class </p><a name="HorizButtonBar"></a> <h2>HorizButtonBar class ! </h2><pre><b><a name="357">:Class HorizButtonBar <super HButtonBar </a></b></pre><p>HorizButtonBar control </p><p>This is an enhanced Version of the HButtonBar class. </p><p>Note: this control isn't one of the standard control of MS windows. ! </p><pre><b><a name="358">:M SetFont: { fonthndl \ hb1 -- } </a></b></pre><p>Set the font in the control. ! </p><pre><b><a name="359">:M Enable: { flag \ hb1 -- } </a></b></pre><p>Enable the control. ! </p><pre><b><a name="360">:M Disable: ( -- ) </a></b></pre><p>Disable the control. ! </p><pre><b><a name="361">;Class </a></b></pre><p>End of HorizButtonBar class </p><hr><p>Document $Id$</p> |
From: Dirk B. <db...@us...> - 2006-05-28 09:48:30
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5515/src/lib Modified Files: excontrols.f Log Message: Documentation for the TabControl class added. Index: excontrols.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/excontrols.f,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** excontrols.f 17 May 2006 20:11:33 -0000 1.15 --- excontrols.f 28 May 2006 09:48:21 -0000 1.16 *************** *** 2153,2234 **** \ ------------------------------------------------------------------------ ! \ *W <a name="TabControlr"></a> \ *S TabControl class \ ------------------------------------------------------------------------ :Class TabControl <Super Control ! \ *G Tab control ! Record: tc_Item INT mask // value specifying which members to retrieve or set INT lpReserved1 // reserved; do not use INT lpReserved2 // reserved; do not use ! int pszText // pointer to string containing tab text ! int cchTextMax // size of buffer pointed to by the pszText member ! int iImage // index to tab control's image ! int lParam // application-defined data associated with tab ;Recordsize: /tc_item ! int style \ additional styles to add before creation ! int selchange-func \ selection change function ! int selchanging-func \ selection changing function - \ TCIF_TEXT The pszText member is valid. - \ TCIF_IMAGE The iImage member is valid. - \ TCIF_PARAM The lParam member is valid. - \ TCIF_RTLREADING Displays the text of pszText using right-to-left reading - \ order on Hebrew or Arabic systems. :M IsMask: ( n -- ) to mask ;M :M Mask: ( -- n ) mask ;M :M IsPszText: ( addr -- ) to pszText ;M :M PszText: ( -- n ) pszText ;M :M IscchTextMax: ( n -- ) to cchTextMax ;M :M cchTextMax: ( -- n ) cchTextmax ;M :M IsiImage: ( n -- ) to iImage ;M :M iImage: ( -- n ) iImage ;M :M IsLparam: ( n -- ) to lparam ;M :M LParam: ( -- n ) lparam ;M - :M IsChangeFunc: ( cfa -- ) - to selchange-func ;M - - :M IsChangingFunc: ( cfa -- ) - to selchanging-func ;M - :M Start: ( Parent -- ) \ *G Create the control. to parent z" SysTabControl32" create-control ;M - : default-func ( l obj -- false ) - 2drop false ; - - :M ClassInit: ( -- ) - \ *G Initialise the class. - ClassInit: Super - 0 to style - tc_item /tc_item erase - -1 to iImage \ default no image - ['] default-func to selchange-func - ['] default-func to selchanging-func - ;M - \ You can cause the tabs to look like buttons by specifying the TCS_BUTTONS style. Tabs in this type of tab control \ should serve the same function as button controls; that is, clicking a tab should carry out a command instead of --- 2153,2231 ---- \ ------------------------------------------------------------------------ ! \ *W <a name="TabControl"></a> \ *S TabControl class \ ------------------------------------------------------------------------ :Class TabControl <Super Control ! \ *G Tab control. ! \ *P A tab control is analogous to the dividers in a notebook or the labels in a ! \ ** file cabinet. By using a tab control, an application can define multiple pages ! \ ** for the same area of a window or dialog box. Each page consists of a certain ! \ ** type of information or a group of controls that the application displays when ! \ ** the user selects the corresponding tab. ! Record: tc_Item ! \ *G The TCITEM struct. INT mask // value specifying which members to retrieve or set INT lpReserved1 // reserved; do not use INT lpReserved2 // reserved; do not use ! int pszText // pointer to string containing tab text ! int cchTextMax // size of buffer pointed to by the pszText member ! int iImage // index to tab control's image ! int lParam // application-defined data associated with tab ;Recordsize: /tc_item ! int style \ additional styles to add before creation ! int selchange-func \ selection change function ! int selchanging-func \ selection changing function :M IsMask: ( n -- ) + \ *G Set the \i mask \d member of the TCITEM struct. Possible values are: + \ *L + \ *| TCIF_TEXT | The pszText member is valid. | + \ *| TCIF_IMAGE | The iImage member is valid. | + \ *| TCIF_PARAM | The lParam member is valid. | + \ *| TCIF_RTLREADING | Displays the text of pszText using right-to-left reading order on Hebrew or Arabic systems. | to mask ;M :M Mask: ( -- n ) + \ *G Get the \i mask \d member of the TCITEM struct. mask ;M :M IsPszText: ( addr -- ) + \ *G Set the \i mask \d member of the TCITEM struct. to pszText ;M :M PszText: ( -- n ) + \ *G Get the \i pszText \d member of the TCITEM struct. pszText ;M :M IscchTextMax: ( n -- ) + \ *G Set the \i pszText \d member of the TCITEM struct. to cchTextMax ;M :M cchTextMax: ( -- n ) + \ *G Get the \i cchTextmax \d member of the TCITEM struct. cchTextmax ;M :M IsiImage: ( n -- ) + \ *G Set the \i iImage \d member of the TCITEM struct. to iImage ;M :M iImage: ( -- n ) + \ *G Get the \i iImage \d member of the TCITEM struct. iImage ;M :M IsLparam: ( n -- ) + \ *G Set the \i lparam \d member of the TCITEM struct. to lparam ;M :M LParam: ( -- n ) + \ *G Get the \i lparam \d member of the TCITEM struct. lparam ;M :M Start: ( Parent -- ) \ *G Create the control. to parent z" SysTabControl32" create-control ;M \ You can cause the tabs to look like buttons by specifying the TCS_BUTTONS style. Tabs in this type of tab control \ should serve the same function as button controls; that is, clicking a tab should carry out a command instead of *************** *** 2259,2294 **** :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control ! \ ** is created. to style ;M ! :M TC_Item: ( -- tc_item ) tc_item ;M :M InsertTab: ( index -- ) ! \ *G tc_item mask and other members must be set tc_item swap TCM_INSERTITEM SendMessage:Self drop ;M :M GetTabInfo: ( index -- ) ! \ *G tc_item mask member must be set tc_item swap TCM_GETITEM SendMessage:Self ?win-error ;M :M SetTabInfo: ( index -- ) ! \ *G tc_item members must be set tc_item swap TCM_SETITEM SendMessage:Self ?win-error ;M :M GetTabCount: ( -- n ) 0 0 TCM_GETITEMCOUNT SendMessage:Self ;M :M DeleteTab: ( index -- ) 0 swap TCM_DELETEITEM SendMessage:Self ?win-error ;M :M DeleteAllTabs: ( -- ) 0 0 TCM_DELETEALLITEMS SendMessage:Self ?win-error ;M :M AdjustRect: ( rect flag -- ) TCM_ADJUSTRECT SendMessage:self drop ;M :M ClientSize: ( -- x y w h ) ! \ *G return size of display area TempRect.addrof GetClientRect: self Temprect.addrof false AdjustRect: self --- 2256,2326 ---- :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control ! \ ** is created. Possible values are: ! \ *L ! \ *| TCS_BOTTOM | Tabs appear at the bottom of the control. This value equals TCS_RIGHT. | ! \ *| TCS_BUTTONS | Tabs appear as buttons, and no border is drawn around the display area. | ! \ *| TCS_FIXEDWIDTH | All tabs are the same width. This style cannot be combined with the TCS_RIGHTJUSTIFY style. | ! \ *| TCS_FLATBUTTONS | Selected tabs appear as being indented into the background while other tabs appear as being on the same plane as the background. This style only affects tab controls with the TCS_BUTTONS style. | ! \ *| TCS_FOCUSNEVER | The tab control does not receive the input focus when clicked. | ! \ *| TCS_FOCUSONBUTTONDOWN | The tab control receives the input focus when clicked. | ! \ *| TCS_FORCEICONLEFT | Icons are aligned with the left edge of each fixed-width tab. This style can only be used with the TCS_FIXEDWIDTH style. | ! \ *| TCS_FORCELABELLEFT | Labels are aligned with the left edge of each fixed-width tab; that is, the label is displayed immediately to the right of the icon instead of being centered. | ! \ *| TCS_HOTTRACK | Items under the pointer are automatically highlighted. You can check whether or not hot tracking is enabled by calling SystemParametersInfo. | ! \ *| TCS_MULTILINE | Multiple rows of tabs are displayed, if necessary, so all tabs are visible at once. | ! \ *| TCS_MULTISELECT | Multiple tabs can be selected by holding down CTRL when clicking. This style must be used with the TCS_BUTTONS style. | ! \ *| TCS_OWNERDRAWFIXED | The parent window is responsible for drawing tabs. | ! \ *| TCS_RAGGEDRIGHT | Rows of tabs will not be stretched to fill the entire width of the control. This style is the default. | ! \ *| TCS_RIGHT | Tabs appear vertically on the right side of controls that use the TCS_VERTICAL style. This value equals TCS_BOTTOM. | ! \ *| TCS_RIGHTJUSTIFY | The width of each tab is increased, if necessary, so that each row of tabs fills the entire width of the tab control. | ! \ *| TCS_SCROLLOPPOSITE | Unneeded tabs scroll to the opposite side of the control when a tab is selected. | ! \ *| TCS_SINGLELINE | Only one row of tabs is displayed. The user can scroll to see more tabs, if necessary. This style is the default. | ! \ *| TCS_TABS | Tabs appear as tabs, and a border is drawn around the display area. This style is the default. | ! \ *| TCS_TOOLTIPS | The tab control has a tooltip control associated with it. | ! \ *| TCS_VERTICAL | Tabs appear at the left side of the control, with tab text displayed vertically. This style is valid only when used with the TCS_MULTILINE style. To make tabs appear on the right side of the control, also use the TCS_RIGHT style. | to style ;M ! :M TC_Item: ( -- addr ) ! \ *G Get the address of the TCITEM struct. tc_item ;M :M InsertTab: ( index -- ) ! \ *G Inserts a new tab into the tab control. ! \ *P \i mask \d and other members of the TCITEM struct must be set. tc_item swap TCM_INSERTITEM SendMessage:Self drop ;M :M GetTabInfo: ( index -- ) ! \ *G Retrieves information about a tab in the tab control. tc_item swap TCM_GETITEM SendMessage:Self ?win-error ;M :M SetTabInfo: ( index -- ) ! \ *G Sets some or all of a tab's attributes. ! \ *P \i mask \d and other members of the TCITEM struct must be set. tc_item swap TCM_SETITEM SendMessage:Self ?win-error ;M :M GetTabCount: ( -- n ) + \ *G Retrieves the number of tabs in the tab control. 0 0 TCM_GETITEMCOUNT SendMessage:Self ;M :M DeleteTab: ( index -- ) + \ *G Removes an item from the tab control. 0 swap TCM_DELETEITEM SendMessage:Self ?win-error ;M :M DeleteAllTabs: ( -- ) + \ *G Removes all items from the tab control. 0 0 TCM_DELETEALLITEMS SendMessage:Self ?win-error ;M :M AdjustRect: ( rect flag -- ) + \ *G Calculates a tab control's display area given a window rectangle, or + \ ** calculates the window rectangle that would correspond to a specified + \ ** display area. + \ *P \i rect \d is the address of a RECT structure that specifies the given rectangle + \ ** and receives the calculated rectangle. + \ *P \i flag \d If this parameter is TRUE, prc specifies a display rectangle and receives + \ ** the corresponding window rectangle. If this parameter is FALSE, prc specifies a window + \ ** rectangle and receives the corresponding display area. TCM_ADJUSTRECT SendMessage:self drop ;M :M ClientSize: ( -- x y w h ) ! \ *G Return size of display area of the tab control. TempRect.addrof GetClientRect: self Temprect.addrof false AdjustRect: self *************** *** 2296,2300 **** :M WindowSize: ( 0 0 width height -- x y w h ) ! \ *G given display area return window size required SetRect: Temprect Temprect true AdjustRect: self --- 2328,2332 ---- :M WindowSize: ( 0 0 width height -- x y w h ) ! \ *G Given display area return window size required. SetRect: Temprect Temprect true AdjustRect: self *************** *** 2302,2332 **** :M GetSelectedTab: ( -- index ) 0 0 TCM_GETCURSEL SendMessage:self ;M :M SetSelectedTab: ( index -- ) 0 swap TCM_SETCURSEL SendMessage:self drop ;M - :M Handle_Notify: { w l \ ncode tabid -- f } - w LOWORD to tabID - l 2 cells+ @ to ncode - ncode - case - TCN_SELCHANGE of l On_SelChanged: [ self ] endof - TCN_SELCHANGING of l On_SelChanging: [ self ] endof - false swap \ default - endcase ;M - - :M On_SelChanged: ( l -- f ) - self selchange-func dup 0= abort" SelChanged function not set!" - execute ;M - - :M On_SelChanging: ( l -- f ) - self selchanging-func dup 0= abort" SelChanging function not set!" - execute ;M - :M GetRowCount: ( -- n ) 0 0 TCM_GETROWCOUNT SendMessage:self ;M :M AutoSize: ( -- ) tempRect.AddrOf GetClientRect: Parent 0 0 Right: tempRect Bottom: tempRect \ x,y,h,w --- 2334,2352 ---- :M GetSelectedTab: ( -- index ) + \ *G Determines the currently selected tab in the tab control. 0 0 TCM_GETCURSEL SendMessage:self ;M :M SetSelectedTab: ( index -- ) + \ *G Selects a tab in the tab control. + \ *P Note: A tab control does not send a TCN_SELCHANGING or TCN_SELCHANGE + \ ** notification message when a tab is selected using this message. 0 swap TCM_SETCURSEL SendMessage:self drop ;M :M GetRowCount: ( -- n ) + \ *G Retrieves the current number of rows of tabs in a tab control. 0 0 TCM_GETROWCOUNT SendMessage:self ;M :M AutoSize: ( -- ) + \ *G Resize the control to fit in the client area of the parent window. tempRect.AddrOf GetClientRect: Parent 0 0 Right: tempRect Bottom: tempRect \ x,y,h,w *************** *** 2350,2356 **** --- 2370,2433 ---- z" " ;M + :M Handle_Notify: { w l \ ncode tabid -- f } + \ *G Handle the notification messages of the tab control. This method must + \ ** be called within the WM_NOTIFY handler of the parent window. + \ *P Currently only these notification messages are handled: + \ *L + \ *| TCN_SELCHANGE | Notifies a tab control's parent window that the currently selected tab has changed. | + \ *| TCN_SELCHANGING | Notifies a tab control's parent window that the currently selected tab is about to change. | + w LOWORD to tabID + l 2 cells+ @ to ncode + ncode + case + TCN_SELCHANGE of l On_SelChanged: [ self ] endof + TCN_SELCHANGING of l On_SelChanging: [ self ] endof + false swap \ default + endcase ;M + + :M On_SelChanged: ( l -- f ) + \ *G Handle the TCN_SELCHANGE notification message. + \ ** Default calls the \i change function \d set with the \i IsChangeFunc: \d method. + self selchange-func dup 0= abort" SelChanged function not set!" + execute ;M + + :M On_SelChanging: ( l -- f ) + \ *G Handle the TCN_SELCHANGING notification message. + \ ** Default calls the \i changeing function \d set with the \i IsChangingFunc: \d method. + self selchanging-func dup 0= abort" SelChanging function not set!" + execute ;M + + :M IsChangeFunc: ( cfa -- ) + \ *G Set the \i change function \d. This function es executed when + \ ** the currently selected tab has changed. + to selchange-func ;M + + :M IsChangingFunc: ( cfa -- ) + \ *G Set the \i changeing function \d. This function es executed when + \ ** the currently selected tab is about to change. + to selchanging-func ;M + + : default-func ( lParam obj -- false ) + \ *G The default \i change(-ing) function \d. + \ *P \i lParam \d is the adress of the Address of an NMHDR structure. + \ ** \i obj \d is the address of the TabControl object that has send the + \ ** notification message. + 2drop false ; + + :M ClassInit: ( -- ) + \ *G Initialise the class. + ClassInit: Super + 0 to style + tc_item /tc_item erase + -1 to iImage \ default no image + ['] default-func to selchange-func + ['] default-func to selchanging-func + ;M + ;Class \ *G End of TabControl class + \ *P For a demo how to use the TabControl see: TabControlDemo.f + \ *T ExControls -- More (enhanced) classes for none standard windows controls. |