:Class EditControl <Super CONTROL
Class for Edit controls. An edit control is a rectangular control window typically used in a dialog box to permit the user to enter and edit text by typing on the keyboard.
:M ClassInit: ( -- )
Initialise the class.
:M StartSize: ( -- width height )
Get the start size of the control. Default size is 100 x 25.
:M WindowStyle: ( -- Style )
Get the window style of the control. Default style is: WS_BORDER, WS_TABSTOP and ES_AUTOHSCROLL.
:M Start: ( Parent -- )
Create the control.
:M SetWmChar: ( pWmChar -- )
Install the WM_CHAR filter function.
:M SetWmKeyDown: ( pWmKeyDown -- )
Install the WM_KEYDOWN filter function.
Install these filter functions if you want to capture certain keys, like Return or F3, or whatever.
:M SetWmKillFocus: ( pWmKillFocus -- )
Install the WM_KILLFOCUS filter function.
:M SubClass: ( hWnd Parent -- )
Subclass this control.
;Class
End of EditControl class
:Class ComboControl <Super CONTROL
Class for editable combo box controls.
:M StartSize: ( -- width height )
Get the start size of the control
:M WindowStyle: ( -- Style )
Get the window style of the control. The default style is: CBS_DROPDOWN, WS_VSCROLL, WS_TABSTOP, WS_VISIBLE and ES_AUTOHSCROLL.
:M SetWmChar: ( pWmChar -- )
install the WM_CHAR filter function for the EditControl of the combo box.
:M SetWmKeyDown: ( pWmKeyDown -- )
install the WM_KEYDOWN filter function for the EditControl of the combo box.
:M SetWmKillFocus: ( pWmKillFocus -- )
install the WM_KILLFOCUS filter function for the EditControl of the combo box.
:M InsertString: ( adr len -- )
Insert a string into the combo box
:M GetString: ( adr index -- )
Use: GetString: to get indexed items out of the combo box string list Use: GetText: to get the current combo box string.
:M GetCount: ( -- n1 )
Use: GetCount: to get the count of items in the combo box string list.
:M Start: ( Parent -- )
Create the control.
;Class
End of ComboControl class
:Class ComboListControl <Super ComboControl
Class for select only combo box controls.
:M WindowStyle: ( -- Style )
Get the window style of the control. The default style is: CBS_DROPDOWNLIST.
;Class
End of ComboListControl class
:Class ListControl <Super CONTROL
Class for list box controls.
:M WindowStyle: ( -- Style )
Get the window style of the control. The default style is: WS_VSCROLL, LBS_NOTIFY, LBS_NOINTEGRALHEIGHT and WS_TABSTOP.
:M Start: ( Parent -- )
Create the control.
;Class
End of ListControlControl class
:Class GroupControl <Super CONTROL
Class for group controls.
:M WindowStyle: ( -- Style )
Get the window style of the control. The default style is: BS_GROUPBOX.
:M Start: ( Parent -- )
Create the control.
;Class
End of GroupControl class
:Class StaticControl <Super CONTROL
Class for static controls.
:M Start: ( Parent -- )
Create the control.
;Class
End of StaticControl class
:Class CheckControl <Super CONTROL
Class for check box controls.
:M WindowStyle: ( -- style )
Get the window style of the control. The default style is: BS_AUTOCHECKBOX, and WS_TABSTOP.
:M Start: ( Parent -- )
Create the control.
;Class
End of CheckControl class
:Class RadioControl <Super CONTROL
Class for radio button controls.
:M WindowStyle: ( -- style )
Get the window style of the control. The default style is: BS_AUTORADIOBUTTON, and WS_TABSTOP.
:M Start: ( Parent -- )
Create the control.
;Class
End of RadioControl class
:Class ButtonControl <Super CONTROL
Class for push button controls.
:M ClassInit: ( -- )
Initialise the class.
:M SetFunc: ( cfa -- )
Set the button function. This function es executed when the button is pressed whith a click with the left mouse button
:M WindowStyle: ( -- style )
Get the window style of the control. The default style is: BS_PUSHBUTTON, and WS_TABSTOP.
:M Start: ( Parent -- )
Create the control.
;Class
End of ButtonControl class
:CLASS DialogWindow <Super Window
Base class for windows that contain controls.
:M ClassInit: ( -- )
Initialise the class.
;Class
End of DialogWindow class
:Class Statusbar <Super Control
Status bar control
A status bar is a horizontal window at the bottom of a parent window in which an application can display various kinds of status information.
This status bar control has only one part to display information.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M Start: ( Parent -- )
Create the control.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: WS_CHILD WS_VISIBLE or.
:M RaisedBorder: ( -- )
The text is drawn with a border to appear lower than the plane of the window (default).
:M NoBorder: ( -- )
The text is drawn without borders.
:M SunkenBorder: ( -- )
The text is drawn with a border to appear higher than the plane of the window.
:M ClassInit: ( -- )
Initialise the class.
:M MinHeight: ( #pixels -- )
Sets the minimum height of the status window's drawing area.
The minimum height is the sum of #pixels and twice the width, in pixels, of the vertical border of the status window.
An application must use the Redraw: method to redraw the window.
:M GetBorders: ( -- hWidth vWidth divWidth )
Retrieves the current widths of the horizontal and vertical borders of the status window.
hWidth is the width of the horizontal border.
vWidth is the width of the vertical border.
divWidth is the width of the border between rectangles.
:M Redraw: ( -- )
Redraw the statusbar after changes (e.g. size).
:M SetText: ( szText -- )
Sets the text in the status window.
Use RaisedBorder: , NoBorder: or SunkenBorder: to set the the style how the text is drawn.
:M Clear: ( -- )
clears text in the status window.
:M Setfont: ( handle -- )
Set the font in the control.
;Class
End of Statusbar class
:Class MultiStatusbar <Super Statusbar
Status bar control
A status bar is a horizontal window at the bottom of a parent window in which an application can display various kinds of status information.
This status bar control can have multiple parts to display information.
:M Start: ( Parent -- )
Create the control.
:M SetParts: ( aWidths nParts -- )
Sets the number of parts in the status window and the coordinate of the right edge of each part.
nParts Number of parts to set (cannot be greater than 256).
aWidths is a pointer to an integer array. The number of elements is specified in nParts. Each element specifies the position, in client coordinates, of the right edge of the corresponding part. If an element is -1, the right edge of the corresponding part extends to the border of the window.
Note: aWidths must be valid until SetParts: is used again!
:M GetParts: ( -- aWidths nParts )
Gets the number of parts in the status window and the coordinate of the right edge of each part.
:M SetSimple: ( -- )
Reset the status bar to show only one part.
:M SetMulti: ( -- )
Set the status bar to show all parts set with SetParts: before.
:M SetText: ( szText n -- )
Sets the text in the n'th part of status window.
Use RaisedBorder: , NoBorder: or SunkenBorder: to set the the style how the text is drawn.
;Class
End of MultiStatusbar class
:Class TextBox <Super EditControl
Class for Edit controls. An edit control is a rectangular control window typically used in a dialog box to permit the user to enter and edit text by typing on the keyboard.
This is an enhanced Version of the EditControl class.
:M ClassInit: ( -- )
Initialise the class.
:M SetWmSetFocus: ( xt -- )
Set handler for WM_SETFOCUS messages.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
:M ReadOnly: ( f -- )
Set or remove the read-only style of the edit control. A value of TRUE sets the read-only style; a value of FALSE removes it.
:M SetSelection: ( nEnd nStart -- )
Selects a range of characters in the edit control. nEnd specifies the ending character position of the selection. nStart specifies the starting character position of the selection.
The start value can be greater than the end value. The lower of the two values specifies the character position of the first character in the selection. The higher value specifies the position of the first character beyond the selection.
The start value is the anchor point of the selection, and the end value is the active end. If the user uses the SHIFT key to adjust the size of the selection, the active end can move but the anchor point remains the same.
The control displays a flashing caret at the end position regardless of the relative values of start and end.
:M GetSelection: ( -- nEnd nStart )
Get the starting and ending character positions of the current selection in the edit control
:M SelectAll: ( -- )
Set the focus to the edit control and select all the text in the control.
:M RemoveSelection: ( -- )
Remove any selection.
:M GetCursor: ( -- n )
Get location of cursor (chars from start)
:M IsModified?: ( -- f )
Get the state of an edit control's modification flag. The flag indicates whether the contents of the edit control have been modified.
:M SetModify: ( f -- )
Sets or clears the modification flag for an edit control. The modification flag indicates whether the text within the edit control has been modified.
:M NotModified: ( -- )
Depreacted method. Use SetModify: instead.
:M Undo?: ( -- f )
Check is there is an operation in the control's undo queue.
:M Undo: ( -- )
Undoes the last edit control operation in the control's undo queue.
:M Redo?: ( -- f )
Check is there is an operation in the control's redo queue.
:M Redo: ( -- )
Redoes the last edit control operation in the control's redo queue.
:M Cut: ( -- )
Delete (cut) the current selection, if any, in the edit control and copy the deleted text to the clipboard in CF_TEXT format.
:M Copy: ( -- )
Copy the current selection to the clipboard in CF_TEXT format.
:M Paste: ( -- )
Copy the current content of the clipboard to the edit control at the current caret position. Data is inserted only if the clipboard contains data in CF_TEXT format.
:M Clear: ( -- )
Delete selected text.
:M SetFont: ( handle -- )
Set the font in the control.
:M SetTextLimit: ( n -- )
Set the text limit of an edit control.
n Specifies the maximum number of characters the user can enter. This number does
not include the null terminator.
Edit controls on Windows NT/ 2000: If this parameter is zero, the text length is set
to 0x7FFFFFFE characters for single-line edit controls or -1 for multiline edit controls.
Edit controls on Windows 95/98: If this parameter is zero, the text length is set to 0x7FFE
characters for single-line edit controls or 0xFFFF for multiline edit controls.
The SetTextLimit: method limits only the text the user can enter. It does not affect any text already in the edit control when the message is sent, nor does it affect the length of the text copied to the edit control by the SetText: method. If an application uses the SetText: method to place more text into an edit control than is specified in the SetTextLimit: method, the user can edit the entire contents of the edit control.
Before the SetTextLimit: method is called, the default limit for the amount of text a user can enter in an edit control is 32,767 characters.
Edit controls on Windows NT/ 2000: For single-line edit controls, the text limit is either 0x7FFFFFFE bytes or the value of n , whichever is smaller. For multiline edit controls, this value is either -1 bytes or the value of n , whichever is smaller.
Edit controls on Windows 95/98: For single-line edit controls, the text limit is either 0x7FFE bytes or the value of n , whichever is smaller. For multiline edit controls, this value is either 0xFFFF bytes or the value of n , whichever is smaller.
:M GetTextEx: { buffer$ maxlen -- buffer$ len }
Copies the text of the edit control into a buffer.
buffer$ is the address of the buffer that will receive the text.
maxlen Specifies the maximum number of characters to copy to the buffer, including the NULL character. If the text exceeds this limit, it is truncated.
If the method succeeds, len is the length, in characters, of the copied string, not including the terminating null character.
:M SetTextZ: ( addrz -- )
Copy the text from the 0 terminated string addrz into the edit control.
;Class
End of TextBox class
:Class PassWordBox <super TextBox
Class for Edit controls. All characters in the control are displayed as an asterisk (*).
:M WindowStyle: ( -- style )
Get the window style of the control. The default style is ES_PASSWORD.
;Class
End of PassWordBox class
:Class MultiLineTextBox <super TextBox
Class for multi line text edit controls.
:M WindowStyle: ( -- style )
Get the window style of the control. The default style is: ES_AUTOVSCROLL, ES_MULTILINE, ES_WANTRETURN and ES_NOHIDESEL.
:M SetTabStops: ( tabarray #tabs -- )
Sets the tab stops in the multiline edit control. When text is copied to the control, any tab character in the text causes space to be generated up to the next tab stop.
#tabs Specifies the number of tab stops contained in the array. If this parameter is zero, the lParam parameter is ignored and default tab stops are set at every 32 dialog template units. If this parameter is 1, tab stops are set at every n dialog template units, where n is the distance pointed to by the tabarray parameter. If this parameter is greater than 1, tabarray is a pointer to an array of tab stops.
tabarray Pointer to an array of unsigned integers specifying the tab stops, in dialog template units. If the #tabs parameter is 1, this parameter is a pointer to an unsigned integer containing the distance between all tab stops, in dialog template units.
:M DefaultTabs: ( -- )
Set the default tab stops in the multiline edit control (16 dialog template units).
:M SetMargins: ( left right -- )
Sets the widths of the left and right margins for an edit control.
:M SelectAll: ( -- )
Select all the text in the multiline edit control.
:M GetLine: ( -- n )
Return location of the cursor (lines from start).
:M Wrap: ( -- )
Set control to wrap text. Note this method does nothing!
:M Unwrap: ( -- )
Set control to scroll instead of wrap text. Note this method does nothing!
:M GetLineCount: ( -- n )
Retrieves the number of lines in the multiline edit control.
The return value is an integer specifying the total number of text lines in the multiline edit control. If the control has no text, the return value is 1. The return value will never be less than 1.
:M GetSelText: ( addr -- n )
Retrieves the currently selected text from the edit control.
addr is the address of the a buffer that receives the selected text. The calling application must ensure that the buffer is large enough to hold the selected text.
Note: The text is copyied to the clipboard, too!
:M LineScroll: ( n -- )
scroll n lines
;Class
End of MultiLineTextBox class
:Class RichEditControl <Super MultiLineTextBox
Class for rich edit controls.
:M Start: ( Parent -- )
Create the control.
:M GetSelText: ( addr -- n )
Retrieves the currently selected text from the edit control.
addr is the address of the a buffer that receives the selected text. The calling application must ensure that the buffer is large enough to hold the selected text.
:M GetLines: ( -- nr )
Depreacted method. Use GetLineCount: instead.
;Class
End of RichEditControl class
:Class ComboBox <super ComboControl
ComboBox control (enhanced Version of the ComboControl class)
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M SetDir: ( dirz$ attrib -- )
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.
attrib 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:
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. |
dirz$ 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.
:M AddStringTo: ( z"string" -- )
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.
:M SetSelection: ( n -- )
Select a string in the list of a combo box.
:M GetSelectedString: ( -- addr cnt )
Get the selected from the combo box. Note: The string is returned in the global NEW$ .
:M Setfont: ( handle -- )
Set the font in the control.
:M InsertStringAt: ( lpszString posn -- )
Insert string at the specified position.
posn 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.
lpszString is a null-terminated string to be inserted.
:M DeleteString: ( index -- )
Delete a string.
index specifies the zero-based index of the string to delete.
:M Clear: ( -- )
Remove all strings from the combo box
:M Find: ( lpszString -- index )
Search the list for an item beginning with the string (case-insensitive)
:M FindExact: ( lpszString -- index )
Find the first item that matches the string exactly (case-insensitive)
:M GetCount: ( -- n )
Return count of items in list
:M SelectString: ( lpszString -- index )
Select item beginning with string
:M GetStringAt: ( index -- a n )
Return string of specified item.
:M GetCurrent: ( -- index )
return current selection item
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
;Class
End of ComboBox class
:Class ComboListBox <super ComboBox
ComboBox list control
:M WindowStyle: ( -- style )
Get the window style of the control. The default style is: CBS_DROPDOWNLIST
:M Start: ( Parent -- )
Create the control.
;Class
End of ComboListBox class
:Class ListBox <super ListControl
ListBox control (single selection) (enhanced Version of the ListControl class)
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M SetDir: ( dirz$ attrib -- )
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.
attrib 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:
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. |
dirz$ 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.
:M Clear: ( -- )
Remove all items from the list box.
:M AddStringTo: ( z"string" -- )
Add a string to a list box. If the list box does not have the LBS_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.
:M SetSelection: ( n -- )
Select a string and scroll it into view, if necessary. When the new string is selected, the list box removes the highlight from the previously selected string.
n specifies the zero-based index of the string that is selected. If this parameter is -1, the list box is set to have no selection.
Windows 95/98: The n parameter is limited to 16-bit values. This means list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size in bytes of the items in a list box is limited only by available memory.
:M GetSelection: ( -- n )
Retrieve the index of the currently selected item, if any.
The return value is the zero-based index of the currently selected item. If there is no selection, the return value is LB_ERR.
:M GetString: ( index -- addr n )
Retrieve a string from the list box.
The return value is the length of the string, in chars, excluding the terminating null character. If n does not specify a valid index, the return value is LB_ERR.
:M GetSelectedString: ( -- addr cnt )
Retrieve the currently selected string from the list box. Note: The string is returned in the global NEW$ .
:M GetCount: ( -- n )
Retrieve the number of items in the list box.
:M Setfont: ( handle -- )
Set the font in the control.
:M AddString: ( lpszString -- )
Add a string to a list box. If the list box does not have the LBS_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. Note: This method ABORT's on error.
:M InsertString: ( lpszString index -- )
Insert a string into the list box. Unlike the AddString: method, the InsertString: method does not cause a list with the LBS_SORT style to be sorted. Note: This method ABORT's on error.
index 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.
Windows 95/98: The index parameter is limited to 16-bit values. This means list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size in bytes of the items in a list box is limited only by available memory.
:M DeleteString: ( index -- )
Delete a string from the list box.
index specifies the zero-based index of the string to be deleted.
Windows 95/98: The index parameter is limited to 16-bit values. This means list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size in bytes of the items in a list box is limited only by available memory.
:M Find: ( lpszString -- index )
Find the first string in the list box that begins with the specified string. The entire list box is searched from the beginning. The search is case independent, so the string ( lpszString ) can contain any combination of uppercase and lowercase letters.
The return value is the zero-based index of the matching item, or LB_ERR if the search was unsuccessful.
:M FindExact: ( lpszString -- index )
Find the first list box string that exactly matches the specified string, except that the search is not case sensitive. The entire list box is searched from the beginning.
The return value is the zero-based index of the matching item, or LB_ERR if the search was unsuccessful.
:M GetCurrent: ( -- index )
Retrieve the index of the currently selected item, if any.
The return value is the zero-based index of the currently selected item. If there is no selection, the return value is LB_ERR.
:M SelectString: ( lpszString -- index )
Search the list box for an item that begins with the characters in a specified string. If a matching item is found, the item is selected. The entire list box is searched from the beginning.
If the search is successful, the return value is the index of the selected item. If the search is unsuccessful, the return value is LB_ERR and the current selection is not changed.
:M GetState: ( index -- f )
Retrieve the selection state of an item. If an item is selected, the return value is true; otherwise, it is false. Note: This method ABORT's on error.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
:M SetTabStops: ( addr cnt -- )
Set the tab-stop positions in the list box.
cnt Specifies the number of tab stops in the list box.
addr is a pointer to the first member of an array of integers containing the tab stops. The integers represent the number of quarters of the average character width for the font that is selected into the list box. For example, a tab stop of 4 is placed at 1.0 character units, and a tab stop of 6 is placed at 1.5 average character units. However, if the list box is part of a dialog box, the integers are in dialog template units. The tab stops must be sorted in ascending order; backward tabs are not allowed.
The list box must have been created with the LBS_USETABSTOPS style.
;Class
End of ListBox class
:Class MultiListbox <Super Listbox
ListBox control MultiListbox allows multiple selections to be made. Click once on an item to select it. Click again to deselect.
:M WindowStyle: ( -- style )
Get the window style of the control. The default style is: LBS_MULTIPLESEL
:M Select: ( index -- )
Select a string in the list box.
index specifies the zero-based index of the string to set. If this parameter is -1, the selection is added to all strings. Note: This method ABORT's on error.
:M Unselect: ( index -- )
Deselect a string in the list box.
index specifies the zero-based index of the string to set. If this parameter is -1, the selection is removed from all strings. Note: This method ABORT's on error.
:M GetSelCount: ( -- n )
Retrieve the total number of selected items in the list box.
:M GetSelectedItems: ( array cnt -- count )
Fill a buffer with an array of integers that specify the item numbers of selected items in the list box.
array is a pointer to a buffer large enough for the number of integers specified by the cnt parameter.
cnt specifies the maximum number of selected items whose item numbers are to be placed in the buffer. Windows 95/98: The cnt parameter is limited to 16-bit values. This means list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size in bytes of the items in a list box is limited only by available memory.
;Class
End of MultiListbox class
:Class MultiExListbox <Super MultiListbox
ListBox control Also allows multiple selections to be made. The difference is that Ctrl-Click selects and unselects individual items and Shift-Click will select a range (as will Shift-Drag.
:M WindowStyle: ( -- style )
Get the window style of the control. The default style is: LBS_EXTENDEDSEL
;Class
End of MultiExListbox class
:Class DragListbox <Super Listbox
ListBox control Allows dragging of items in list box to re-order them requires processing of drag list notification messages by the application to actually do the dragging.
:M WindowStyle: ( -- style )
Get the window style of the control. The default style is: LBS_EXTENDEDSEL
:M Start: ( Parent -- )
Create the control.
;Class
End of DragListbox class
:Class UpDownControl <Super Control
Up-Down control
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.
For 16 Bit values only.
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: WS_BORDER, UDS_ARROWKEYS, UDS_SETBUDDYINT and UDS_ALIGNRIGHT.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M Start: ( Parent -- )
Create the control.
:M StartSize: ( -- cx cy )
default window size
:M StartPos: ( -- x y )
default window position
:M SetBuddy: ( hBuddy -- )
Sets the buddy window for the up-down control.
:M GetValue: ( -- n )
Retrieves the current position of the up-down control. Note: This method ABORT's on error.
:M SetValue: ( n -- )
Set the current position for the up-down control.
:M SetDecimal: ( -- )
Sets the radix base for the control to decimal. Decimal numbers are signed.
:M SetHex: ( -- )
Sets the radix base for the control to hexadecimal. Hexadecimal numbers are always unsigned.
:M GetBase: ( -- n )
Get the current radix base (that is, either base 10 or 16).
:M SetRange: ( lower upper -- )
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.
:M GetRange: ( -- lower upper )
Retrieves the minimum and maximum positions (range) for the control.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
;Class
End of UpDownControl control
:Class CheckBox <super CheckControl
Class for check buttons (enhanced Version of the CheckControl class)
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M IsButtonChecked?: ( -- f )
send message to self through parent
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
:M Setfont: ( handle -- )
Set the font in the control.
;Class
End of CheckBox class
:Class RadioButton <super RadioControl
Class for radio buttons (enhanced Version of the RadioControl class)
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
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.
:M IsButtonChecked?: ( -- f )
Check if the radio button is checked or unchecked.
:M CheckButton: ( -- )
Set the button state to checked.
:M UnCheckButton: ( -- )
Set the button state to unchecked.
:M Check: ( f -- )
Set the button state to either checked or unchecked.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
:M Setfont: ( handle -- )
Set the font in the control.
;Class
End of RadioButton class
:Class GroupRadioButton <super RadioButton
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 )
Get the window style of the control. Default is BS_GROUP.
;Class
End of GroupRadioButton class
:Class PushButton <super ButtonControl
Class for push buttons (enhanced Version of the ButtonControl class)
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M Setfont: ( handle -- )
Set the font in the control.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
;Class
End of PushButton class
:Class DefPushButton <Super PushButton
Class for the default push buttons
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: BS_DEFPUSHBUTTON.
;Class
End of DefPushButton class
:Class BitmapButton <Super PushButton
BitmapButton control
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: BS_BITMAP.
;Class
End of BitmapButton class
:Class IconButton <Super PushButton
IconButton control
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: BS_ICON.
:M SetIcon: ( hIcon -- )
set the icon image to use with the button
:M GetIcon: ( -- hIcon)
get the icon image used with the button
;Class
End of IconButton class
:Class GroupBox <super GroupControl
GroupBox control (enhanced Version of the GroupControl class)
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M Setfont: ( handle -- )
Set the font in the control.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
;Class
End of GroupBox class
:Class Label <super StaticControl
Class for static controls
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M Setfont: ( handle -- )
Set the font in the control.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
;Class
End of Label class
|Class StaticImage <Super Label
Base class for static control showing an image. This is an internal class; don't use it directly.
:M ImageType: ( -- ImageType )
Get the image type of the control. ImageType is IMAGE_BITMAP.
:M GetImage: ( -- hImage )
Retrieve a handle to the image associated with the control.
:M SetImage: ( hImage -- )
Associate a new image (icon or bitmap) with the control.
:M SetFont: ( fhndl -- )
Set the font in the control.
;Class
End of StaticImage class
:Class StaticBitmap <Super StaticImage
Static control showing a bitmap.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: SS_BITMAP.
;Class
End of StaticImage class
:Class StaticIcon <Super StaticImage
Static control showing an icon.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: SS_ICON.
:M ImageType: ( -- ImageType )
Get the image type of the control. ImageType is IMAGE_ICON.
;Class
End of StaticIcon class
:Class StaticMetafile <Super StaticImage
Static control showing an enhanced metafile.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: SS_ENHMETAFILE.
:M ImageType: ( -- ImageType )
Get the image type of the control. ImageType is IMAGE_ENHMETAFILE.
;Class
End of StaticMetafile class
:Class StaticFrame <Super Label
Static control showing a frame.
:M BlackRect: ( -- )
Rectangle in the window frame color (default is black).
:M GrayRect: ( -- )
Rectangle in the screen background color (default is gray).
:M WhiteRect: ( -- )
Rectangle in the window background color (default is white).
:M BlackFrame: ( -- )
Frame in the window frame color (default is black).
:M GrayFrame: ( -- )
Frame in the screen background color (default is gray).
:M WhiteFrame: ( -- )
Frame in the window background color (default is white).
:M EtchedFrame: ( -- )
draws an etched frame (frame appears lower than background)
:M SunkenFrame: ( -- )
Draws frame with half-sunken border.
;Class
End of StaticFrame class
:Class Progressbar <Super Control
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.
:M Start: ( Parent -- )
Create the control.
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M +Value: ( n -- )
Advances the current position of the progress bar by a specified increment and redraws the bar to reflect the new position.
:M GetValue: ( -- n )
Returns the current position of the progress bar.
:M SetValue: ( n -- )
Sets the current position for the progress bar and redraws the bar to reflect the new position.
:M SetRange: ( min max -- )
Sets the minimum and maximum values for the progress bar and redraws the bar to reflect the new range.
min is the minimum range value. By default, the minimum value is zero.
max is the maximum range value. By default, the maximum value is 100.
:M SetStep: ( n -- )
Specifies the step increment for the progress bar. The step increment is
:M GetStep: ( -- n )
Returns the current step increment for the progress bar.
:M StepIt: ( -- )
Advances the current position for the progress bar by the step increment and redraws the bar to reflect the new position.
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.
;Class
End of Progressbar class
:Class SmoothProgressbar <Super Progressbar
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.
The progress bar displays progress status in a smooth scrolling bar instead of the default segmented bar.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: PBS_SMOOTH.
;Class
End of SmoothProgressbar class
:Class Trackbar <Super Control
Trackbar control (horizontal)
A trackbar is a window that contains a slider and optional tick marks. When the user moves the slider, using either the mouse or the direction keys, the trackbar sends notification messages to indicate the change.
:M Start: ( Parent -- )
Create the control.
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M GetLineSize: ( -- n )
Retrieves the number of logical positions the trackbar's slider moves in response to keyboard input from the arrow keys, such as the RIGHT ARROW or DOWN ARROW keys. The logical positions are the integer increments in the trackbar's range of minimum to maximum slider positions.
:M SetLineSize: ( n -- )
Sets the number of logical positions the trackbar's slider moves in response to keyboard input from the arrow keys, such as the RIGHT ARROW or DOWN ARROW keys. The logical positions are the integer increments in the trackbar's range of minimum to maximum slider positions.
:M GetPageSize: ( -- n )
Retrieves the number of logical positions the trackbar's slider moves in response to keyboard input, such as the PAGE UP or PAGE DOWN keys, or mouse input, such as clicks in the trackbar's channel. The logical positions are the integer increments in the trackbar's range of minimum to maximum slider positions.
:M SetPageSize: ( n -- )
Sets the number of logical positions the trackbar's slider moves in response to keyboard input, such as the PAGE UP or PAGE DOWN keys, or mouse input, such as clicks in the trackbar's channel. The logical positions are the integer increments in the trackbar's range of minimum to maximum slider positions.
:M GetValue: ( -- n)
Retrieves the current logical position of the slider in the trackbar. The logical positions are the integer values in the trackbar's range of minimum to maximum slider positions.
:M SetValue: ( n -- )
Sets the current logical position of the slider in the trackbar.
:M GetRangeMax: ( -- n )
Retrieves the maximum position for the slider in the trackbar.
:M SetRangeMax: ( max f -- )
Sets the maximum logical position for the slider in the trackbar.
If the f is TRUE, the trackbar is redrawn after the range is set. If this parameter is FALSE, the message sets the range but does not redraw the trackbar.
:M GetRangeMin: ( -- n )
Retrieves the minimum position for the slider in the trackbar.
:M SetRangeMin: ( min f -- )
Sets theminimum logical position for the slider in the trackbar.
If the f is TRUE, the trackbar is redrawn after the range is set. If this parameter is FALSE, the message sets the range but does not redraw the trackbar.
:M GetSelEnd: ( -- n )
Retrieves the ending position of the current selection range in the trackbar. A trackbar can have a selection range only if you specified the TBS_ENABLESELRANGE style when you created it.
:M SetSelEnd: ( end f -- )
Sets the ending logical position of the current selection range in a trackbar. This message is ignored if the trackbar does not have the TBS_ENABLESELRANGE style.
If the f is TRUE, the trackbar is redrawn after the range is set. If this parameter is FALSE, the message sets the range but does not redraw the trackbar.
:M GetSelStart: ( -- n)
Retrieves the starting position of the current selection range in the trackbar. A trackbar can have a selection range only if you specified the TBS_ENABLESELRANGE style when you created it.
:M SetSelStart: ( start f -- )
Sets the starting logical position of the current selection range in the trackbar. This message is ignored if the trackbar does not have the TBS_ENABLESELRANGE style.
If the f is TRUE, the trackbar is redrawn after the range is set. If this parameter is FALSE, the message sets the range but does not redraw the trackbar.
:M GetThumbLength: ( -- n )
Retrieves the length (in Pixel) of the slider in the trackbar.
:M SetThumbLength: ( n -- )
Set the length (in Pixel) of the slider in the trackbar.
:M GetChannelRect: ( lpRect -- )
Retrieves the size and position of the bounding rectangle for the trackbar's channel. (The channel is the area over which the slider moves. It contains the highlight when a range is selected.)
:M GetThumbRect: ( lpRect -- )
Retrieves the size and position of the bounding rectangle for the slider in the trackbar.
:M GetTick: ( iTic -- n )
Retrieves the logical position of a tick mark in a trackbar. The logical position can be any of the integer values in the trackbar's range of minimum to maximum slider positions.
:M SetTick: ( pos -- )
Sets a tick mark in a trackbar at the specified logical position.
:M ClearTicks: ( f -- )
Removes the current tick marks from a trackbar. This message does not remove the first and last tick marks, which are created automatically by the trackbar.
If the f is TRUE, the trackbar is redrawn after the tick marks are cleared. If this parameter is FALSE, the message clears the tick marks but does not redraw the trackbar.
:M GetTickPos: ( iTic -- n )
Retrieves the current physical position of a tick mark in a trackbar.
:M GetTicksPtr: ( -- pointer )
Retrieves the address of an array that contains the positions of the tick marks for a trackbar.
Returns the address of an array of DWORD values. The elements of the array specify the logical positions of the trackbar's tick marks, not including the first and last tick marks created by the trackbar. The logical positions can be any of the integer values in the trackbar's range of minimum to maximum slider positions.
The number of elements in the array is two less than the tick count returned by the GetNumTicks: method. Note that the values in the array may include duplicate positions and may not be in sequential order. The returned pointer is valid until you change the trackbar's tick marks.
:M SetTickFreq: ( pos freq -- )
Sets the interval frequency for tick marks in a trackbar. For example, if the frequency is set to two, a tick mark is displayed for every other increment in the trackbar's range. The default setting for the frequency is one; that is, every increment in the range is associated with a tick mark.
The trackbar must have the TBS_AUTOTICKS style to use this method.
:M GetNumTicks: ( -- n )
Retrieves the number of tick marks in the trackbar.
The GetNumTicks: method counts all of the tick marks, including the first and last tick marks created by the trackbar.
:M SetRange: ( min max f -- )
Sets the range of minimum and maximum logical positions for the slider in the trackbar.
If the f parameter is TRUE, the trackbar is redrawn after the range is set. If this parameter is FALSE, the message sets the range but does not redraw the trackbar.
:M SetSel: ( min max f -- )
Sets the starting and ending positions for the available selection range in the trackbar.
If the f is TRUE, the message redraws the trackbar after the selection range is set. If this parameter is FALSE, the message sets the selection range but does not redraw the trackbar.
This method is ignored if the trackbar does not have the TBS_ENABLESELRANGE style.
:M ClearSel: ( f -- )
Clears the current selection range in the trackbar.
If the f is TRUE, the trackbar is redrawn after the selection is cleared.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
;Class
End of Trackbar class
:Class VTrackBar <super TrackBar
Trackbar control (vertical)
A trackbar is a window that contains a slider and optional tick marks. When the user moves the slider, using either the mouse or the direction keys, the trackbar sends notification messages to indicate the change.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: TBS_VERT.
;Class
End of VTrackBar class
|Class ScrollBar <Super Control
Scrollbar control Note: this is an internal class. Don't use it directly.
:M ClassInit: ( -- )
Initialise the class.
:M WindowStyle: ( -- style )
Get the window style of the control.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M Start: ( Parent -- )
Create the control.
:M SetFont: ( hndl -- )
Set the font in the control. Note that this is a dummy method in this class.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
:Class HorizScroll <Super ScrollBar
Scrollbar control (vorizontal).
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: SBS_HORZ.
;Class
End of HorizScroll class
:Class VertScroll <Super ScrollBar
Scrollbar control (vertical).
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: SBS_VERT.
;Class
End of VertScroll class
:Class SizeBox <Super ScrollBar
Size box control.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: SBS_SIZEGRIP.
;Class
End of SizeBox class
|class DateTimeControl <Super Control
Generic class for methods common to MonthCalendar and DateTimePicker controls.
:M ClassInit: ( -- )
Initialise the class.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: WS_BORDER.
The MonthCalendar and TimeDatePicker controls both use the _SystemTime structure defined in the file ANSFILE.F , the members of which are;
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(s) (0-59). wSecond The second(s) (0-59). wMilliseconds The millisecond(s) (0-999).
:Class MonthCalendar <Super DateTimeControl
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.
:M Start: ( Parent -- )
Create the control.
:M MinSize: ( -- x y )
Return minimum size required to display a month.
:M GetDate: ( -- day month year )
Retrieves the currently selected date.
day is the day of the month (0-31).
Month is the month (January = 1; December = 12)
year is the year (1601 - 30827).
:M GetToday: ( -- day month year )
Retrieves the date information for the date specified as "today".
day is the day of the month (0-31).
Month is the month (January = 1; December = 12)
year is the year (1601 - 30827).
;Class
End of MonthCalendar class
:Class DateTimePicker <Super DateTimeControl
Date and Time Picker control
:M Start: ( Parent -- )
Create the control.
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 SetCustomFormat: ( z"format" -- )
set the display format for time or date
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 GetTime: ( -- hrs min secs )
get user selected time
:M SetTime: ( hr min sec -- )
set time for user to edit
:M GetDate: ( -- day month year )
get user selected date
;Class
End of DateTimePicker class
:Class TabControl <Super Control
Tab control.
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
The TCITEM struct.
:M IsMask: ( n -- )
Set the mask member of the TCITEM struct. Possible values are:
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 Mask: ( -- n )
Get the mask member of the TCITEM struct.
:M IsPszText: ( addr -- )
Set the mask member of the TCITEM struct.
:M PszText: ( -- n )
Get the pszText member of the TCITEM struct.
:M IscchTextMax: ( n -- )
Set the pszText member of the TCITEM struct.
:M cchTextMax: ( -- n )
Get the cchTextmax member of the TCITEM struct.
:M IsiImage: ( n -- )
Set the iImage member of the TCITEM struct.
:M iImage: ( -- n )
Get the iImage member of the TCITEM struct.
:M IsLparam: ( n -- )
Set the lparam member of the TCITEM struct.
:M LParam: ( -- n )
Get the lparam member of the TCITEM struct.
:M Start: ( Parent -- )
Create the control.
:M WindowStyle: ( -- style )
Get the window style of the control. Default style is: TCS_FOCUSONBUTTONDOWN.
:M AddStyle: ( n -- )
Set any additional style of the control. Must be done before the control is created. Possible values are:
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. |
:M TC_Item: ( -- addr )
Get the address of the TCITEM struct.
:M InsertTab: ( index -- )
Inserts a new tab into the tab control.
mask and other members of the TCITEM struct must be set.
:M GetTabInfo: ( index -- )
Retrieves information about a tab in the tab control.
:M SetTabInfo: ( index -- )
Sets some or all of a tab's attributes.
mask and other members of the TCITEM struct must be set.
:M GetTabCount: ( -- n )
Retrieves the number of tabs in the tab control.
:M DeleteTab: ( index -- )
Removes an item from the tab control.
:M DeleteAllTabs: ( -- )
Removes all items from the tab control.
:M AdjustRect: ( rect flag -- )
Calculates a tab control's display area given a window rectangle, or calculates the window rectangle that would correspond to a specified display area.
rect is the address of a RECT structure that specifies the given rectangle and receives the calculated rectangle.
flag 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.
:M ClientSize: ( -- l t r b )
Return size of display area of the tab control.
:M WindowSize: ( l t r t -- l t r b )
Given display area return window size required.
:M GetSelectedTab: ( -- index )
Determines the currently selected tab in the tab control.
:M SetSelectedTab: ( index -- )
Selects a tab in the tab control.
Note: A tab control does not send a TCN_SELCHANGING or TCN_SELCHANGE notification message when a tab is selected using this message.
:M GetRowCount: ( -- n )
Retrieves the current number of rows of tabs in a tab control.
:M Enable: ( f -- )
Enable the control.
:M Disable: ( -- )
Disable the control.
:M Setfont: ( handle -- )
Set the font in the control.
:M WindowTitle: ( -- null$ )
SintillaControl asks for window title of parent
:M Handle_Notify: { w l \ ncode tabid -- f }
Handle the notification messages of the tab control. This method must be called within the WM_NOTIFY handler of the parent window.
Currently only these notification messages are handled:
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. |
:M On_SelChanged: ( l -- f )
Handle the TCN_SELCHANGE notification message. Default calls the change function set with the IsChangeFunc: method.
:M On_SelChanging: ( l -- f )
Handle the TCN_SELCHANGING notification message. Default calls the changeing function set with the IsChangingFunc: method.
:M IsChangeFunc: ( cfa -- )
Set the change function . This function es executed when the currently selected tab has changed.
:M IsChangingFunc: ( cfa -- )
Set the changeing function . This function es executed when the currently selected tab is about to change.
: default-func ( lParam obj -- false )
The default change(-ing) function .
lParam is the adress of the Address of an NMHDR structure. obj is the address of the TabControl object that has send the notification message.
:M ClassInit: ( -- )
Initialise the class.
;Class
End of TabControl class
For a demo how to use the TabControl see: TabControlDemo.f
:Class VertButtonBar <super VButtonBar
VertButtonBar control
This is an enhanced Version of the VButtonBar class.
Note: this control isn't one of the standard control of MS windows.
:M SetFont: { fonthndl \ hb1 -- }
Set the font in the control.
:M Enable: { flag \ hb1 -- }
Enable the control.
:M Disable: ( -- )
Disable the control.
;Class
End of VertButtonBar class
:Class HorizButtonBar <super HButtonBar
HorizButtonBar control
This is an enhanced Version of the HButtonBar class.
Note: this control isn't one of the standard control of MS windows.
:M SetFont: { fonthndl \ hb1 -- }
Set the font in the control.
:M Enable: { flag \ hb1 -- }
Enable the control.
:M Disable: ( -- )
Disable the control.
;Class
End of HorizButtonBar class
Document $Id: Controls.htm,v 1.17 2007/05/26 10:24:12 dbu_de Exp $