[top]
DESCRIPTION
RexxDW is an external function package that allows a Rexx programmer to write cross platform GUI applications, using a lightweight portable GUI API called Dynamic Windows (dwindows).
USAGE
The fundamental building blocks of a RexxDW program consist of two major components; Widgets and event handlers or Callbacks.
Various Widgets are packed into the required layout and events are connected to the Widgets to carry out the required behaviour.
The structure of a RexxDW program consists of various initialisation; creation of the Widgets, Packing them, connecting Callbacks, and then calling the event loop handler to dispatch the event to the appropriate Callbacks. The Callbacks are normal Rexx subroutines.
There are two event loop handlers depending on whether your Rexx interpreter supports the RexxCallback() API. DW_main() is used for interpreters that have RexxCallback(); DW_main_iteration() is used for those interpretes that don't.
DERIVED FROM
All of the Functions in RexxDW are based on the same function in dwindows. Some function arguments will differ due to the nature of the Rexx API interface.
The format of the function names is dw_(target)_(action)[_(options)]. eg. for Tree Widgets, Functions act on both the Tree itself and the Tree items within the Tree widget, so DW_tree_new() executes the "new" action on the Tree widget, DW_tree_item_change() executes the "change" action on the Tree item, not the Tree.
Some dwindows Functions are not available in RexxDW, mainly because they are not able to be implemented: dw_icon_load, etc...
A number of Functions have been added to RexxDW that are not part of dwindows: DW_and, DW_or, DW_radiobutton_set, DW_radiobutton_get,...
TODO
BUGS
PORTABILITY
RexxDW runs on Windows 9x/Me/NT/2k/XP, OS/2 3.0+ and on any Un*x platform that has GTK+ 1.x installed (but works better with GTK+ 2.x).
SEE ALSO
RexxDW lives at http://rexxdw.sf.net Dynamic Windows lives at http://dwindows.netlabs.org
[top]
DESCRIPTION
The following "Constants" are defined when RexxDW starts. By default, all Constants are stored in an array with the stem preset to !REXXDW.! This can be changed by using the 'CONSTANTPREFIX' value of DW_variable(). If you use "Procedure" on your labels, you MUST "EXPOSE !REXXDW." or the stem you set with DW_variable() will not be visible. To reference the Constants defined below, you must prefix them. So the "constant" DW_DESKTOP would be, by default, referenced in your code as !REXXDW.!DW_DESKTOP.
SEE ALSO
NAME
MiscellaneousFlags
DESCRIPTION
The following is a list of Miscellaneous flags.
ATTRIBUTES
NAME
FileDialogFlags
DESCRIPTION
The following is a list of the pre-defined flags that are used in a call to DW_file_browse() to determine the Dialog type displayted.
ATTRIBUTES
SEE ALSO
NAME
ContainerScrollFlags
DESCRIPTION
The following is a list of the pre-defined flags that are used in a call to DW_container_scroll() to indicate the direction of scrolling.
ATTRIBUTES
SEE ALSO
NAME
TextAttributeFlags
DESCRIPTION
The following is a list of the pre-defined flags that are used in a call to DW_window_set_style() to specify the formatting of text within a widget.
ATTRIBUTES
The following work on all platforms:
The following attributes only have an effect on OS/2:
SEE ALSO
NAME
WindowStyleFlags
DESCRIPTION
The following is a list of the pre-defined flags that can be used when creating a new Window. Any number of values from "Style Types" can be used plus optionally one value from "Initial State Types" are logically "or"ed together using DW_or().
ATTRIBUTES
Style Types:
Initial State Types:
SEE ALSO
NAME
ContainerColumnFlags
DESCRIPTION
The following is a list of the pre-defined flags that can be used when creating a container widget. When used in DW_container_setup() or DW_filesystem_setup(), one value from "Column Types", one value from "Alignment" and any value from "Separators" are logically "or"ed together using DW_or().
ATTRIBUTES
Column Types:
Alignment:
Separators (not applicable on all platforms):
SEE ALSO
NAME
ContainerQueryFlags
DESCRIPTION
The following is a list of the pre-defined flags that can be used when querying a container widget.
ATTRIBUTES
SEE ALSO
NAME
MLESearchFlags
DESCRIPTION
The following is a list of the pre-defined flags that can be used in the SearchFlags argument in DW_mle_search().
ATTRIBUTES
SEE ALSO
NAME
MLEEditableFlags
DESCRIPTION
The following is a list of the pre-defined flags that can be used in the EditableFlags argument in DW_mle_set_editable().
ATTRIBUTES
SEE ALSO
NAME
MLEWordWrapFlags
DESCRIPTION
The following is a list of the pre-defined flags that can be used in the WordWrapFlags argument in DW_mle_set_word_wrap().
ATTRIBUTES
SEE ALSO
NAME
PointerTypes
DESCRIPTION
The following is a list of the pre-defined mouse pointer types used in the Pointer argument in DW_Window-set_pointer().
ATTRIBUTES
SEE ALSO
NAME
Colours
DESCRIPTION
The following is a list of the pre-defined Colours known to RexxDW. These colour Constants are used in Functions that require pre-defined Colours.
ATTRIBUTES
SEE ALSO
DW_color_background_set, DW_color_foreground_set, DW_color_choose
NAME
WidgetOrientation
DESCRIPTION
The following Constants are used in Widgets that require an orientation to be specified.
ATTRIBUTES
SEE ALSO
DW_box_new, DW_groupbox_new, DW_splitbar_new, DW_scrollbar_new
NAME
NotebookTabLocation
DESCRIPTION
The following Constants are used in the TabLocation argument in a call to DW_notebook_new() to specify whether Notebook tabs are located at the top or bottom of the Window.
ATTRIBUTES
SEE ALSO
NAME
NotebookPageLocation
DESCRIPTION
The following Constants are used in the PageLocation argument in a call to DW_notebook_page_new() to specify if the page is created in front or behind other pages.
ATTRIBUTES
SEE ALSO
NAME
MenuConstants
DESCRIPTION
The following Constants are used in a number of Menu related function calls.
ATTRIBUTES
SEE ALSO
NAME
BoxExpansionFlags
DESCRIPTION
The following Constants are used in the Box Packing Functions to specify whether the Box expand in a horizontal or vertical direction.
ATTRIBUTES
SEE ALSO
NAME
ListboxSelection
DESCRIPTION
The following Constants are used in the Selection argument to a call to DW_listbox_new().
ATTRIBUTES
SEE ALSO
NAME
ListboxSelected
DESCRIPTION
The following is a list of the pre-defined flags that can be used when setting the State of a listbox or combobox.
ATTRIBUTES
SEE ALSO
NAME
ListboxReturn
DESCRIPTION
The following is the return value from DW_listbox_selected() or DW_listbox_selected_multi() if no item in the listbox has been selected.
ATTRIBUTES
SEE ALSO
NAME
WidgetChecked
DESCRIPTION
The following Constants are used to indicate the state of a widget that can have a boolean state.
ATTRIBUTES
SEE ALSO
NAME
ContainerClearFlags
DESCRIPTION
The following Constants are used in the Redraw argument to a call to DW_container_clear().
ATTRIBUTES
SEE ALSO
NAME
ContainerSelection
DESCRIPTION
The following Constants are used in the Selection argument to a call to DW_container_new().
ATTRIBUTES
SEE ALSO
NAME
RectangleFill
DESCRIPTION
The following Constants are used in the Fill argument to a call to DW_draw_rect().
ATTRIBUTES
SEE ALSO
NAME
MessageboxFlags
DESCRIPTION
The following Constants are used in the Flags argument to a call to DW_messagebox(). Logically "or" one value from Buttons and one value from Icons
ATTRIBUTES
Buttons:
Icons:
SEE ALSO
NAME
MessageboxResults
DESCRIPTION
The following Constants are returned from a call to DW_messagebox().
ATTRIBUTES
SEE ALSO
NAME
VirtualKeys
DESCRIPTION
The following is a list of the mnemonic key values known to RexxDW. These keys are returned in a KeyPressEvent Callback, in the VirtualKey argument.
ATTRIBUTES
SEE ALSO
NAME
KeyStates
DESCRIPTION
The following is a list of the mnemonic key state values known to Rexx/DW. These keys are returned in a KeyPressEvent Callback, in the KeyState argument.
ATTRIBUTES
SEE ALSO
NAME
MouseButtons
DESCRIPTION
The following is a list of the mnemonic mouse Button values known to RexxDW. These buttons are returned in a ButtonPressEvent Callback, in the Button argument.
ATTRIBUTES
SEE ALSO
[top]
NAME
Fontnames
DESCRIPTION
Font names in Rexx/DW are platform dependent. This section explains how to specify fonts on each of the supported platforms.
NOTES
Windows:
Fonts are specifed in the format: 'size.family [Bold] [Italic]' As an example, the following specify various font specifications for 8 point Courier: fixedfont = '8.Courier' italicfont = '8.Courier Italic' boldfont = '8.Courier Bold' bolditalicfont = '8.Courier Bold Italic'
GTK+ 2.x:
Fonts are specified in the format: 'family [bold] [italic] size' As an example, the following specify various font specifications for 14 point monospace: fixedfont = 'monospace 14' italicfont = 'monospace italic 14' boldfont = 'monospace bold italic 14' bolditalicfont = 'monospace italic 14'
GTK+ 1.x:
Fonts are specified using full X11 specification. As an example, the following specify various font specifications for 120 courier: fixedfont = '-adobe-courier-medium-r-normal-*-*-120-*-*-m-*-iso8859-1' italicfont = '-adobe-courier-medium-o-normal-*-*-120-*-*-m-*-iso8859-1' boldfont = '-adobe-courier-bold-r-normal-*-*-120-*-*-m-*-iso8859-1' bolditalicfont = '-adobe-courier-bold-o-normal-*-*-120-*-*-m-*-iso8859-1'
OS/2:
Fonts are specifed in the format: 'size.family [Bold] [Italic]' As an example, the following specify various font specifications for 5 System VIO: fixedfont = '5.System VIO' italicfont = '5.System VIO Italic' boldfont = '5.System VIO Bold' bolditalicfont = '5.System VIO Bold Italic'
[top]
NAME
Packing
DESCRIPTION
One of the most important aspects of laying out Widgets in a Rexx/DW program is how Packing works. This section explains the Rexx/DW Packing mechanism.
NOTES
The above ?????? TODO - horz/vert boxes, pack empty spaces, expand/dont_expand
[top]
NAME
Callbacks
DESCRIPTION
Rexx/DW is an event driven application. What this means is that internally various events occur, such as a key press, a Window becoming exposed. Rexx/DW allows you to call an internal Rexx procedure when various events occur.
Each widget you create has certain valid events associated with it. As part of your code you associate a particular event with a widget. This is done by calling DW_signal_connect(). This associates an event on a particular widget with an internal Rexx procedure, so that when the particular event occurs on that widget your procedure is executed and certain parameters are passed to it. Details on what parameters are passed is detailed below depending on the type of event.
The internal Rexx procedure is called in the context of where DW_main() or DW_main_iteration() is called. This is important when considering what Rexx variables may or may not be in scope. It is probably better to always use PROCEDURE EXPOSE (myglobals) on procedures so you know that any variables you use within your procedure will not affect an others outside without you explicitly listing them.
Once you have handled an event in your code, you can return 1 to inform Dynamic Windows that all processing has been handled for the particular event. Dynamic Windows will not execute its default event handling code. If your event handler returns 0, then Dynamic Windows will execute its default event handling code.
ATTRIBUTES
The values of the supported events are:
NOTES
With Rexx interpreters that don't provide RexxCallBack() it is not possible to inform Dynamic Windows to execute the default callback functionality after your event handler has executed its code, because the return value is returned to the Rexx program; via DW_main_iteration(), not to Dynamic Windows.
NAME
ConfigureEventCallback
USAGE
rcode = ConfigureEventCallback(Window, Width, Height [,UserData[,...]])
DESCRIPTION
Called when a DW_CONFIGURE_EVENT signal fires on a Window. This event usually occurs when a Window's size is changed.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_CONFIGURE_EVENT, 'configure_cb', , 'fred', 'mary' ... configure_cb: Procedure Expose !REXXDW. Parse Arg win, width, height, var1, var2 Say 'New width:' width 'height:' height 'for Window:' win 'UserVar1:' var1 , 'UserVar2:' var2 Return 1
NAME
KeyPressEventCallback
USAGE
rcode = KeyPressEventCallback(Window, ASCIIKey, VirtualKey, KeyState [,UserData[,...]])
DESCRIPTION
Called when a DW_KEY_PRESS_EVENT signal fires on a Window. Occurs when the user presses a key.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SEE ALSO
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_KEY_PRESS_EVENT, 'keypress_cb', , 'fred', 'mary' ... keypress_cb: Procedure Expose !REXXDW. Parse Arg win, ascii, virtual, state, var1, var2 Say 'ASCII Key:' ascii 'Virtual Key:' virtual 'State:' state 'UserVar1:' , var1 'UserVar2:' var2 If virtual = !REXXDW.!DW_VK_F1 Then Return 1 Return 1
NAME
ButtonPressEventCallback
USAGE
rcode = ButtonPressEventCallback(Window, X, Y, Button [,UserData[,...]])
DESCRIPTION
Called when a DW_BUTTON_PRESS_EVENT signal fires on a Window. This occurs when the user clicks a Button with the mouse.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SEE ALSO
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_BUTTON_PRESS_EVENT, , 'buttonpress_cb', 'fred' ... buttonpress_cb: Parse Arg win, x, y, Button, data Say 'Button:' Button 'pressed at:' x'/'y 'in Window:' win Return 1
NAME
ButtonReleaseEventCallback
USAGE
rcode = ButtonReleaseEventCallback(Window, X, Y, Button [,UserData[,...]])
DESCRIPTION
Called when a DW_BUTTON_RELEASE_EVENT signal fires on a Window. This occurs when the user releases a Button on the mouse.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SEE ALSO
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_BUTTON_RELEASE_EVENT, , 'buttonrelease_cb', 'fred' ... buttonreleases_cb: Parse Arg win, x, y, Button, data Say 'Button:' Button 'released at:' x'/'y 'in Window:' win Return 1
NAME
MotionNotifyEventCallback
USAGE
rcode = MotionNotifyEventCallback(Window, X, Y, Button [,UserData[,...]])
DESCRIPTION
Called when a DW_MOTION_NOTIFY_EVENT signal fires on a Window. This occurs when the user moves the mouse.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SEE ALSO
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_MOTION_NOTIFY_EVENT, , 'motionnotify_cb', 'fred' ... motionnotify_cb: Parse Arg win, x, y, state, data Say 'Mouse movied to' x'/'y 'in Window:' win 'with state:' state Return 1
NAME
DeleteEventCallback
USAGE
rcode = DeleteEventCallback(Window [,UserData[,...]])
DESCRIPTION
Called when a DW_DELETE_EVENT signal fires on a Window. This occurs when the user closes the Window by clicking the close icon on the Window title bar, or when DW_window_destroy() ???? is called on the Window.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SEE ALSO
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_DELETE_EVENT, 'delete_cb', , 'fred' ... delete_cb: Parse Arg win, data Say 'Window:' win 'deleted' Return 1
NAME
ExposeEventCallback
USAGE
rcode = ExposeEventCallback(Window, X, Y, Width, Height [,UserData[,...]])
DESCRIPTION
Called when a DW_EXPOSE_EVENT signal fires on a Window. This occurs when the Window is exposed.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_EXPOSE_EVENT, 'expose_cb', , 'fred' ... expose_cb: Parse Arg win, x, y, width, height, data Say 'Window:' win 'exposed at' x'/'y 'size:' width'/'height Return 1
NAME
ClickedEventCallback
USAGE
rcode = ClickedEventCallback(Window [,UserData[,...]])
DESCRIPTION
Called when a DW_CLICKED_EVENT signal fires on a Window. This occurs when the user clicks in the Window; usually a Button Window.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_CLICKED_EVENT, 'clicked_cb', , 'fred' ... clicked_cb: Parse Arg win, data Say 'Window:' win 'clicked' Return 1
NAME
ItemEnterEventCallback
USAGE
rcode = ItemEnterEventCallback(Window, Text [,UserData[,...]])
DESCRIPTION
Called when a DW_ITEM_ENTER_EVENT signal fires on a Window. This occurs when the user double-clicks or presses ENTER key in a container Window.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SEE ALSO
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_ITEM_ENTER_EVENT, 'itementer_cb', , 'fred' ... itementer_cb: Parse Arg win, text, data Say 'Item text' text 'entered in Window:' win 'userdata:' data Return 1
NAME
ItemContextEventCallback
USAGE
rcode = ItemContextEventCallback(Window, Text, X, Y, ItemData [,UserData[,...]])
DESCRIPTION
Called when a DW_ITEM_CONTEXT_EVENT signal fires on a Window. This occurs when the user clicks the right mouse Button in a container or Tree Window.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SEE ALSO
NOTES
When connecting this signal to a Tree widget, DW_signal_connect() MUST be called BEFORE the Tree is populated. When connecting this signal to a Container widget, DW_signal_connect() MUST be called AFTER the Container is populated.
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_ITEM_CONTEXT_EVENT, , 'itemcontext_cb', 'fred' ... itemcontext_cb: Parse Arg win, text, x, y, itemdata, userdata Say 'Item text' text 'entered in Window:' win 'at' x'/'y 'userdata:' userdata Return 1
NAME
ListSelectEventCallback
USAGE
rcode = ListSelectEventCallback(Window, Item [,UserData[,...]])
DESCRIPTION
Called when a DW_LIST_SELECT_EVENT signal fires on a Window. This occurs when the user clicks an entry in a listbox or combobox; ie an item in a list is selected.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_LIST_SELECT_EVENT, , 'listselect_cb', 'fred' ... listselect_cb: Parse Arg win, item, userdata Say 'Item number' item 'selected in Window:' win 'userdata:' userdata Return 1
NAME
ItemSelectEventCallback
USAGE
rcode = ItemSelectEventCallback(Window, Item, Text, Itemdata [,UserData[,...]])
DESCRIPTION
Called when a DW_ITEM_SELECT_EVENT signal fires on a Window. This occurs when the user clicks the left Button on an item in a container or Tree Window. selected.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
NOTES
When connecting this signal to a Tree widget, DW_signal_connect() MUST be called BEFORE the Tree is populated otherwise the signal will never fire. When connecting this signal to a Container widget, DW_signal_connect() MUST be called AFTER the Container is populated.
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_ITEM_SELECT_EVENT, , 'itemselect_cb', 'fred' ... itemselect_cb: Parse Arg win, item, text, userdata Say 'Item number' item 'selected in Window:' win 'text is:' text , 'userdata:' userdata Return 1
NAME
SetFocusEventCallback
USAGE
rcode = SetFocusEventCallback(Window [,UserData[,...]])
DESCRIPTION
Called when a DW_SET_FOCUS_EVENT signal fires on a Window. This occurs when the user gives focus to a Window, either by clicking the left Button in the Window or by tabbing to the Window. selected.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_SET_FOCUS_EVENT, 'setfocus_cb', , 'fred' ... setfocus_cb: Parse Arg win, userdata Say 'Window:' win 'now has focus userdata:' userdata Return 1
NAME
ValueChangedEventCallback
USAGE
rcode = ValueChangedEventCallback(Window, Value [,UserData[,...]])
DESCRIPTION
Called when a DW_VALUE_CHANGED_EVENT signal fires on a Window. This occurs when the user adjusts a Scrollbar, or a Slider control.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SEE ALSO
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_VALUE_CHANGED_EVENT, , 'valuechanged_cb', 'fred' ... valuechanged_cb: Parse Arg win, val, userdata Say 'The top of the Scrollbar thumb is now' val 'in Window:' win , 'userdata:' userdata Return 1
NAME
SwitchPageEventCallback
USAGE
rcode = SwitchPageEventCallback(Window, Page [,UserData[,...]])
DESCRIPTION
Called when a DW_SWITCH_PAGE_EVENT signal fires on a Window. This occurs when the user clicks on a tab in a Notebook.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_SWITCH_PAGE_EVENT, , 'switchpage_cb', 'fred' ... switchpage_cb: Parse Arg win, page, userdata Say 'Page' page 'of Window:' win 'selected. userdata:' userdata Return 1
NAME
ColumnClickEventCallback
USAGE
rcode = ColumnClickEventCallback(Window, Column [,UserData[,...]])
DESCRIPTION
Called when a DW_COLUMN_CLICK_EVENT signal fires on a Window. This occurs when the user clicks on a column heading of a container Window. selected.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the default callback is not called. Return 0 to enable the default callback to be called.
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_COLUMN_CLICK_EVENT, , 'columnclick_cb', 'fred' ... columnclick_cb: Parse Arg win, column, userdata Say 'Column' column 'of Window:' win 'selected. userdata:' userdata Return 1
NAME
TimerEventCallback
USAGE
rcode = TimerEventCallback([UserData[,...]])
DESCRIPTION
Called when a generic timer goes off. This occurs after the period specified by DW_timer_connect(). selected.
ARGUMENTS
RETURN VALUE
Return 1 to ensure that the timer is rearmed. Return 0 to ensure that the timer is not rearmed.
NOTES
The return code from the function called as a result of the timer firing determines whether the timer continues to fire after the specified period.
SEE ALSO
SOURCE
Call DW_timer_connect Window, 5000, 'timer_cb', 'fred' ... timer_cb: Parse Arg userdata Say 'Our timer went off after 5 seconds' 'userdata:' userdata Return 1
[top]
DESCRIPTION
The following external Functions comprise Rexx/DW.
DESCRIPTION
Widgets are the fundamental display items in RexxDW. RexxDW supports a range of Widgets to enable a rich GUI interface for your Rexx programs.
NOTES
RexxDW supports all common widget types as follows:
Box Button checkbox/radiobutton container/filesystem Dialog Rendering EntryField listbox/combobox Menu multiline edit Notebook Percent Scrollbar Slider Spinbutton Splitbar text Tree Window
DESCRIPTION
Boxes are used to layout the GUI display. Widgets are packed into a Box to position that widget. A Box can be horizontal or vertical, which determines the arrangement of the Widgets packed into the Box. So to arrange two Widgets side-by-side, you would create a horizontal Box, your two Widgets, and pack those two Widgets into the Box and they appear beside each other.
NAME
DW_box_new
SYNOPSIS
win = DW_box_new( Orientation )
FUNCTION
Creates a new generic Box Window. A Box is the basic widget for arranging the location and position of other Widgets.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
NOTES
The orientation of a Box determines the orientation of the Widgets that are packed into this Box. Creating a horizontal Box and Packing two buttons into it will result in the two buttons being placed side by side.
SOURCE
... Box = DW_box_new( !REXXDW.!DW_VERT ) Call DW_box_pack_start win, Box, 0, 0, !REXXDW.!DW_EXPAND_HORZ, , !REXXDW.!DW_EXPAND_VERT, 0
NAME
DW_groupbox_new
SYNOPSIS
win = DW_groupbox_new( Orientation, Title )
FUNCTION
Creates a new generic groupbox Window. A Box is the basic widget for arranging the location and position of other Widgets. The difference between a Box and a groupbox is that a groupbox contains a border and a Title in the top left corner.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
NOTES
The orientation of a Box determines the orientation of the Widgets that are packed into this Box. Creating a horizontal Box and Packing two buttons into it will result in the two buttons being placed side by side.
SOURCE
... Box = DW_groupbox_new( !REXXDW.!DW_VERT, 'Editor' ) Call DW_box_pack_start win, Box, 0, 0, !REXXDW.!DW_EXPAND_HORZ, , !REXXDW.!DW_EXPAND_VERT, 0
NAME
DW_box_pack_start
SYNOPSIS
DW_box_pack_start( ParentBox, BoxToPack, BoxWidth, BoxHeight, HorzExpand, VertExpand, Padding )
FUNCTION
Packs the BoxToPack at the start of the ParentBox; ie at the left of a horizontal ParentBox, or the top of a vertical ParentBox. The height and width of the Box can be specified as is the ability to allow the Box to expand horizontally or vertically.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
The BoxToPack argument can be 0, which will result in empty space being packed.
SOURCE
... Button = DW_bitmapbutton_new_from_file( 'Quit', 0, 'quit' ) Call DW_box_pack_start win, Button, 0, 32, !REXXDW.!DW_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0
NAME
DW_box_pack_end
SYNOPSIS
DW_box_pack_end( ParentBox, BoxToPack, BoxWidth, BoxHeight, HorzExpand, VertExpand, Padding )
FUNCTION
Packs the BoxToPack at the end of the ParentBox; ie at the right of a horizontal ParentBox, or the bottom of a vertical ParentBox. The height and width of the Box can be specified as is the ability to allow the Box to expand horizontally or vertically.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
The BoxToPack argument can be 0, which will result in empty space being packed.
SOURCE
... Button = DW_bitmapbutton_new_from_file( 'Quit', 0, 'quit' ) Call DW_box_pack_end win, Button, 0, 32, !REXXDW.!DW_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0
DESCRIPTION
Buttons enable an action to be carried out by the user clicking the left mouse Button on the widget. RexxDW supports two types of Button; plain text buttons and bitmap buttons.
NAME
DW_button_new
SYNOPSIS
win = DW_button_new( ButtonText, Id )
FUNCTION
Creates a new text Button. A Button is a widget which contains text and can be clicked to execute some action.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... Button = DW_button_new( "Quit", 10 )
NAME
DW_bitmapbutton_new_from_file
SYNOPSIS
win = DW_bitmapbutton_new_from_file( BubbleText, Id, Filename )
FUNCTION
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... Button = DW_bitmapbutton_new_from_file( 'Quit', 0, 'quit' ) Call DW_box_pack_start win, Button, 32, 32, !REXXDW.!DW_DONT_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0
DESCRIPTION
Checkboxes provide a simple mechanism for a user to indicate a boolean value response. Radiobuttons provide the user with a means to choose from a list of options.
NAME
DW_checkbox_new
SYNOPSIS
win = DW_checkbox_new( CheckboxText, Id )
FUNCTION
Creates a new checkbox. A checkbox is a widget that allows for a boolean value to be set. It contains text to describe the boolean value being set.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... checkbox = DW_checkbox_new( "Allow user to delete", 0 )
NAME
DW_radiobutton_new
SYNOPSIS
win = DW_radiobutton_new( ButtonText, Id )
FUNCTION
Creates a new radiobutton. A radiobutton is a widget that allows for one of a number of values to be set. It contains text to describe the value being set. A number of radiobuttons are created together with one of them set at any point in time.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
NOTES
For radiobuttons to work properly, all radiobuttons that are to be grouped together MUST be packed into the same groupbox and they MUST have a unique Id within the groupbox.
SOURCE
langs = 'Rexx Perl Tcl C COBOL' groupbox = DW_groupbox_new( !REXXDW.!DW_VERT, 0, 'Favourite Language' ) Do i = 1 To Words( langs ) rb.i = DW_radiobutton_new( Word( langs, i ), i*10 ) Call DW_box_pack_start groupbox, rb.i, 150, 15, !REXXDW.!DW_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0 End Call DW_radiobutton_set rb.1, !REXXDW.!DW_CHECKED
NAME
DW_checkbox_set
SYNOPSIS
DW_checkbox_set( Win, State )
FUNCTION
Sets the state of the specified checkbox.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... checkbox = DW_checkbox_new( "Allow access", 0 ) Call DW_checkbox_set( checkbox, !REXXDW.!DW_CHECKED )
NAME
DW_radiobutton_set
SYNOPSIS
DW_radiobutton_set( Win, State )
FUNCTION
Sets the state of the radiobutton to checked or not.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
langs = 'Rexx Perl Tcl C COBOL' groupbox = DW_groupbox_new( !REXXDW.!DW_VERT, 0, 'Favourite Language' ) Do i = 1 To Words( langs ) rb.i = DW_radiobutton_new( Word( langs, i ), i*10 ) Call DW_box_pack_start groupbox, rb.i, 150, 15, !REXXDW.!DW_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0 End Call DW_radiobutton_set rb.1, !REXXDW.!DW_CHECKED
NAME
DW_checkbox_get
SYNOPSIS
win = DW_checkbox_get( Win )
FUNCTION
Queries the state of the specified checkbox.
ARGUMENTS
RESULT
1 if the checkbox is checked, 0 if not checked.
SEE ALSO
SOURCE
... checkbox = DW_checkbox_new( "Allow access", 0 ) ... rc = DW_checkbox_get( checkbox ) cb_result = 'Unchecked Checked' Say 'Allow access checkbox' Word( cb_result, rc+1 )
NAME
DW_radiobutton_get
SYNOPSIS
boolean = DW_radiobutton_get( Win )
FUNCTION
Determines if a radiobutton has been checked or not.
ARGUMENTS
RESULT
1 if the radiobutton is checked, 0 if unchecked
SEE ALSO
SOURCE
langs = 'Rexx Perl Tcl C COBOL' groupbox = DW_groupbox_new( !REXXDW.!DW_VERT, 0, 'Favourite Language' ) Do i = 1 To Words( langs ) rb.i = DW_radiobutton_new( Word( langs, i ), i*10 ) Call DW_box_pack_start groupbox, rb.i, 150, 15, !REXXDW.!DW_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0 End Call DW_radiobutton_set rb.1, !REXXDW.!DW_CHECKED ... Do i = 1 To Words( langs ) If DW_radiobutton_get( rb.i ) Then Do Say 'Your favourite language is' Word( langs, i ) Leave End End
DESCRIPTION
These Widgets provide a two-dimensional display of read-only data. Data are displayed in rows and columns, with automatically created scrollbars to display the complete set of data. Columns can be resized by the user at runtime. A Filesystem is the same as a normal Container, except that the first column consists of a column of string and icon items, which usually displays a filename.
All DW_container*() Functions (for which there is no specific "Filename" equivalent) also works with a "Filename" widget.
NAME
DW_container_new
SYNOPSIS
win = DW_container_new( Id, Selection )
FUNCTION
Creates a new container. A container is a widget that provides a grid of cells with column headings.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION )
NAME
DW_container_alloc
SYNOPSIS
alloc = DW_container_alloc( Win, RowCount )
FUNCTION
Allocates working memory for a container Window.
ARGUMENTS
RESULT
An identifier for the working memory.
SEE ALSO
NOTES
After a container Window is created, you need to allocate memory for the initial number of rows that the container will contain. This call does that and must be called after creating the container. The allocated memory will be freed when the container is destroyed and by a call to DW_container_clear().
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) alloc = DW_container_alloc( container, 10 )
NAME
DW_container_setup
SYNOPSIS
DW_container_setup( Win, FlagsArray, TitlesArray, Separator )
FUNCTION
Defines properties for the columns in a container.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_container_change_item, DW_filesystem_setup, ContainerColumnFlags
NOTES
The FlagsArray is a Rexx stem variable name, including a trailing period. The 0th compound variable (eg Flags.0) contains a count of the number of items in the array. Each item in the array can contain a combination of the values described in ContainerColumnFlags.
SOURCE
... flags.0 = 2 flags.1 = DW_or( !REXXDW.!DW_CFA_STRINGANDICON, !REXXDW.!DW_CFA_LEFT, , !REXXDW.!DW_CFA_SEPARATOR, !REXXDW.!DW_CFA_HORZSEPARATOR ) flags.2 = DW_or( !REXXDW.!DW_CFA_STRING, !REXXDW.!DW_CFA_LEFT, , !REXXDW.!DW_CFA_SEPARATOR, !REXXDW.!DW_CFA_HORZSEPARATOR ) titles.0 = 2 titles.1 = 'Title' titles.2 = 'Command' ... container = DW_container_new( 1, !REXXDW.!DW_MULTIPLE_SELECTION ) alloc = DW_container_alloc( container, numrows ) Call DW_container_setup container, 'flags.', 'titles.', 0 ... Do i = 1 To numrows Call DW_container_set_item container, alloc, 0, i-1, title.i, icon.i Call DW_container_set_item container, alloc, 1, i-1, command.i Call DW_container_set_row_title alloc, i-1, "Row"i End
NAME
DW_filesystem_setup
SYNOPSIS
DW_filesystem_setup( Win, FlagsArray, TitlesArray, Separator )
FUNCTION
Defines properties for the columns in a filesystem container.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_filesystem_change_item, DW_container_setup, ContainerColumnFlags
NOTES
The FlagsArray is a Rexx stem variable name, including a trailing period. The 0th compound variable (eg Flags.0) contains a count of the number of items in the array. Each item in the array can contain a combination of the values described in ContainerColumnFlags.
SOURCE
... flags.0 = 2 flags.1 = DW_or( !REXXDW.!DW_CFA_STRINGANDICON, !REXXDW.!DW_CFA_LEFT, , !REXXDW.!DW_CFA_SEPARATOR, !REXXDW.!DW_CFA_HORZSEPARATOR ) flags.2 = DW_or( !REXXDW.!DW_CFA_STRING, !REXXDW.!DW_CFA_LEFT, , !REXXDW.!DW_CFA_SEPARATOR, !REXXDW.!DW_CFA_HORZSEPARATOR ) titles.0 = 2 titles.1 = 'Title' titles.2 = 'Command' ... container = DW_container_new( 1, !REXXDW.!DW_MULTIPLE_SELECTION ) alloc = DW_container_alloc( container, numrows ) Call DW_filesystem_setup container, 'flags.', 'titles.' ... normalfileicon = DW_icon_load_from_file( '/home/mark/normalfile' ) Do i = 1 To numrows Call DW_filesystem_set_file container, alloc, '/home/mark/myfile', myicon Call DW_filesystem_set_item container, alloc, 0, i-1, title.i, icon.i Call DW_filesystem_set_item container, alloc, 1, i-1, command.i Call DW_container_set_row_title alloc, i-1, "Row"i End
NAME
DW_container_set_item
SYNOPSIS
DW_container_set_item( Win, Memory, Column, Row, Data [,Data2] )
FUNCTION
Adds the initial data into a cell of a container.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_container_change_item, DW_container_setup, ContainerColumnFlags DW_filesystem_change_item, DW_filesystem_set_item
NOTES
The Data (and Data2) arguments must match the data type of the column when defined in the call to DW_container_setup().
SOURCE
... flags.0 = 2 flags.1 = DW_or( !REXXDW.!DW_CFA_STRINGANDICON, !REXXDW.!DW_CFA_LEFT, , !REXXDW.!DW_CFA_SEPARATOR, !REXXDW.!DW_CFA_HORZSEPARATOR ) flags.2 = DW_or( !REXXDW.!DW_CFA_STRING, !REXXDW.!DW_CFA_LEFT, , !REXXDW.!DW_CFA_SEPARATOR, !REXXDW.!DW_CFA_HORZSEPARATOR ) titles.0 = 2 titles.1 = 'Title' titles.2 = 'Command' ... container = DW_container_new( 1, !REXXDW.!DW_MULTIPLE_SELECTION ) alloc = DW_container_alloc( container, numrows ) Call DW_container_setup container, 'flags.', 'titles.', 0 ... Do i = 1 To numrows Call DW_container_set_item container, alloc, 0, i-1, title.i, icon.i Call DW_container_set_item container, alloc, 1, i-1, command.i Call DW_container_set_row_title alloc, i-1, "Row"i End
NAME
DW_filesystem_set_file
SYNOPSIS
DW_filesystem_set_file( Win, Memory, Row, Filename, Icon )
FUNCTION
Adds the data in the first cell of a filesystem container.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... normalfileicon = DW_icon_load_from_file( '/home/mark/normalfile' ) container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) alloc = DW_container_alloc( container, 10 ) ... Call DW_filesystem_set_file container, alloc, 10, '/home/mark/newfile.txt', , normalfileicon
NAME
DW_filesystem_set_item
SYNOPSIS
DW_filesystem_set_item( Win, Memory, Column, Row, Data [,Data2] )
FUNCTION
Adds the initial data into a cell of a filesystem container.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_container_change_item, DW_container_setup, ContainerColumnFlags DW_filesystem_change_item, DW_container_set_item
NOTES
The Data (and Data2) arguments must match the data type of the column when defined in the call to DW_container_setup().
SOURCE
... flags.0 = 2 flags.1 = DW_or( !REXXDW.!DW_CFA_STRINGANDICON, !REXXDW.!DW_CFA_LEFT, , !REXXDW.!DW_CFA_SEPARATOR, !REXXDW.!DW_CFA_HORZSEPARATOR ) flags.2 = DW_or( !REXXDW.!DW_CFA_STRING, !REXXDW.!DW_CFA_LEFT, , !REXXDW.!DW_CFA_SEPARATOR, !REXXDW.!DW_CFA_HORZSEPARATOR ) titles.0 = 2 titles.1 = 'Title' titles.2 = 'Command' ... container = DW_container_new( 1, !REXXDW.!DW_MULTIPLE_SELECTION ) alloc = DW_container_alloc( container, numrows ) Call DW_filesystem_setup container, 'flags.', 'titles.', 0 ... Do i = 1 To numrows Call DW_filesystem_set_file container, alloc, i-1, fname.i, icon.i Call DW_filesystem_set_item container, alloc, 0, i-1, title.i, icon.i Call DW_filesystem_set_item container, alloc, 1, i-1, command.i Call DW_container_set_row_title alloc, i-1, "Row"i End
NAME
DW_container_change_item
SYNOPSIS
DW_container_change_item( Win, Column, Row, Data [,Data2] )
FUNCTION
Changes the data in a cell of a container.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
The Data (and Data2) arguments must match the data type of the column when defined in the call to DW_container_setup().
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) ... Call DW_container_change_item container, 0, 10, 'New string data'
NAME
DW_filesystem_change_file
SYNOPSIS
DW_filesystem_change_file( Win, Row, Filename, Icon )
FUNCTION
Changes the data in the first cell of a filesystem container.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... normalfileicon = DW_icon_load_from_file( '/home/mark/normalfile' ) ... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) ... Call DW_filesystem_change_file container, 10, '/home/mark/newfile.txt', , normalfileicon
NAME
DW_filesystem_change_item
SYNOPSIS
DW_filesystem_change_item( Win, Column, Row, Data [,Data2] )
FUNCTION
Changes the data in a cell of a container.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
The Data (and Data2) arguments must match the data type of the column when defined in the call to DW_container_setup().
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) ... Call DW_filesystem_change_item container, 0, 10, 'New string data'
NAME
DW_container_insert
SYNOPSIS
DW_container_insert( Win, Memory, RowCount )
FUNCTION
Inserts the allocated memory into the container.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) alloc = DW_container_alloc( container, numrows ) ... Call DW_container_insert container, alloc, numrows
NAME
DW_container_set_row_title
SYNOPSIS
DW_container_set_row_title( Memory, Row, TitleText )
FUNCTION
Assigns a textual string for the specified Row. Used to identify this row in other container Functions
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_container_cursor, DW_container_delete_row, DW_container_query_next, DW_container_query_start
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) alloc = DW_container_alloc( container, numrows ) ... Do i = 1 To numrows Call DW_container_set_row_title alloc, i-1, "Row"i End ... Call DW_container_delete_row container, "Row10"
NAME
DW_container_set_column_width
SYNOPSIS
DW_container_set_column_width( Win, Column, Width )
FUNCTION
Sets the width of the column in the container to Width pixels.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
Columns with a set fixed width are not changed when DW_container_optimize() is called.
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_MULTIPLE_SELECTION ) ... Call dw_container_set_width( container, 0, 25 )
NAME
DW_container_optimize
SYNOPSIS
DW_container_optimize( Win )
FUNCTION
Rearranges the width of the container columns to provide the optimum display of the columns.
ARGUMENTS
RESULT
No return result.
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) alloc = DW_container_alloc( container, numrows ) ... Call DW_container_insert container, alloc, numrows Call DW_container_optimize container
NAME
DW_container_clear
SYNOPSIS
DW_container_clear( Win, Redraw )
FUNCTION
Clears the container of all rows and frees the memory allocated with DW_container_alloc().
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) ... Call DW_container_clear container, !REXXDW.!DW_DONT_REDRAW
NAME
DW_container_delete
SYNOPSIS
DW_container_delete( Win, NumRows )
FUNCTION
Deletes NumRows from the the container starting with the first row.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) ... Call DW_container_delete container, 5
NAME
DW_container_delete_row
SYNOPSIS
DW_container_delete_row( Win, TitleText )
FUNCTION
Deletes the row from the container which has the specified TitleText
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) alloc = DW_container_alloc( container, numrows ) ... Do i = 1 To numrows Call DW_container_set_row_title alloc, i-1, "Row"i End ... Call DW_container_delete_row container, "Row10"
NAME
DW_container_query_start
SYNOPSIS
text = DW_container_query_start( Win, Flags )
FUNCTION
Initiates a query on a container for subsequent calls to DW_container_query_next(). Returns the title text associated with the first row in the container based on Flags. The title text having previously been set with a call to DW_container_set_row_title().
ARGUMENTS
RESULT
The title text of the row or the empty string to indicate the end of the query. ie no more rows are available for querying.
SEE ALSO
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_MULTIPLE_SELECTION ) ... selected = DW_container_query_start( container, !REXXDW.!DW_CRA_SELECTED ) Do While selected \= '' Say 'Title of row selected is' selected selected = DW_container_query_next( container, !REXXDW.!DW_CRA_SELECTED ) End
NAME
DW_container_query_next
SYNOPSIS
text = DW_container_query_next( Win, Flags )
FUNCTION
Returns the title text associated with the next row in the container. The title text having previously been set with a call to DW_container_set_row_title().
ARGUMENTS
RESULT
The title text of the row or the empty string to indicate the end of the query. ie no more rows are available for querying.
NOTES
As the only way of knowing that the query has returned all rows in subsequent calls to this function, all rows MUST have a non-blank title text.
SEE ALSO
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_MULTIPLE_SELECTION ) ... selected = DW_container_query_start( container, !REXXDW.!DW_CRA_SELECTED ) Do While selected \= '' Say 'Title of row selected is' selected selected = DW_container_query_next( container, !REXXDW.!DW_CRA_SELECTED ) End
NAME
DW_container_cursor
SYNOPSIS
DW_container_cursor( Win, TitleText )
FUNCTION
Rearranges the view of the container so that the row with the specified TitleText is visible.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_SINGLE_SELECTION ) alloc = DW_container_alloc( container, numrows ) ... Do i = 1 To numrows Call DW_container_set_row_title alloc, i-1, "Row"i End ... Call DW_container_cursor container, "Row10"
NAME
DW_container_scroll
SYNOPSIS
DW_container_scroll( Win, Direction, NumRows )
FUNCTION
Scrolls the current view of the container by NumRows rows in the direction specified by Direction.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
The NumRows argument is ignored for !REXXDW.!DW_SCROLL_TOP and !REXXDW.!DW_SCROLL_BOTTOM.
SOURCE
... container = DW_container_new( 1, !REXXDW.!DW_MULTIPLE_SELECTION ) ... Call DW_container_scroll( container, !REXXDW.!DW_SCROLL_UP, 10 )
DESCRIPTION
A Rendering widget allows low-level graphics drawing to be done. Two widget types can be rendered; a render Window and a pixmap.
The "normal" way to write low-level graphics is to draw into an off-screen pixmap, and then "bitblt" the off-screen pixmap into the render Window. This is much faster that drawing directly into the render Window itself.
NOTES
Two Callbacks can be used with Render windows; DW_EXPOSE_EVENT and DW_CONFIGURE_EVENT. Whenever the Render Window's size is changed a "configure" event is fired. Whenever a portion of the Window is made visible, an "expose" event fires. So TODO
NAME
DW_render_new
SYNOPSIS
win = DW_render_new( Id )
FUNCTION
Creates a new render Window. A render Window is used to draw primitive graphics on, or to be the Window in which a pixmap is rendered.
ARGUMENTS
RESULT
A render identifier.
SOURCE
render = DW_render_new( 10 ) depth = DW_color_depth_get() pixmap = DW_pixmap_new( render, 64, 64, depth )
NAME
DW_pixmap_new
SYNOPSIS
win = DW_pixmap_new( Win, Width, Height, Depth )
FUNCTION
Creates a new pixmap widget of the given dimensions.
ARGUMENTS
RESULT
A pixmap identifier.
SOURCE
render = DW_render_new( 10 ) depth = DW_color_depth_get() pixmap = DW_pixmap_new( render, 64, 64, depth )
NAME
DW_pixmap_new_from_file
SYNOPSIS
win = DW_pixmap_new_from_file( Win, Filename )
FUNCTION
Creates a new pixmap widget from the specified Filename.
ARGUMENTS
RESULT
A pixmap identifier.
NOTES
The size of the pixmap is determined from the dimensions of the .BMP or .XPM
SOURCE
render = DW_render_new( 10 ) pixmap = DW_pixmap_new_from_file( render, '/home/mark/mypixmap' )
NAME
DW_pixmap_destroy
SYNOPSIS
DW_pixmap_destroy( Pixmap )
FUNCTION
Destroys a Pixmap.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
render = DW_render_new( 10 ) pixmap = DW_pixmap_new_from_file( render, '/home/mark/mypixmap' ) ... Call DW_pixmap_destroy( pixmap )
NAME
DW_pixmap_bitblt
SYNOPSIS
DW_pixmap_bitblt( DestWin, DestPixmap, DestX, DestY, Width, Height, SrcWin, SrcPixmap, SrcX, SrcY )
FUNCTION
Copies a portion of a render Window or pixmap to another render Window or pixmap.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
Only one of DestWin, DestPixmap is specified; the other should be 0 Only one of SrcWin, SrcPixmap is specified; the other should be 0
SOURCE
render = DW_render_new( 10 ) depth = DW_color_depth_get() pixmap = DW_pixmap_new( render, 64, 64, depth ) ... Call DW_pixmap_bitblt( render, 0, 0, 0, 64, 64, 0, pixmap, 0, 0 )
NAME
DW_pixmap_width
SYNOPSIS
width = DW_pixmap_width( Win )
FUNCTION
returns the width of the specified pixmap.
ARGUMENTS
RESULT
The pixmap's width
SEE ALSO
SOURCE
render = DW_render_new( 10 ) pixmap = DW_pixmap_new_from_file( render, '/home/mark/mypixmap' ) Say 'The width of the pixmap is' DW_pixmap_width( pixmap )
NAME
DW_pixmap_height
SYNOPSIS
width = DW_pixmap_height( Win )
FUNCTION
returns the height of the specified pixmap.
ARGUMENTS
RESULT
The pixmap's height
SEE ALSO
SOURCE
render = DW_render_new( 10 ) pixmap = DW_pixmap_new_from_file( render, '/home/mark/mypixmap' ) Say 'The height of the pixmap is' DW_pixmap_height( pixmap )
NAME
DW_draw_text
SYNOPSIS
DW_draw_text( Win, Pixmap, Fill, X, Y, Text )
FUNCTION
Draws the specified Text at the coordinates X/Y. The colour of the Text is set by a call to DW_color_foreground_set(). The font of the text is set by a call to DW_window_set_font() against the render Box in which the text is drawn eith directly, or via a pixmap.
ARGUMENTS
RESULT
No return result
SEE ALSO
DW_render_new, DW_pixmap_new, DW_color_foreground_set DW_draw_line, DW_draw_point, DW_draw_rect, RectangleFill, DW_window_set_font
NOTES
Only one of Win or Pixmap is required. The other argument should be set to 0.
SOURCE
... win = DW_render_new( 0 ) Call DW_window_set_font win, myfont ... Call DW_draw_text win, 0, 10, 34, 'A string at 10/34'
NAME
DW_draw_line
SYNOPSIS
DW_draw_line( Win, Pixmap, X1, Y1, X2, Y2 )
FUNCTION
Draws a line between the coordinates X1/Y1 and X2/Y2 in either the render Window identfied by Win or the pixmap identified by Pixmap. The line is 1 pixel in width and the colour of the line is set by a call to DW_color_foreground_set().
ARGUMENTS
RESULT
No return result
SEE ALSO
DW_render_new, DW_pixmap_new, DW_color_foreground_set, DW_draw_point, DW_draw_rect, DW_draw_text
NOTES
Only one of Win or Pixmap is required. The other argument should be set to 0.
SOURCE
... win = DW_render_new( 0 ) ... Call DW_draw_line win, 0, 10, 10, 34, 56
NAME
DW_draw_rect
SYNOPSIS
DW_draw_rect( Win, Pixmap, Fill, X, Y, Width, Height )
FUNCTION
Draws a rectangle with the top left corner at the coordinates X/Y with the specified Width and Height. All measurements are in pixels. The colour of the rectangle is set by a call to DW_color_foreground_set().
ARGUMENTS
RESULT
No return result
SEE ALSO
DW_render_new, DW_pixmap_new, DW_color_foreground_set DW_draw_line, DW_draw_point, DW_draw_text, RectangleFill
NOTES
Only one of Win or Pixmap is required. The other argument should be set to 0.
SOURCE
... win = DW_render_new( 0 ) ... Call DW_draw_rect win, 0, !REXXDW.!DW_FILL, 10, 34, 40, 40
NAME
DW_draw_point
SYNOPSIS
DW_draw_point( Win, Pixmap, X, Y )
FUNCTION
Draws a point 1 pixel in size at the coordinates X/Y. The colour of the point is set by a call to DW_color_foreground_set().
ARGUMENTS
RESULT
No return result
SEE ALSO
DW_render_new, DW_pixmap_new, DW_color_foreground_set DW_draw_line, DW_draw_rect, DW_draw_text
NOTES
Only one of Win or Pixmap is required. The other argument should be set to 0.
SOURCE
... win = DW_render_new( 0 ) ... Call DW_draw_point win, 0, 10, 34
DESCRIPTION
Entryfields allow a user to enter a single line of text.
NAME
DW_entryfield_new
SYNOPSIS
win = DW_entryfield_new( CurrentText, Id )
FUNCTION
Creates a new EntryField. An EntryField is a single line Window into which text can be entered.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... EntryField = DW_entryfield_new( "Initial value", 0 )
NAME
DW_entryfield_password_new
SYNOPSIS
win = DW_entryfield_password_new( CurrentText, Id )
FUNCTION
Creates a new password EntryField. A password EntryField is similar to an entryfiled, but any character displayed in the EntryField is replaced by an asterisk to mask the contents.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... EntryField = DW_entryfield_password_new( "mypassword", 0 )
NAME
DW_entryfield_set_limit
SYNOPSIS
DW_entryfield_set_limit( Win, Length )
FUNCTION
Sets the maximum number of characters that can be entered into an EntryField.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... EntryField = DW_entryfield_password_new( "mypassword", 0 ) Call DW_entryfield_set_limit EntryField, 10
DESCRIPTION
Listboxes provide a list of selectable items. A combobox is a listbox plus an entry field.
NAME
DW_listbox_new
SYNOPSIS
win = DW_listbox_new( Id, Selection )
FUNCTION
Creates a new listbox. A listbox contains a list of item values.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... listbox = DW_listbox_new( 10, !REXXDW.!DW_LB_SINGLE_SELECTION )
NAME
DW_combobox_new
SYNOPSIS
win = DW_combobox_new( ComboboxText, Id )
FUNCTION
Creates a new combobox. A combobox contains a single line text entry field plus a selectable item from a list of pre set item values.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... combobox = DW_combobox_new( "Default", 0 )
NAME
DW_listbox_append
SYNOPSIS
DW_listbox_append( Win, Text )
FUNCTION
Appends the specified Text to the end of the current items in the listbox or combobox specified by Win.
ARGUMENTS
RESULT
No return result.
SOURCE
listbox = DW_listbox_new( 0, !REXXDW.!DW_LB_SINGLE_SELECTION ) Do i = 1 To 5 Call DW_listbox_append listbox, text.i End
NAME
DW_listbox_list_append
SYNOPSIS
DW_listbox_list_append( Win, TextArray )
FUNCTION
Appends each item in the specified TextArray to the end of the current items in the listbox or combobox specified by Win.
ARGUMENTS
RESULT
No return result.
SOURCE
listbox = DW_listbox_new( 0, !REXXDW.!DW_LB_SINGLE_SELECTION ) text.0 = 3 text.1 = 'line 1' text.2 = 'line 2' text.3 = 'line 3' Call DW_listbox_list_append listbox, 'text.'
NAME
DW_listbox_clear
SYNOPSIS
DW_listbox_clear( Win )
FUNCTION
Removes all items from the listbox or combobox specified by Win.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
listbox = DW_listbox_new( 0, !REXXDW.!DW_LB_SINGLE_SELECTION ) Do i = 1 To 5 Call DW_listbox_append listbox, text.i End ... Call DW_listbox_clear( listbox )
NAME
DW_listbox_count
SYNOPSIS
count = DW_listbox_count( Win )
FUNCTION
Returns the number of items in the listbox or combobox specified by Win.
ARGUMENTS
RESULT
The number of items in the list.
SOURCE
combobox = DW_combobox_new( "Default", 0 ) Do i = 1 To 5 Call DW_listbox_append combobox, text.i End Say 'There are' DW_listbox_count( combobox ) 'items in the list'
NAME
DW_listbox_delete
SYNOPSIS
DW_listbox_delete( Win, Index )
FUNCTION
Deletes the item specified by Index from the list of items in the listbox or combobox specified by Win.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
combobox = DW_combobox_new( "Default", 0 ) Do i = 1 To 5 Call DW_listbox_append combobox, text.i End ... Call DW_listbox_delete combobox, 4
NAME
DW_listbox_select
SYNOPSIS
DW_listbox_select( Win, Index, State )
FUNCTION
Sets the State of the item specified by Index in the list of items in the listbox or combobox specified by Win.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
If the listbox was created with DW_LB_SINGLE_SELECTION, then setting an item to be selected will unselect an item that is currently selected. If the listbox was created with DW_LB_MULTIPLE_SELECTION, then setting an item to be selected will leave any other item already selected alone.
SOURCE
listbox = DW_listbox_new( 10, !REXXDW.!DW_LB_SINGLE_SELECTION ) Do i = 1 To 5 Call DW_listbox_append listbox, text.i End ... Call DW_listbox_select listbox, 4, !REXXDW.!DW_LB_SELECTED
NAME
DW_listbox_selected
SYNOPSIS
index = DW_listbox_selected( Win )
FUNCTION
Returns the index of the item in the listbox or combobox currently selected or !REXXDW.!DW_LB_NONE if none selected.
ARGUMENTS
RESULT
The 0 based index of the item selected.
SEE ALSO
SOURCE
listbox = DW_listbox_new( 10, !REXXDW.!DW_LB_SINGLE_SELECTION ) Do i = 1 To 5 Call DW_listbox_append listbox, text.i End ... Call DW_listbox_select listbox, 4, !REXXDW.!DW_LB_SELECTED ... Say 'Item' DW_listbox_selected( listbox) 'is currently selected'
NAME
DW_listbox_selected_multi
SYNOPSIS
index = DW_listbox_selected_multi( Win, Start )
FUNCTION
Returns the index of the next item in the listbox currently selected or !REXXDW.!DW_LB_NONE if none selected.
ARGUMENTS
RESULT
The 0 based index of the next item selected.
SEE ALSO
NOTES
This call only works on listboxes created with DW_LB_MULTIPLE_SELECTION; and not on comboboxes. The first call should use -1 as Start, and on subsequent calls, the index returned from the previous call.
SOURCE
listbox = DW_listbox_new( 10, !REXXDW.!DW_LB_MULTIPLE_SELECTION ) Do i = 1 To 5 Call DW_listbox_append listbox, text.i End ... Call DW_listbox_select listbox, 2, !REXXDW.!DW_LB_SELECTED Call DW_listbox_select listbox, 4, !REXXDW.!DW_LB_SELECTED ... idx = -1 Do Forever idx = DW_listbox_selected_multi( listbox, idx ) If idx = !REXXDW.!DW_LB_NONE Then Leave Say 'Item' idx 'is currently selected' End
NAME
DW_listbox_set_top
SYNOPSIS
DW_listbox_set_top( Win, Index )
FUNCTION
Sets the item with Index to be the first item displayed in the viewport of the listbox.
ARGUMENTS
RESULT
No return result.
NOTES
This does not work on comboboxes.
SOURCE
listbox = DW_listbox_new( 10, !REXXDW.!DW_LB_SINGLE_SELECTION ) Do i = 1 To 5 Call DW_listbox_append listbox, text.i End ... Call DW_listbox_set_top listbox, 4
NAME
DW_listbox_set_text
SYNOPSIS
DW_listbox_set_text( Win, Index, Text )
FUNCTION
Sets the Text of the Index item in the listbox or combobox
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
listbox = DW_listbox_new( 10, !REXXDW.!DW_LB_SINGLE_SELECTION ) Do i = 1 To 5 Call DW_listbox_append listbox, text.i End ... Call DW_listbox_set_text listbox, 4, 'New Text'
NAME
DW_listbox_get_text
SYNOPSIS
text = DW_listbox_get_text( Win )
FUNCTION
Returns the text of the item with Index in the listbox or combobox
ARGUMENTS
RESULT
The text of the item.
SOURCE
combobox = DW_combobox_new( "Default", 0 ) Do i = 1 To 5 Call DW_listbox_append combobox, text.i End Say 'Item 3 is' DW_listbox_get_text( combobox, 3 )
DESCRIPTION
Menus provide a list of textual options to the user to select an action. RexxDW provides standard drop-down menus located directly under the Window's titlebar, or floating popup menus.
NAME
DW_menu_new
SYNOPSIS
win = DW_menu_new( Id )
FUNCTION
Creates a new Menu. This Menu can be used as a submenu linked to a menubar, or as a popup Menu.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... Menu = DW_menu_new( 10 )
NAME
DW_menubar_new
SYNOPSIS
win = DW_menubar_new( Win )
FUNCTION
Creates a new menubar. A menubar is located at the top of the specified toplevel Window identified by Win.
ARGUMENTS
RESULT
A menubar identifier.
SEE ALSO
NOTES
Currently under GTK+ you need to call this function AFTER other Widgets have been created in the Window that this menubar is to reside.
SOURCE
... win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Window on desktop', style ) ... menubar = DW_menubar_new( win )
NAME
DW_menu_append_item
SYNOPSIS
index = DW_menu_append_item( Menu, Title, Id, Flags, End, Check, Submenu )
FUNCTION
Append a Menu item to an existing Menu or menubar. The Menu item can be an individual item or another submenu.
ARGUMENTS
RESULT
A Menu identifier.
SEE ALSO
NOTES
Preceding a letter of the Title, will enable that letter to be typed on the keyboard to invoke the callback associated with that Menu item. In the source below, with the Menu item displayed, typing 'a' will execute 'AddRepositoryCallback' The Title can also be set to DW_MENU_SEPARATOR which will display a line instead of text.
A Menu item MUST have a unique Id within a particular Menu, otherwise the Callbacks will not work.
SOURCE
Menu = DW_menu_new( 0 ) menuitem = DW_menu_append_item( Menu, '~Add Repository', 1011, 0, , !REXXDW.!DW_MENU_END, !REXXDW.!DW_MENU_NOT_CHECKABLE, 0 ) Call DW_signal_connect menuitem, !REXXDW.!DW_CLICKED_EVENT, , 'AddRepositoryCallback'
NAME
DW_menu_destroy
SYNOPSIS
DW_menu_destroy( Menu )
FUNCTION
Destroys a Menu or menubar.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Menu = DW_menu_new( 0 ) ... Call DW_menu_destroy Menu ...
NAME
DW_menu_item_set_check
SYNOPSIS
DW_menu_item_set_check( Menu, Id, Check )
FUNCTION
Sets the Menu item identified by Id to checked or unchecked depending on the value of Check.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Menu = DW_menu_new( 0 ) menuitem = DW_menu_append_item( Menu, '~Add Repository', 1011, 0, , !REXXDW.!DW_MENU_END, !REXXDW.!DW_MENU_NOT_CHECKABLE, 0 ) ... Call DW_menu_item_set_check Menu, 1011, !REXXDW.!DW_MENU_CHECKABLE
NAME
DW_menu_popup
SYNOPSIS
DW_menu_popup( Menu, Win, X, Y )
FUNCTION
Displays the popup Menu in the specified Window at the location specified by X/Y in pixels relative to ?????.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Menu = DW_menu_new( 0 ) menuitem = DW_menu_append_item( Menu, '~Add Repository', 1011, 0, , !REXXDW.!DW_MENU_END, !REXXDW.!DW_MENU_NOT_CHECKABLE, 0 ) ... Call DW_menu_popup Menu, win, 30, 130
DESCRIPTION
A multi-line edit widget is similar to an EntryField, except that more than one line of text can be manipulated.
NAME
DW_mle_new
SYNOPSIS
win = DW_mle_new( Id )
FUNCTION
Creates a new Multi-Line edit widget. An MLE is used to display and edit multiple lines of text.
ARGUMENTS
RESULT
An MLE identifier.
SOURCE
mle = DW_mle_new( 0 )
NAME
DW_mle_delete
SYNOPSIS
DW_mle_delete( Win[, StartPoint, Length] )
FUNCTION
Deletes the text from a Multi-Line Entry widget starting at StartPoint for Length characters
ARGUMENTS
RESULT
No return result.
NOTES
If no Startpoint is specified, it defaults to 0 (the start of the MLE) If no Length is specified, it defaults to the total number of characters in the MLE.
SOURCE
... mle = DW_mle_new( 0 ) ... Call DW_mle_delete( mle, 0, 100 )
NAME
DW_mle_import
SYNOPSIS
Location = DW_mle_import( Win, Text, StartPoint )
FUNCTION
Inserts the Text into a Multi-Line Entry widget starting at StartPoint.
ARGUMENTS
RESULT
The point into the MLE after the last character in Text was inserted counted in characters.
SEE ALSO
NOTES
You need to append a CRLF (d2c(13)||d2c(10)) to the end of text to insert lines.
SOURCE
... mle = DW_mle_new( 0 ) ... loc = DW_mle_import( mle, 'More text here', 100 )
NAME
DW_mle_export
SYNOPSIS
text = DW_mle_export( Win[, StartPoint, Length] )
FUNCTION
Returns the text from a Multi-Line Entry widget starting at StartPoint for Length characters.
ARGUMENTS
RESULT
The text exported.
SEE ALSO
NOTES
If no Startpoint is specified, it defaults to 0 (the start of the MLE) If no Length is specified, it defaults to the total number of characters in the MLE.
SOURCE
... mle = DW_mle_new( 0 ) ... contents = DW_mle_export( mle, 0, 100 )
NAME
DW_mle_get_size
SYNOPSIS
Bytes Lines = DW_mle_get_size( Win )
FUNCTION
Returns the number of Bytes and Lines currently in the Multi-Line Entry widget.
ARGUMENTS
RESULT
Bytes and Lines are returned as two words. PARSE VALUE is the easiest way to obtain both values.
SEE ALSO
SOURCE
... mle = DW_mle_new( 0 ) ... Parse Value DW_mle_get_size( mle ) With bytes lines
NAME
DW_mle_search
SYNOPSIS
Location = DW_mle_search( Win, Text, StartPoint, SearchFlags )
FUNCTION
Searches the MLE for Text starting at StartPoint.
ARGUMENTS
RESULT
The point into the MLE where the matching Text starts counted in characters.
SEE ALSO
SOURCE
... mle = DW_mle_new( 0 ) ... loc = DW_mle_import( mle, 'More text here', 100 ) ... pos = DW_mle_search( mle, 'text', 0, 0 )
NAME
DW_mle_set_curesor
SYNOPSIS
DW_mle_set_cursor( Win, Point )
FUNCTION
Sets the cursor at Point in the Multi-Line Entry widget.
ARGUMENTS
RESULT
No return result.
SOURCE
... mle = DW_mle_new( 0 ) ... Call DW_mle_set_cursor( mle, 10 )
NAME
DW_mle_set_editable
SYNOPSIS
DW_mle_set_editable( Win, EditableFlags )
FUNCTION
Sets the state of the Multi-Line Entry widget to be editable or readonly.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
By default MLEs are editable
SOURCE
... mle = DW_mle_new( 0 ) ... Call DW_mle_set_editable( mle, !REXXDW.!DW_READONLY )
NAME
DW_mle_set_visible
SYNOPSIS
DW_mle_set_visible( Win, Line )
FUNCTION
Sets the Line in the Multi-Line Entry widget to be visible.
ARGUMENTS
RESULT
No return result.
SOURCE
... mle = DW_mle_new( 0 ) ... Call DW_mle_set_visible( mle, 10 )
NAME
DW_mle_set_word_wrap
SYNOPSIS
DW_mle_set_editable( Win, WordWrapFlags )
FUNCTION
Sets the state of the Multi-Line Entry widget to allow lines to wrap on word boundaries or be truncated at the edge of the viewport.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... mle = DW_mle_new( 0 ) ... Call DW_mle_set_word_wrap( mle, !REXXDW.!DW_WORD_WRAP )
NAME
DW_mle_freeze
SYNOPSIS
DW_mle_freeze( Win )
FUNCTION
Stops the screen output to a Multi-Line Entry widget.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
On some platforms, there can be excessive scrolling and redraws when text is imported into an MLE. This function reduces these effects.
SOURCE
... mle = DW_mle_new( 0 ) ... Call DW_mle_freeze( mle ) loc = -1 Do i = 1 To text.0 loc = DW_mle_import( mle, text.i, loc ) End Call DW_mle_thaw( mle )
NAME
DW_mle_thaw
SYNOPSIS
DW_mle_thaw( Win )
FUNCTION
Restarts the screen output to a Multi-Line Entry widget.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
On some platforms, there can be excessive scrolling and redraws when text is imported into an MLE. This function reduces these effects.
SOURCE
... mle = DW_mle_new( 0 ) ... Call DW_mle_freeze( mle ) loc = -1 Do i = 1 To text.0 loc = DW_mle_import( mle, text.i, loc ) End Call DW_mle_thaw( mle )
DESCRIPTION
Strictly speaking these Widgets are "tabbed notebooks". This widget provides another sort of frame in which other Widgets are packed. Notebook pages are frames that overlap the same screen space, but can be brought to the front by the user clicking on the tab.
NAME
DW_notebook_new
SYNOPSIS
win = DW_notebook_new( Id, TabLocation )
FUNCTION
Creates a new tabbed Notebook widget. A Notebook is a frame in which pages containing other Widgets can be packed. Each page can be selected by clicking that page's tab.
ARGUMENTS
RESULT
A Notebook identifier.
SEE ALSO
SOURCE
Notebook = DW_notebook_new( 0, !REXXDW.!DW_TAB_TO_TOP )
NAME
DW_notebook_page_new
SYNOPSIS
page = DW_notebook_page_new( Win, Flags, PageLocation )
FUNCTION
Creates a new page within a tabbed Notebook widget.
ARGUMENTS
RESULT
A Notebook page identifier.
SEE ALSO
NOTES
A maximum of 256 pages can be created in a Notebook. On Windows, the PageLocation does nothing, so it is best to specify which page is in front once all pages have been created by calling DW_notebook_page_set().
SOURCE
Notebook = DW_notebook_new( 0, !REXXDW.!DW_TAB_TO_TOP ) notebookbox = DW_box_new( !REXXDW.!DW_VERT, 0 ) notebookpage = DW_notebook_page_new( Notebook, 0, !REXXDW.!DW_PAGE_TO_BACK ) Call DW_notebook_pack Notebook, notebookpage, notebookpagebox
NAME
DW_notebook_pack
SYNOPSIS
DW_notebook_pack( Win, Page, Box )
FUNCTION
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Notebook = DW_notebook_new( 0, !REXXDW.!DW_TAB_TO_TOP ) notebookbox = DW_box_new( !REXXDW.!DW_VERT, 0 ) notebookpage = DW_notebook_page_new( Notebook, 0, !REXXDW.!DW_PAGE_TO_BACK ) Call DW_notebook_pack Notebook, notebookpage, notebookpagebox
NAME
DW_notebook_destroy
SYNOPSIS
DW_notebook_destroy( Win, Page )
FUNCTION
Destroys the specified Page of a Notebook. All Widgets inside the Page are also destroyed.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Notebook = DW_notebook_new( 0, !REXXDW.!DW_TAB_TO_TOP ) notebookbox = DW_box_new( !REXXDW.!DW_VERT, 0 ) notebookpage = DW_notebook_page_new( Notebook, 0, !REXXDW.!DW_PAGE_TO_BACK ) Call DW_notebook_pack Notebook, notebookpage, notebookpagebox ... Call dw_notebook_destoy Notebook, notebookpage
NAME
DW_notebook_page_set
SYNOPSIS
DW_notebook_page_set( Win, Page )
FUNCTION
Sets Page to be the Notebook page displayed at the front.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Notebook = DW_notebook_new( 0, !REXXDW.!DW_TAB_TO_TOP ) notebookbox = DW_box_new( !REXXDW.!DW_VERT, 0 ) notebookpage = DW_notebook_page_new( Notebook, 0, !REXXDW.!DW_PAGE_TO_BACK ) Call DW_notebook_pack Notebook, notebookpage, notebookpagebox ... Call DW_notebook_page_set Notebook, notebookpage
NAME
DW_notebook_page_set_text
SYNOPSIS
DW_notebook_page_set_text( Win, Page, Text )
FUNCTION
Sets the text on the Notebook tab on the Page to Text.
ARGUMENTS
RESULT
No return result.
SOURCE
Notebook = DW_notebook_new( 0, !REXXDW.!DW_TAB_TO_TOP ) notebookbox = DW_box_new( !REXXDW.!DW_VERT, 0 ) notebookpage = DW_notebook_page_new( Notebook, 0, !REXXDW.!DW_PAGE_TO_BACK ) Call DW_notebook_pack Notebook, notebookpage, notebookpagebox ... Call DW_notebook_page_set_text Notebook, notebookpage, 'Tab Text'
NAME
DW_notebook_page_set_status_text
SYNOPSIS
DW_notebook_page_set_status_text( Win, Page, Text )
FUNCTION
Sets the status text area on the Page to Text.
ARGUMENTS
RESULT
No return result.
NOTES
Only OS/2 has a status text area. Other platforms ignore this function.
SOURCE
Notebook = DW_notebook_new( 0, !REXXDW.!DW_TAB_TO_TOP ) notebookbox = DW_box_new( !REXXDW.!DW_VERT, 0 ) notebookpage = DW_notebook_page_new( Notebook, 0, !REXXDW.!DW_PAGE_TO_BACK ) Call DW_notebook_pack Notebook, notebookpage, notebookpagebox ... Call DW_notebook_page_set_status_text Notebook, notebookpage, 'Subtitle Text'
NAME
DW_notebook_page_get
SYNOPSIS
page = DW_notebook_page_get( Win, Flags, PageLocation )
FUNCTION
Return the page identifier of the Notebook page currently at the front.
ARGUMENTS
RESULT
A Notebook page identifier.
SEE ALSO
SOURCE
Notebook = DW_notebook_new( 0, !REXXDW.!DW_TAB_TO_TOP ) notebookbox = DW_box_new( !REXXDW.!DW_VERT, 0 ) notebookpage = DW_notebook_page_new( Notebook, 0, !REXXDW.!DW_PAGE_TO_BACK ) Call DW_notebook_pack Notebook, notebookpage, notebookpagebox ... Say 'The pageid of the Notebook is:' DW_notebook_page_get( Notebook )
DESCRIPTION
A Percent widget is simply a progress bar.
NOTES
Under OS/2 only 1 instance of a Percent or Slider widget can exist within the same Box. So for complete portability, all Percent and Slider Widgets should be enclosed in their own Box.
NAME
DW_percent_new
SYNOPSIS
win = DW_percent_new( Id )
FUNCTION
Creates a new Percent progress status bar widget.
ARGUMENTS
RESULT
A Percent progress status bar identifier.
SOURCE
Percent = DW_percent_new( 0 )
NAME
DW_percent_set_pos
SYNOPSIS
DW_percent_set_pos( Win, Position )
FUNCTION
Sets the current position of the Percent bar to Position.
ARGUMENTS
RESULT
No return result.
SOURCE
Percent = DW_percent_new( 0 ) ... now = (bytes_sent*100) % total_bytes Call DW_percent_set_pos Percent, now
DESCRIPTION
A Scrollbar widget is used in conjunction with other Widgets that are not by default scrollable, to allow details that are not completely visible in a Window to be viewable by scrolling. Both horizontal and vertical scrollbars are supported.
NAME
DW_scrollbar_new
SYNOPSIS
win = DW_scrollbar_new( Orientation, Id )
FUNCTION
Creates a new Scrollbar. A Scrollbar is used to scroll various other Widgets like Multi-Line edit windows or listboxes.
ARGUMENTS
RESULT
A Scrollbar identifier.
SOURCE
vscrollbar = DW_scrollbar_new( !REXXDW.!DW_VERT, 0 )
NAME
DW_scrollbar_set_range
SYNOPSIS
DW_scrollbar_set_range( Win, Range, Thumbwidth )
FUNCTION
Sets the maximum value and width of the Scrollbar thumb of the Scrollbar.
ARGUMENTS
RESULT
No return result.
SOURCE
vscrollbar = DW_scrollbar_new( !REXXDW.!DW_VERT, 0 ) Call DW_scrollbar_set_range vscrollbar, 200, 40 ... Call DW_scrollbar_set_pos vscrollbar, 150 ... Say 'The Scrollbar is at' DW_scrollbar_get_pos( vscrollbar )
NAME
DW_scrollbar_set_pos
SYNOPSIS
DW_scrollbar_set_pos( Win, Position )
FUNCTION
Sets the position of the Scrollbar.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
vscrollbar = DW_scrollbar_new( !REXXDW.!DW_VERT, 0 ) Call DW_scrollbar_set_range vscrollbar, 200, 40 ... Call DW_scrollbar_set_pos vscrollbar, 150 ... Say 'The Scrollbar is at' DW_scrollbar_get_pos( vscrollbar )
NAME
DW_scrollbar_get_pos
SYNOPSIS
pos = DW_scrollbar_get_pos( Win )
FUNCTION
Returns the current position of the Scrollbar.
ARGUMENTS
RESULT
The position of the Scrollbar.
SEE ALSO
SOURCE
vscrollbar = DW_scrollbar_new( !REXXDW.!DW_VERT, 0 ) Call DW_scrollbar_set_range vscrollbar, 200, 40 Say 'The Scrollbar is at' DW_scrollbar_get_pos( vscrollbar )
DESCRIPTION
A Slider widget is similar to a Scrollbar, but it allows the user to select a numeric value by dragging a thumb until the desired numeric value is reached.
NOTES
Under OS/2 only 1 instance of a Percent or Slider widget can exist within the same Box. So for complete portability, all Percent and Slider Widgets should be enclosed in their own Box.
NAME
DW_slider_new
SYNOPSIS
win = DW_slider_new( Orientation, Range, Id )
FUNCTION
Creates a new Slider. A Slider provides a widget for selecting a numeric values from a range.
ARGUMENTS
RESULT
A Slider identifier.
SOURCE
Slider = DW_slider_new( !REXXDW.!DW_VERT, 100, 0 )
NAME
DW_slider_set_pos
SYNOPSIS
DW_slider_set_pos( Win, Position )
FUNCTION
Sets the position of the Slider.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
vslider = DW_slider_new( !REXXDW.!DW_VERT, 100, 0 ) ... Call DW_slider_set_pos vslider, 50 ... Say 'The Slider is at' DW_slider_get_pos( vslider )
NAME
DW_slider_get_pos
SYNOPSIS
pos = DW_slider_get_pos( Win )
FUNCTION
Returns the current position of the Slider.
ARGUMENTS
RESULT
The position of the Slider.
SEE ALSO
SOURCE
vslider = DW_slider_new( !REXXDW.!DW_VERT, 100, 0 ) Say 'The Slider is at' DW_slider_get_pos( vslider )
DESCRIPTION
A Spinbutton widget is similar to a Slider, but the user selects a numeric value by clicking an up or down arrow, or by manually entering the value into an entry field. A Spinbutton will wrap around at each end of its value limits.
NAME
DW_spinbutton_new
SYNOPSIS
win = DW_spinbutton_new( Text, Id )
FUNCTION
Creates a new Spinbutton. A Spinbutton provides a widget for selecting a numeric values from a range or by manually entering a value.
ARGUMENTS
RESULT
A Spinbutton identifier.
SOURCE
Spinbutton = DW_spinbutton_new( 'Select Number', 0 )
NAME
DW_spinbutton_set_limits
SYNOPSIS
DW_spinbutton_set_limits( Win, Upper, Lower )
FUNCTION
Sets the maximum and minimum values the Spinbutton can support.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Spinbutton = DW_spinbutton_new( 'Select Number', 0 ) Call DW_spinbutton_set_limits Spinbutton, 200, 40 ... Call DW_spinbutton_set_pos Spinbutton, 150 ... Say 'The Spinbutton is at' DW_spinbutton_get_pos( Spinbutton )
NAME
DW_spinbutton_set_pos
SYNOPSIS
DW_spinbutton_set_pos( Win, Position )
FUNCTION
Sets the position of the Spinbutton.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Spinbutton = DW_spinbutton_new( 'Select Number', 0 ) Call DW_spinbutton_set_limits Spinbutton, 200, 40 ... Call DW_spinbutton_set_pos Spinbutton, 50 ... Say 'The Spinbutton is at' DW_spinbutton_get_pos( Spinbutton )
NAME
DW_spinbutton_get_pos
SYNOPSIS
pos = DW_spinbutton_get_pos( Win )
FUNCTION
Returns the current position of the Spinbutton.
ARGUMENTS
RESULT
The position of the Spinbutton.
SEE ALSO
SOURCE
Spinbutton = DW_spinbutton_new( 'Select Number', 0 ) Call DW_spinbutton_set_limits Spinbutton, 200, 40 ... Call DW_spinbutton_set_pos Spinbutton, 150 ... Say 'The Spinbutton is at' DW_spinbutton_get_pos( Spinbutton )
DESCRIPTION
A Splitbar is another frame in which other Widgets are packed. The Splitbar consists of two halves and a divider, which can be dragged by the user to resize each side of the Splitbar. The Widgets within each side of the Splitbar are automatically resized.
NAME
DW_splitbar_new
SYNOPSIS
win = DW_splitbar_new( Orientation, FirstBox, SecondBox, Id )
FUNCTION
Creates a new Splitbar. A Splitbar provides a widget for Packing two boxes which can be dynamically resized by the user. This function also packs the boxes.
ARGUMENTS
RESULT
A Splitbar identifier.
SEE ALSO
SOURCE
Splitbar = DW_splitbar_new( !REXXDW.!DW_HORZ, box1, box2, 0 ) Call DW_splitbar_set Splitbar, 40.0
NAME
DW_splitbar_set
SYNOPSIS
DW_splitbar_set( Win, Percent )
FUNCTION
Sets the relative sizes of the halves of the Splitbar, by setting the percentage of the left or top half.
ARGUMENTS
RESULT
No return result.
SOURCE
Splitbar = DW_splitbar_new( !REXXDW.!DW_HORZ, box1, box2, 0 ) Call DW_splitbar_set Splitbar, 40.0
NAME
DW_splitbat_get
SYNOPSIS
perc = DW_splitbar_get( Win )
FUNCTION
Returns the current percentage that the first half of the Splitbar occupies.
ARGUMENTS
RESULT
The percentage of the first half of the Splitbar.
SEE ALSO
SOURCE
Splitbar = DW_splitbar_new( !REXXDW.!DW_HORZ, box1, box2, 0 ) Call DW_splitbar_set Splitbar, 40.0 ... Say 'The Splitbar percentage is' DW_splitbar_get( Splitbar )
DESCRIPTION
StaticText Widgets simply display static text.
NAME
DW_text_new
SYNOPSIS
win = DW_text_new( Text, Id )
FUNCTION
Creates a new text Window. A text Window is a readonly Window containing text.
ARGUMENTS
RESULT
A text Window identifier.
SEE ALSO
SOURCE
text = DW_text_new( 'This is Rexx/DW', 0 )
NAME
DW_status_text_new
SYNOPSIS
win = DW_status_text_new( Text, Id )
FUNCTION
Creates a new status text Window. A status text Window is a readonly Window containing text with a sunken appearence.
ARGUMENTS
RESULT
A status text Window identifier.
SEE ALSO
SOURCE
stext = DW_status_text_new( 'The current status is' status, 0 )
DESCRIPTION
A Tree widget provides a hierachical display of items. Paricularly suited to a filesystem display.
NAME
DW_tree_new
SYNOPSIS
win = DW_tree_new( Id )
FUNCTION
Creates a new Tree widget. A Tree widget allows the user to display a hierarchy in a Tree format.
ARGUMENTS
RESULT
A Tree identifier.
SOURCE
Tree = DW_tree_new( 0 ) Do i = 1 To text.0 item.i = DW_tree_insert_after( Tree, topitem, Word( text.i ), , fileicon, parent, 'item'i ) End
NAME
DW_tree_insert
SYNOPSIS
data = DW_tree_insert( Win, Title[, Icon[, ParentItem[, ItemData]]] )
FUNCTION
Inserts the Tree item into the Tree at the end of any other items in the Tree with the same ParentItem. Intended to be used when populating and empty Tree
ARGUMENTS
RESULT
A Tree item identifier.
SEE ALSO
SOURCE
Tree = DW_tree_new( 0 ) Do i = 1 To text.0 item.i = DW_tree_insert( Tree, Word( text.i ), fileicon, parent, , 'item'i ) End
NAME
DW_tree_insert_after
SYNOPSIS
data = DW_tree_insert_after( Win, Item, Title[, Icon[, ParentItem[, ItemData]]] )
FUNCTION
Inserts the Tree item into an existing Tree physically after the item specified in Item and at the level identified by ParentItem
ARGUMENTS
RESULT
A Tree item identifier.
SEE ALSO
SOURCE
Tree = DW_tree_new( 0 ) topitem = DW_tree_insert( Tree, 'Parent' ) Do i = 1 To text.0 item.i = DW_tree_insert( Tree, topitem, Word( text.i ), fileicon, , parent, 'item'i ) End ... Call DW_tree_insert_after( Tree, item.5, "New Item", fileicon, item.3 )
NAME
DW_tree_clear
SYNOPSIS
DW_tree_clear( Win )
FUNCTION
Removes all items from a Tree widget.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Tree = DW_tree_new( 0 ) ... Call DW_tree_clear Tree
NAME
DW_tree_item_delete
SYNOPSIS
DW_tree_item_delete( Win, Item )
FUNCTION
Deletes the specified Item in the Tree. If the item is a parent item then all child items under it are also deleted. (Is this true???)
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Tree = DW_tree_new( 0 ) Do i = 1 To text.0 item.i = DW_tree_insert( Tree, Word( text.i ), fileicon ) End ... Call DW_tree_item_delete Tree, item.5
NAME
DW_tree_item_collapse
SYNOPSIS
DW_tree_item_collapse( Win, Item )
FUNCTION
Collapses the specified Item in the Tree.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_tree_new, DW_tree_insert, DW_tree_insert_after, DW_tree_item_expand
SOURCE
Tree = DW_tree_new( 0 ) Do i = 1 To text.0 item.i = DW_tree_insert( Tree, Word( text.i ), fileicon ) End ... Call DW_tree_item_collapse Tree, item.5
NAME
DW_tree_item_expand
SYNOPSIS
DW_tree_item_expand( Win, Item )
FUNCTION
Expands the specified Item in the Tree.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_tree_new, DW_tree_insert, DW_tree_insert_after, DW_tree_item_collapse
SOURCE
Tree = DW_tree_new( 0 ) Do i = 1 To text.0 item.i = DW_tree_insert( Tree, Word( text.i ), fileicon ) End ... Call DW_tree_item_expand Tree, item.5
NAME
DW_tree_item_set_data
SYNOPSIS
DW_tree_item_set_data( Win, Item, UserData )
FUNCTION
Sets the userdata for the specified Tree Item.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Tree = DW_tree_new( 0 ) Do i = 1 To text.0 item.i = DW_tree_insert( Tree, Word( text.i ), fileicon ) Call DW_tree_item_set_data Tree, item.i, 'item'i End ... Say 'The data from this item is' DW_tree_item_get_data( Tree, item.5 ) , 'and should be "item5"'
NAME
DW_tree_item_get_data
SYNOPSIS
data = DW_tree_item_get_data( Win, Item )
FUNCTION
Returns the data the user set for this Item when calling DW_tree_item_set_data().
ARGUMENTS
RESULT
The user supplied data.
SEE ALSO
SOURCE
Tree = DW_tree_new( 0 ) Do i = 1 To text.0 item.i = DW_tree_insert( Tree, Word( text.i ), fileicon ) Call DW_tree_item_set_data Tree, item.i, 'item'i End ... Say 'The data from this item is' DW_tree_item_get_data( Tree, item.5 ) , 'and should be "item5"'
NAME
DW_tree_item_select
SYNOPSIS
DW_tree_item_select( Win, Item )
FUNCTION
Makes the specified Tree Item the currently selected item.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_tree_new, DW_tree_item_set_data, DW_tree_insert, DW_tree_insert_after
SOURCE
Tree = DW_tree_new( 0 ) Do i = 1 To text.0 item.i = DW_tree_insert( Tree, Word( text.i ), fileicon ) Call DW_tree_item_set_data Tree, item.i, 'item'i End ... Call DW_tree_item_select( Tree, item.5 )
NAME
DW_tree_item_change
SYNOPSIS
DW_tree_item_change( Win, Item, Title, Icon )
FUNCTION
Changes the Title and Icon for the specified Tree Item.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Tree = DW_tree_new( 0 ) Do i = 1 To text.0 item.i = DW_tree_insert( Tree, Word( text.i ), fileicon ) Call DW_tree_item_set_data Tree, item.i, 'item'i End ... Call DW_tree_item_change Tree, item.5, 'New Title', diricon
DESCRIPTION
A Window is frame in which other Widgets are contained. It is also a generic term for a number of other Widgets that can be manipulated by a number of Functions in this section.
NAME
DW_window_new
SYNOPSIS
win = DW_window_new( Win, Title, Flags )
FUNCTION
Creates a new Window. A Window is a visible frame containing a border and titlebar. It can also contain minimise/maximise/close buttons etc depending on the value of Flags.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle )
NAME
DW_mdi_new
SYNOPSIS
win = DW_mdi_new( Id )
FUNCTION
Creates a new Multi-Document Interface (MDI) frame. An MDI frame is used as a container for multiple windows.
ARGUMENTS
RESULT
An MDI frame identifier.
SEE ALSO
SOURCE
... mdi = DW_mdi_new( 100 ) ... mdiwin1 = DW_window_new( mdi, 'First MDI Window', style ) mdiwin2 = DW_window_new( mdi, 'Second MDI Window', style ) ...
NAME
DW_window_destroy
SYNOPSIS
DW_window_destroy( Win )
FUNCTION
Destroys a Window and all other items created within it.
ARGUMENTS
RESULT
0 if successful, any other value is an error
SEE ALSO
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Window on desktop', style ) ... Call DW_window_destroy( win )
NAME
DW_window_capture
SYNOPSIS
DW_window_capture( Win )
FUNCTION
Captures the mouse pointer to the specified Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
Only 1 Window can capture the mouse pointer at any point in time.
SOURCE
Call DW_window_capture( win )
NAME
DW_window_click_default
SYNOPSIS
DW_window_click_default( Win, NextWin )
FUNCTION
Defines the next Window; NextWin to receive focus when the ENTER key is pressed in Win.
ARGUMENTS
RESULT
No return result.
SOURCE
Call DW_window_click_default( win, nextwin )
NAME
DW_window_default
SYNOPSIS
DW_window_default( Win, DefaultWin )
FUNCTION
Sets the default focus item; DefaultWin for the specified Window.
ARGUMENTS
RESULT
No return result.
SOURCE
Call DW_window_default( win, mywin )
NAME
DW_window_enable
SYNOPSIS
DW_window_enable( Win )
FUNCTION
Disables a Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Window on desktop', style ) ... Call DW_window_disable( win ) ... Call DW_window_enable( win )
NAME
DW_window_disable
SYNOPSIS
DW_window_disable( Win )
FUNCTION
Disables a Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Window on desktop', style ) ... Call DW_window_disable( win )
NAME
DW_window_from_id
SYNOPSIS
win = DW_window_from_id( Win, Id )
FUNCTION
Returns the Window identifier from a widget within Win with the given Id.
ARGUMENTS
RESULT
The Window identifier.
NOTES
For this function to work, all Ids for Widgets packed into the one Window must be unique.
SOURCE
Box = DW_box_new( !REXXDW.!DW_VERT, 0 ) bitmap = DW_bitmap_new( 100 ) Call DW_box_pack_start Box, bitmap, 10, 10, !REXXDW.!DW_DONT_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0 Button = DW_button_new( "Quit", 10 ) Call DW_box_pack_start Box, Button, 10, 10, !REXXDW.!DW_DONT_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0 ... Say 'Id' DW_window_from_id( Box, 100 ) 'should be the same as' bitmap
NAME
DW_window_show
SYNOPSIS
rc = DW_window_show( Win )
FUNCTION
Makes the specified Window visible.
ARGUMENTS
RESULT
0 if function succeeds, error for any other value
SEE ALSO
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) ... Call DW_window_show( win )
NAME
DW_window_hide
SYNOPSIS
DW_window_hide( Win )
FUNCTION
Makes the specified Window invisible.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) ... Call DW_window_hide( win )
NAME
DW_window_lower
SYNOPSIS
DW_window_lower( Win )
FUNCTION
Makes the specified Window appear behind all others.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) ... Call DW_window_lower( win )
NAME
DW_window_minimize
SYNOPSIS
DW_window_minimize( Win )
FUNCTION
Minimises the specified Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_window_maximize; but there isn't one!!
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) ... Call DW_window_minimize( win )
NAME
DW_window_raise
SYNOPSIS
DW_window_raise( Win )
FUNCTION
Makes the specified Window appear in front of all others.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) ... Call DW_window_raise( win )
NAME
DW_window_redraw
SYNOPSIS
DW_window_redraw( Win )
FUNCTION
Redraws the specified Window and all of Widgets contained within it. This should be called after re-Packing any Widgets within the Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) ... Call DW_window_redraw( win )
NAME
DW_window_release
SYNOPSIS
DW_window_release( )
FUNCTION
Releases the captured mouse pointer from a previous call to DW_window_captture().
ARGUMENTS
None
RESULT
No return result.
SEE ALSO
NOTES
Only 1 Window can capture the mouse pointer at any point in time.
SOURCE
Call DW_window_capture( win ) ... Call DW_window_release( )
NAME
DW_window_reparent
SYNOPSIS
DW_window_reparent( Win, ParentWin )
FUNCTION
Changes the parent Window; ParentWin of the specified Win.
ARGUMENTS
RESULT
No return result.
SOURCE
mdi = DW_mdi_new( 100 ) win = DW_window_new( mdi, 'Edit User Preferences', windowstyle ) ... Call DW_window_reparent( win, !REXXDW.!DW_DESKTOP ) ... box1 = DW_box_new( !REXXDW.!DW_VERT, 0 ) Call DW_box_pack_start win, box1, 10, 10, !REXXDW.!DW_DONT_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0 Button = DW_button_new( "Quit", 10 ) Call DW_box_pack_start box1, Button, 10, 10, !REXXDW.!DW_DONT_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0 ... box2 = DW_box_new( !REXXDW.!DW_VERT, 0 ) Call DW_window_reparent box2, Button
NAME
DW_window_set_bitmap
SYNOPSIS
DW_window_set_bitmap( Win, Id, Filename )
FUNCTION
Associates the bitmap in Filename with the specified Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... bitmap = DW_bitmap_new( 100 ) Call DW_box_pack_start win, bitmap, 10, 10, !REXXDW.!DW_DONT_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0 Call DW_window_set_bitmap bitmap, 0, 'mypicture'
NAME
DW_window_set_border
SYNOPSIS
DW_window_set_border( Win, Width )
FUNCTION
Sets the width of the border for the specified Window.
ARGUMENTS
RESULT
0 if successful, any other value is an error
NOTES
This function only works on OS/2.
SOURCE
win = DW_window_new( mdi, 'Edit User Preferences', windowstyle ) Call DW_window_set_border win, 20
NAME
DW_window_set_pointer
SYNOPSIS
DW_window_set_pointer( Win, Pointer )
FUNCTION
Changes the mouse pointer to Pointer.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
To ensure that the pointer is changed immediately, call DW_main_sleep() afterwards for a short period, like 10 milliseconds
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) ... Call DW_window_set_pointer( win, !REXXDW.!DW_POINTER_CLOCK ) Call DW_main_sleep 10
NAME
DW_window_set_color
SYNOPSIS
DW_window_set_color( Win, Fore, Back )
FUNCTION
Sets the foreground and background colour of the Window.
ARGUMENTS
RESULT
0 if successful, any other value is an error
SEE ALSO
SOURCE
text = DW_text_new( 'File to browse', 0 ) Call DW_window_set_color text, !REXXDW.!DW_CLR_BLACK, !REXXDW.!DW_CLR_YELLOW
NAME
DW_window_set_font
SYNOPSIS
DW_window_set_font( Win, Fontname )
FUNCTION
Sets the text font of the Window.
ARGUMENTS
RESULT
0 if successful, any other value is an error
SEE ALSO
NOTES
Font names in RexxDW are platform dependent. See Fontnames for details on how to specify fonts on each platform.
SOURCE
Parse Source os . prog Select When os = 'OS2' | os = 'OS/2' Then FIXEDFONT = "5.System VIO" When os = 'WIN32' Then FIXEDFONT = "10.Terminal" When !REXXDW.!GTK_MAJOR_VERSION > 1 Then FIXEDFONT = "monospace 10" Otherwise FIXEDFONT = "fixed" End text = DW_text_new( 'File to browse', 0 ) Call DW_window_set_font text, FIXEDFONT
NAME
DW_window_set_icon
SYNOPSIS
DW_window_set_icon( Win, Icon )
FUNCTION
Sets the text font of the Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
rexxdwicon = DW_icon_load_from_file( '/home/mark/rexxdw' ) win = DW_window_new( mdi, 'Edit User Preferences', windowstyle ) Call DW_window_set_icon win, rexxdwicon
NAME
DW_window_set_pos
SYNOPSIS
DW_window_set_pos( Win, X, Y )
FUNCTION
Sets the position of the top left corner of the Window relative to the Window's parent.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
Some Window managers (at least under X11) will not respect a request for the position of a Window.
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) Call DW_window_set_pos win, 50, 90
NAME
DW_window_set_size
SYNOPSIS
DW_window_set_size( Win, Width, Height )
FUNCTION
Sets the size of the Window in pixels.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
Some Window managers (at least under X11) will not respect a request for the size of a Window.
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) Call DW_window_set_size win, 640, 480
NAME
DW_window_set_pos_size
SYNOPSIS
DW_window_set_pos_size( Win, X, Y, Width, Height )
FUNCTION
Sets the position of the top left corner of the Window relative to the Window's parent and the size of the Window in pixels.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
Some Window managers (at least under X11) will not respect a request for the position of a Window.
SOURCE
win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) Call DW_window_set_pos_size win, 50, 90, 640, 480
NAME
DW_window_get_pos_size
SYNOPSIS
FUNCTION
Returns the X and Y coordinates of the specified Window, and the Width and Height of the Window.
ARGUMENTS
RESULT
X, Y, Width and Height are returned as four words. PARSE VALUE is the easiest way to obtain all values.
SOURCE
... win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Edit User Preferences', , windowstyle ) ... Parse Value DW_window_get_pos_size( win ) With x y width height
NAME
DW_window_set_style
SYNOPSIS
DW_window_set_style( Win, Style, Mask )
FUNCTION
Changes the attributes of text within the specified Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
win = DW_text_new( 'Edit User Preferences' ) style = DW_or( !REXXDW.!DW_DT_RIGHT, !REXXDW.!DW_DT_VCENTER ) mask = DW_or( !REXXDW.!DW_DT_RIGHT, !REXXDW.!DW_DT_VCENTER ) Call DW_window_set_style win, style, mask
NAME
DW_window_set_text
SYNOPSIS
DW_window_set_text( Win, Text )
FUNCTION
Sets the text attribute for the specified Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
Not all Window types have a meaningful text attribute. Those that do are:
Text DW_text_new StatusText DW_statustext_new Combobox DW_combobox_new() EntryField DW_entryfield_new() EntryFieldPassword DW_entryfield_password_new()
SOURCE
EntryField = DW_entryfield_new( "Initial value", 0 ) ... Call DW_window_set_text EntryField, 'Rexx is king'
NAME
DW_window_get_text
SYNOPSIS
text = DW_window_get_text( Win )
FUNCTION
Returns the text attribute from the specified Window.
ARGUMENTS
RESULT
The value of the text attribute of the Window.
SEE ALSO
NOTES
Not all windows have a meaningful text attribute. Those that do are:
Text DW_text_new StatusText DW_statustext_new Combobox DW_combobox_new() EntryField DW_entryfield_new() EntryFieldPassword DW_entryfield_password_new()
SOURCE
EntryField = DW_entryfield_new( "Initial value", 0 ) ... Say 'The text is now' DW_window_get_text( EntryField )
NAME
DW_window_set_data
SYNOPSIS
DW_window_set_data( Win, Name, Value )
FUNCTION
Sets the user variable; Name to the specified Value for the specified Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
Don't use variable names that start with "_dw"; they are used internally by Dynamic Windows.
SOURCE
EntryField = DW_entryfield_new( 'Initial value', 0 ) Call DW_window_set_data EntryField, 'MyVar', 'my useful data' ... Say 'The value of "MyVar" is:' DW_window_get_data( EntryField, 'MyVar' )
NAME
DW_window_get_data
SYNOPSIS
data = DW_window_get_data( Win, Name )
FUNCTION
Returns the user variable data for the Window with the given Name created by a call to DW_window_set_data();
ARGUMENTS
RESULT
The value of the user variable Name for the Window
SEE ALSO
NOTES
Don't use variable names that start with "_dw"; they are used internally by Dynamic Windows.
SOURCE
EntryField = DW_entryfield_new( 'Initial value', 0 ) Call DW_window_set_data EntryField, 'MyVar', 'my useful data' ... Say 'The value of "MyVar" is:' DW_window_get_data( EntryField, 'MyVar' )
DESCRIPTION
There always has to be things that can't be logically grouped together. These are those.
NAME
DW_messagebox
SYNOPSIS
action = DW_messagebox( Title, Flags, Text )
FUNCTION
Displays a modal messagebox in the middle of the desktop.
ARGUMENTS
RESULT
Depending on the Button clicked, one of the values defined in MessageboxResults
SEE ALSO
SOURCE
... action = DW_messagebox( 'Are you sure?', DW_or( !REXXDW.!DW_MB_YESNO, , !REXXDW.!DW_MB_QUESTION ), 'Delete selected files' ) If action = !REXXDW.!DW_MB_RESULT_YES Then Call DeleteFiles
NAME
DW_bitmap_new
SYNOPSIS
win = DW_bitmap_new( Id )
FUNCTION
Creates a new bitmap Window used as the container for a bitmap image.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... bitmap = DW_bitmap_new( 100 ) Call DW_box_pack_start win, bitmap, 10, 10, !REXXDW.!DW_DONT_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0 Call DW_window_set_bitmap bitmap, 0, 'mypicture'
NAME
DW_bitmap_new_from_file
SYNOPSIS
win = DW_bitmap_new( Id, Filename )
FUNCTION
Creates a new bitmap Window including a bitmap image.
ARGUMENTS
RESULT
A Window identifier.
SEE ALSO
SOURCE
... bitmap = DW_bitmap_new_from_file( 100, 'mypicture' ) Call DW_box_pack_start win, bitmap, 10, 10, !REXXDW.!DW_DONT_EXPAND_HORZ, , !REXXDW.!DW_DONT_EXPAND_VERT, 0
NAME
DW_icon_load_from_file
SYNOPSIS
win = DW_icon_load_from_file( Filename )
FUNCTION
Creates a new icon identifier for use in other Functions from the file specified in Filename. Supported icon types are Windows icons (.ico), OS/2 icons(.ico) and pixmaps(.xpm) on GTK.
ARGUMENTS
RESULT
An icon identifier.
NOTES
The Filename can contain a path component. For portability, do not specify the file's extension; let dwindows work this out.
SOURCE
normalfileicon = DW_icon_load_from_file( '/home/mark/normalfile' )
DESCRIPTION
These Functions control the execution of the current process or instigate other processes.
NAME
DW_init
SYNOPSIS
rc = DW_init( )
FUNCTION
Initialises the Rexx/DW interface. This MUST be called before any other Rexx/DW function.
ARGUMENTS
None
RESULT
0 if all OK, non-zero if an error occurred
SOURCE
Call DW_init
NAME
DW_main
SYNOPSIS
DW_main( )
FUNCTION
This is the main event dispatcher function for Rexx interpreters which support Callbacks.
ARGUMENTS
None
RESULT
No return result.
NOTES
This function can only be called if your Rexx interpreter supports the RexxCallback() API. This can be determined by the value of the variable !REXXDW.!HAVE_REXXCALLBACK being 1.
SEE ALSO
SOURCE
... If !REXXDW.!HAVE_REXXCALLBACK Then Call DW_main() Else Do Forever cmd = DW_main_iteration() If cmd \= '' Then Interpret 'Call' cmd End Return 0
NAME
DW_main_iteration
SYNOPSIS
cmd = DW_main_iteration( )
FUNCTION
This is the main event dispatcher function for Rexx interpreters which DO NOT support Callbacks.
ARGUMENTS
None
RESULT
The Rexx function called back, follwoed by parameters
NOTES
This function is supplied for interpreters that do not support the RexxCallback() API. This can be determined by the value of the variable !REXXDW.!HAVE_REXXCALLBACK being 1. You have to be very careful with any optional data you pass to a callback function as the data could be "interpreted" with syntax errors.
SEE ALSO
SOURCE
... If !REXXDW.!HAVE_REXXCALLBACK Then Call DW_main() Else Do Forever cmd = DW_main_iteration() If cmd \= '' Then Interpret 'Call' cmd End Return 0
NAME
DW_main_sleep
SYNOPSIS
DW_main_sleep( Period )
FUNCTION
This function dispatches any events in the event queue for the number of milliseconds specified by Period.
ARGUMENTS
RESULT
No return result.
NOTES
This function is useful to ensure that any outstanding event is executed before continuing execution within the code and not having to wait until control passes back to DW_main() or DW_main_iteration().
SEE ALSO
SOURCE
... Call DW_window_set_pointer mainwindow, !REXXDW.!DW_POINTER_CLOCK Call DW_main_sleep 10
DESCRIPTION
A Dialog allows the programmer to create an interface with the user that is controlled outside of the normal main message dispatcher. other processes.
NAME
DW_dialog_new
SYNOPSIS
Dialog = DW_dialog_new( )
FUNCTION
Creates a new Dialog. A Dialog is a control widget (as opposed to a display widget) that allows the programmer to create a new toplevel Window and have the user interact with the contents of the Window, independently of any other toplevel Window.
ARGUMENTS
None
RESULT
Returns a Dialog identifier
SEE ALSO
SOURCE
... dialog_wait = DW_dialog_new( ) Call DW_signal_connect win, !REXXDW.!DW_DELETE_EVENT, , 'GenericCloseCallback', win, dialog_wait ... result = DW_dialog_wait( dialog_wait ) If result = 'cancel' Then Return 1 ... GenericCloseCallback: Procedure Expose !REXXDW. Parse Arg ., Window, Dialog Call DW_window_destroy Window If Dialog \= '' Then Call DW_dialog_dismiss Dialog, 'close' Return 0
NAME
DW_dialog_dismiss
SYNOPSIS
DW_dialog_dismiss( Dialog, ReturnString )
FUNCTION
Prepares a Dialog Window for exiting and returns ReturnString to the waiting DW_dialog_wait().
ARGUMENTS
RESULT
Always returns 0
SEE ALSO
SOURCE
... dialog_wait = DW_dialog_new( ) Call DW_signal_connect win, !REXXDW.!DW_DELETE_EVENT, , 'GenericCloseCallback', win, dialog_wait ... result = DW_dialog_wait( dialog_wait ) If result = 'cancel' Then Return 1 ... GenericCloseCallback: Procedure Expose !REXXDW. Parse Arg ., Window, Dialog Call DW_window_destroy Window If Dialog \= '' Then Call DW_dialog_dismiss Dialog, 'close' Return 0
NAME
DW_dialog_wait
SYNOPSIS
returnstring = DW_dialog_wait( Dialog )
FUNCTION
Creates a new Dialog for handling modal dialogs.
ARGUMENTS
RESULT
Returns the string set by the call to DW_dialog_dismiss()
SEE ALSO
SOURCE
... dialog_wait = DW_dialog_new( ) Call DW_signal_connect win, !REXXDW.!DW_DELETE_EVENT, , 'GenericCloseCallback', win, dialog_wait ... result = DW_dialog_wait( dialog_wait ) If result = 'cancel' Then Return 1 ... GenericCloseCallback: Procedure Expose !REXXDW. Parse Arg ., Window, Dialog Call DW_window_destroy Window If Dialog \= '' Then Call DW_dialog_dismiss Dialog, 'close' Return 0
DESCRIPTION
NAME
DW_signal_connect
SYNOPSIS
DW_signal_connect( Win, Signal, Function[, UserData1[, UserData2[, ...]]] )
FUNCTION
Connects an event to a callback function.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_signal_disconnect, DW_signal_disconnect_by_window, Callbacks
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_CONFIGURE_EVENT, , 'configure_cb', 'fred', 'mary'
NAME
DW_signal_disconnect
SYNOPSIS
DW_signal_disconnect( Win, Signal )
FUNCTION
Disconnects a specific event callback.
ARGUMENTS
RESULT
No return result.
SEE ALSO
DW_signal_connect, DW_signal_disconnect_by_window, Callbacks
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_CONFIGURE_EVENT, , 'configure_cb', 'fred', 'mary' ... Call DW_signal_disconnect Window, !REXXDW.!DW_CONFIGURE_EVENT
NAME
DW_signal_disconnect_by_window
SYNOPSIS
DW_signal_disconnect_by_window( Win )
FUNCTION
Disconnects all signals for a Window.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
Call DW_signal_connect Window, !REXXDW.!DW_CONFIGURE_EVENT, , 'configure_cb', 'fred', 'mary' ... Call DW_signal_disconnect_by_window Window
NAME
DW_timer_connect
SYNOPSIS
timer = DW_timer_connect( Interval, Function[, UserData1[, UserData2[, ...]]] )
FUNCTION
Creates a new timer callback. A timer callback will fire after the specified Interval and call the Rexx procedure Function with the optional arguments.
ARGUMENTS
RESULT
A timer identifier.
SEE ALSO
NOTES
There are two ways to stop a timer from firing. One is explicitly by calling DW_timer_disconnect() using the timer identifier returned from this function. The other way is to return 0 from the callback connected to the timer. Returning 1 from the callback will re-arm the timer.
SOURCE
timer = DW_timer_connect( 5000, 'timer_cb', 'fred', 'mary' )
NAME
DW_timer_disconnect
SYNOPSIS
DW_timer_disconnect( Timer )
FUNCTION
Terminates the timer so the timer no longer files.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
timer = DW_timer_connect( 5000, 'timer_cb', 'fred', 'mary' ) ... Call DW_timer_disconnect timer
DESCRIPTION
These Functions provide Browsing capabilties.
NAME
DW_browse
SYNOPSIS
rc = DW_browse( URL )
FUNCTION
Starts up the default Web browser as a new process with the specified URL. When using GTK, the browser started is "netscape". To use another browser set the environment variable DW_BROWSER to the executable to run.
ARGUMENTS
RESULT
The return code from the attempt to execute the browser. Usually 0 indicates success and any other value an error.
SOURCE
... rc = DW_browse( "http://rexxdw.sf.net" )
NAME
DW_file_browse
SYNOPSIS
filename = DW_file_browse( Title, DefaultDir, Extension, Flag )
FUNCTION
Creates a file open/save or directory browser Dialog.
ARGUMENTS
RESULT
The fully qualified selected file/directory or blank if the Dialog is cancelled.
SEE ALSO
NOTES
On some platforms the current directory is changed when this function is called.
SOURCE
... here = Directory() dir = DW_file_browse( "Select Directory", "/home/mark", , , !REXXDW.!DW_DIRECTORY_OPEN ) Say "Directory selected was:" dir Call Directory( here )
DESCRIPTION
NAME
DW_color_depth_get
SYNOPSIS
depth = DW_color_depth_get()
FUNCTION
Returns the colour depth of the current screen.
ARGUMENTS
None
RESULT
The colour depth.
SOURCE
... Say 'Colour depth is:' DW_color_depth_get()
NAME
DW_rgb
SYNOPSIS
colour = DW_rgb( Red, Green, Blue )
FUNCTION
Mixes shades of red, green and blue to make an internal RexxDW colour.
ARGUMENTS
RESULT
An internal RexxDW colour.
SEE ALSO
SOURCE
... colour = DW_rgb( 45, 134, 200 )
NAME
DW_red_value
SYNOPSIS
red = DW_red_value( Colour )
FUNCTION
Obtains the red component from a RexxDW colour.
ARGUMENTS
RESULT
The red component of the colour.
SEE ALSO
SOURCE
... Say 'The red component of DARKCYAN is:' , DW_red_value( !REXXDW.!DW_CLR_DARKCYAN )
NAME
DW_green_value
SYNOPSIS
green = DW_green_value( Colour )
FUNCTION
Obtains the green component from a RexxDW colour.
ARGUMENTS
RESULT
The green component of the colour.
SEE ALSO
SOURCE
... Say 'The green component of DARKCYAN is:' , DW_green_value( !REXXDW.!DW_CLR_DARKCYAN )
NAME
DW_blue_value
SYNOPSIS
blue = DW_blue_value( Colour )
FUNCTION
Obtains the blue component from a RexxDW colour.
ARGUMENTS
RESULT
The blue component of the colour.
SEE ALSO
SOURCE
... Say 'The blue component of DARKCYAN is:' , DW_blue_value( !REXXDW.!DW_CLR_DARKCYAN )
NAME
DW_color_background_set
SYNOPSIS
DW_color_background_set( Colour )
FUNCTION
Sets the background colour of the specified Window. Only applicable to render??? windows.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... Call DW_color_background_set( renderbox, DW_rgb( 10, 45, 123 ) )
NAME
DW_color_foreground_set
SYNOPSIS
DW_color_foreground_set( Colour )
FUNCTION
Sets the foreground colour of the specified Window. Only applicable to render??? windows.
ARGUMENTS
RESULT
No return result.
SEE ALSO
SOURCE
... Call DW_color_foreground_set( renderbox, DW_rgb( 10, 45, 123 ) )
NAME
DW_color_choose
SYNOPSIS
color = DW_color_choose( InitialColour )
FUNCTION
Displays a system Dialog for selecting a color.
ARGUMENTS
RESULT
The selected color, or the same value as InitialColor if the user cancels.
SEE ALSO
SOURCE
... newcolor = DW_color_choose( DW_rgb( 10, 45, 123 )
DESCRIPTION
These Functions support the loading and unloading of modules in DLLs. Not applicable to RexxDW.
DESCRIPTION
These Functions support the processing of semaphores. Not applicable to RexxDW.
DESCRIPTION
These Functions support events. Not applicable to RexxDW.
DESCRIPTION
These Functions support threads. Not applicable to RexxDW.
DESCRIPTION
These Functions allow positioning of the mouse pointer.
NAME
DW_pointer_set_pos
SYNOPSIS
DW_pointer_set_pos( X, Y )
FUNCTION
Moves the mouse pointer to the specified X and Y coordinates.
ARGUMENTS
RESULT
No return result.
SEE ALSO
NOTES
The coordinates are absolute screen positions, with 0/0 being the the top left corner of the screen. (Windows!!)
SOURCE
... Call DW_pointer_set_pos 100, 130
NAME
DW_pointer_get_pos
SYNOPSIS
FUNCTION
Returns the X and Y coordinates of the mouse pointer.
ARGUMENTS
None
RESULT
way to obtain both values.
SEE ALSO
NOTES
The coordinates are absolute screen positions, with 0/0 being the the top left corner of the screen. (Windows!!)
SOURCE
... Parse Value DW_pointer_get_pos( ) With x y Say 'The mouse pointer is at' x'/'y
DESCRIPTION
These Functions are grouped together becasue they don't fit into any other group.
NAME
DW_beep
SYNOPSIS
DW_beep( Frequency, Duration )
FUNCTION
Makes a sound of the given Frequency for the given Duration.
ARGUMENTS
RESULT
No return result.
SOURCE
... Call DW_beep(5000, 1000)
NAME
DW_environment_query
SYNOPSIS
DW_environment_query( Stem )
FUNCTION
Returns lots of information about the platform and Dynamic Windows in an array.
ARGUMENTS
RESULT
No return result. Value of array items:
SOURCE
Call DW_environment_query( 'stem.' ) Say 'OS name is:' stem.1
NAME
DW_user_dir
SYNOPSIS
dir = DW_user_dir( )
FUNCTION
Returns the user's "home" directory. If the environment variable HOME is set, this is returned, otherwise "C:\" is returned.
ARGUMENTS
None
RESULT
The user's home directory.
SOURCE
Say 'home is' DW_user_dir()
NAME
DW_screen_height
SYNOPSIS
height = DW_screen_height( )
FUNCTION
Returns the height of the physical screen in pixels.
ARGUMENTS
None
RESULT
The screen height
SEE ALSO
SOURCE
Say 'The height of the screen is' DW_screen_height()
NAME
DW_screen_width
SYNOPSIS
width = DW_screen_width( )
FUNCTION
Returns the width of the physical screen in pixels.
ARGUMENTS
None
RESULT
The screen width
SEE ALSO
SOURCE
Say 'The width of the screen is' DW_screen_width()
NAME
DW_font_text_extents_get
SYNOPSIS
Width Height = DW_font_text_extents_get( Win, Pixmap, Text )
FUNCTION
Returns the width and height of the Text in the current font.
ARGUMENTS
RESULT
Width and Height are returned as two words. PARSE VALUE is the easiest way to obtain both values.
NOTES
When calculating the size of the maximum width and height of a font, use a value like 'g(' for Text to ensure the maximum height of the Text can be calculated. Only one of Win or Pixmap is required. The other argument should be set to 0.
SOURCE
win = DW_render_new( 0 ) Call DW_window_set_font win, myfont Parse Value DW_font_text_extents_get( win, 0, 'g(' ) With width height
NAME
DW_or
SYNOPSIS
val = DW_or( Val1, Val2[,Val3...]])
FUNCTION
Logically "or" multiple values together.
ARGUMENTS
RESULT
The combined value of all arguments logically "or"ed together.
SEE ALSO
SOURCE
... style = DW_or( !REXXDW.!DW_FCF_SYSMENU, !REXXDW.!DW_FCF_TITLEBAR, , !REXXDW.!DW_FCF_SHELLPOSITION, !REXXDW.!DW_FCF_TASKLIST, , !REXXDW.!DW_FCF_DLGBORDER, !REXXDW.!DW_FCF_SIZEBORDER, , !REXXDW.!DW_FCF_MINMAX ) win = DW_window_new( !REXXDW.!DW_DESKTOP, 'Window on desktop', style )
NAME
DW_and
SYNOPSIS
val = DW_and( Val1, Val2[,Val3...]])
FUNCTION
Logically "and" multiple values together.
ARGUMENTS
RESULT
The combined value of all arguments logically "and"ed together.
SEE ALSO
SOURCE
... val = DW_and(10, 512345)
NAME
DW_flush
SYNOPSIS
DW_flush()
FUNCTION
Ensures that any changes drawn to the screen are immediately visible.
ARGUMENTS
None
RESULT
No return result.
SOURCE
... Call DW_pixmap_bitblt win, , 0, 0, width, height, , pixmap, x, 0 Call DW_flush()
DESCRIPTION
These Functions are common to most Rexx external function packages.
NAME
DW_loadfuncs
SYNOPSIS
rcode = DW_loadfuncs()
FUNCTION
Loads all other RexxDW external Functions
ARGUMENTS
None
RESULT
0 in all cases
SEE ALSO
NOTES
Under OS/2, DW_loadfuncs() will set the current process to a PM application to allow interaction with the OS/2 message queue. DW_dropfuncs() sets the process back to the type of application it was started as. If you run a Rexx/DW program as a .CMD file from a CMD.EXE Window, and DO NOT call DW_dropfuncs(), your CMD.EXE Window will be unusable!
NAME
DW_dropfuncs
SYNOPSIS
rcode = DW_dropfuncs(["UNLOAD"])
FUNCTION
Cleans up RexxDW environment and optionally will drop the external Functions.
ARGUMENTS
RESULT
0 in all cases
SEE ALSO
NOTES
Under OS/2, DW_loadfuncs() will set the current process to a PM application to allow interaction with the OS/2 message queue. DW_dropfuncs() sets the process back to the type of application it was started as. If you run a Rexx/DW program as a .CMD file from a CMD.EXE Window, and DO NOT call DW_dropfuncs(), your CMD.EXE Window will be unusable!
NAME
DW_variable
SYNOPSIS
rcode = DW_variable(Variable [,NewValue])
FUNCTION
Get or set an internal RexxDW variable.
ARGUMENTS
RESULT
When setting a variable, then 0 if success, any other value is an error When getting a variable, then the value of the variable is returned.
NOTES
The "Variable" argument can be one of:
DEBUG (settable) 0 - no debugging 1 - all Rexx variables set by RexxDW are displayed as they are set 2 - all RexxDW Functions are traced on entry with argument values and on exit with the return value 4 - all internal RexxDW Functions are traced with their arguments (really only useful for developers) The values can be added together for a combination of the above details. DEBUGFILE (settable) Where any debugging output is written. By default this goes to the system's error stream; usually 'stderr'. CONSTANTPREFIX (settable) The variable name prefix for all RexxDW Constants. By default this is '!REXXDW.!'. If you change this, it is useful to make the prefix result in stemmed variables; this makes it far easier to EXPOSE these Constants. VERSION (readonly) The full version details of RexxDW in the format: package version version_date Where: package - the string 'rexxdw' version - package version in n.n format; eg 1.0 version_date - date package was released in DATE('N') format
SOURCE
... Say 'We are running at debug level:' DW_variable( 'DEBUG' )
NAME
DW_QueryAllFunctions
SYNOPSIS
rcode = DW_QueryAllFunctions([ResultArray])
FUNCTION
Returns an array of all Functions supplied by this package
ARGUMENTS
RESULT
0 if successful
SEE ALSO
NOTES
If no ResultArray argument supplied, the stem in which the results will be placed is: DW_QueryAllFunctions.
NAME
DW_QueryRegisteredFunctions
SYNOPSIS
rcode = DW_QueryRegisteredFunctions([ResultArray])
FUNCTION
Returns an array of all Functions supplied by this package that have been registered.
ARGUMENTS
RESULT
0 if successful
SEE ALSO
NOTES
If no ResultArray argument supplied, the stem in which the results will be placed is: DW_QueryRegisteredFunctions.