XAD objects reference



XAD provides functionality to work with the following graphical objects:

Browser

An Internet Explorer-based web browser which can display any webpage.

XAD/browser.png
Specific subroutines
XADcreatebrowser, XADbrowsergoto
Specific events
None

Button

A regular push button.

XAD/button.png
Specific subroutines
XADcreatebutton
Specific events
XAD_EVENT_PRESSED

Canvas

An intuitive surface for drawing anything using XAD.

XAD/canvas.png
Specific subroutines
XADcreatecanvas, XADcanvasdrawarc, XADcanvasdrawbox, XADcanvasdrawchord, XADcanvasdrawellipse, XADcanvasdrawimage, XADcanvasdrawline, XADcanvasdrawpie, XADcanvasdrawpoint, XADcanvasdrawpolygon, XADcanvasdrawrectangle, XADcanvasdrawtext, XADcanvaserase, XADcanvasmap, XADcanvasrefresh, XADcanvassaveimage, XADcanvasunmap
Specific events
None
Notes
Working with colors. XAD recognizes the following color constants: XAD_BLACK, XAD_BLUE, XAD_CYAN, XAD_GREEN, XAD_MAGENTA, XAD_ORANGE, XAD_RED, XAD_WHITE, XAD_YELLOW Use XADcolor to create any other color based on its red, green and blue components.

Check button

A button with two states: checked and unchecked. It is independent of any other objects.

XAD/check.png
Specific subroutines
XADcreatecheck, XADcheckgetstate, XADchecksetstate
Specific events
XAD_EVENT_PRESSED

Drop list

A sortable list of strings, numbers, etc., which can be expanded or collapsed.

XAD/droplist.png
Specific subroutines
XADcreatedroplist, XADdroplistadd, XADdroplistgetsel, XADdroplistselect, XADdroplistshow
Specific events
XAD_EVENT_SELECTION
Notes
A list object generates an XAD_EVENT_SELECTION event when the user changes the selection. In order to find out which item was selected, call the function XADgeteventtext:string.

Editor

A field for editing multi-line text.

XAD/editor.png
Specific subroutines
XADcreateeditor, XADeditoraddtext, XADeditorgettext XADeditorload, XADeditorsave, XADeditorsettext
Specific events
XAD_EVENT_CHANGED

Group

A thin frame surrounding a group of related objects.

XAD/group.png
Specific subroutines
XADcreategroup
Specific events
None

Input

A single line input field.

XAD/input.png
Specific subroutines
XADcreateinput, XADinputgettext, XADinputsettext
Specific events
XAD_EVENT_CHANGED

List

A sortable list of strings, numbers, etc.

XAD/list.png
Specific subroutines
XADcreatelist, XADlistadd, XADlistgetsel, XADlistselect, XADlistshow
Specific events
XAD_EVENT_SELECTION
Notes
A list object generates an XAD_EVENT_SELECTION event when the user changes the selection. In order to find out which item was selected, call the function XADgeteventtext:string.

List with multiple columns

A sortable list of strings, numbers, etc. which can display multidimensional data.

XAD/multilist.png
Specific subroutines
XADcreatemultilist, XADmultilistrefresh, XADmultilistsetcolname, XADmultilistsetsize, XADmultilistsettext, XADmultilistshow
Specific events
None

Progress bar

A visual progress indicator.

XAD/progress.png
Specific subroutines
XADcreateprogress, XADprogressset
Specific events
None

Radio button

A button with two states: checked and unchecked. It can be used for mutually exclusive choices.

XAD/radio.png
Specific subroutines
XADcreateradio, XADradiogetstate, XADradiosetstate
Specific events
XAD_EVENT_PRESSED

Scroll bars

A vertical or horizontal scrollbar for controlling position in a large document.

XAD/scrollbar.png
Specific subroutines
XADcreatescrollbar, XADscrollbargetpos, XADscrollbarset
Specific events
XAD_EVENT_CHANGED
Notes
A scrollbar object generates an XAD_EVENT_CHANGED event when the user interacts with it. Use XADscrollbargetpos to obtain the new position.

Tab selectors

A notebook-style object for choosing among general categories (of other objects, usually).

XAD/tab.png
Specific subroutines
XADcreatetab, XADtabgettab, XADtabsettab
Specific events
XAD_EVENT_SELECTION
Notes
A tab object generates an XAD_EVENT_SELECTION event when the user changes the selection. In order to find out which tab was selected, call the function XADgeteventtext:string or use XADtabgettab.

Text

A multiline label for displaying text information.

XAD/text.png
Specific subroutines
XADcreatetext, XADtextaddtext, XADtextgettext, XADtextsettext
Specific events
None

Tree

A hierarchical tree display.

XAD/tree.png
Specific subroutines
XADcreatetree, XADtreeadd, XADtreereset, XADtreeexpand
Specific events
XAD_EVENT_SELECTION

Window

The most important object; brings together all the other types of objects and allows interaction with the user.

XAD/window.png
Specific subroutines
XADcreatewindow, XADwindowaddmenu, XADwindowclose, XADwindowhide, XADwindowkeep, XADwindowopen, XADwindowsettimer, XADwindowshow
Specific events
XAD_EVENT_MENU, XAD_EVENT_TIMER, XAD_EVENT_WINDOW_CLOSED, XAD_EVENT_WINDOW_CLOSING, XAD_EVENT_WINDOW_HIDDEN, XAD_EVENT_WINDOW_MOVED, XAD_EVENT_WINDOW_OPENED, XAD_EVENT_WINDOW_RESIZED, XAD_EVENT_WINDOW_SHOWN

Subroutines specific to objects

XADbrowsergoto
Open the given URL in the browser.
XADcanvasdrawarc
Draw an elliptical arc on a canvas.
XADcanvasdrawbox
Draw a box on a canvas.
XADcanvasdrawchord
Draw an elliptical chord on a canvas.
XADcanvasdrawellipse
Draw an ellipse on a canvas.
XADcanvasdrawimage
Draw an image from file.
XADcanvasdrawline
Draw a line on a canvas.
XADcanvasdrawpie
Draw an elliptical pie slice on a canvas.
XADcanvasdrawpoint
Draw a point on a canvas.
XADcanvasdrawpolygon
Draw a polygon on a canvas.
XADcanvasdrawrectangle
Draw a rectangle on a canvas.
XADcanvasdrawtext
Draw text on a canvas.
XADcanvaserase
Erase a canvas.
XADcanvasmap
Map the coordinate space of a canvas.
XADcanvasrefresh
Redraw a canvas.
XADcanvassaveimage
Save an image to memory (to avoid loading a file repeatedly).
XADcanvasunmap
Revert to default mapping for a canvas.
XADcheckgetstate
Get the state of a check button.
XADchecksetstate
Set the state of a check button.
XADcolor
Create a color value.
XADcreatebrowser
Create a browser.
XADcreatebutton
Create a button object.
XADcreatecanvas
Create a canvas object.
XADcreatecheck
Create a check button.
XADcreatedroplist
Create a droplist object.
XADcreateeditor
Create an editor object.
XADcreategroup
Create a group object.
XADcreateinput
Create an input object.
XADcreatelist
Create a list object.
XADcreatemultilist
Create a multilist object.
XADcreateprogress
Create a progress bar.
XADcreateradio
Create a radio button.
XADcreatescrollbar
Create a scrollbar object.
XADcreatetab
Create a tab selector object.
XADcreatetext
Create a text object.
XADcreatetree
Create a tree object.
XADcreatewindow
Create a window
XADdroplistadd
Add an item to a droplist
XADdroplistgetsel
Get the selected item from a droplist.
XADdroplistselect
Select a droplist item
XADdroplistshow
Show a droplist.
XADeditoraddtext
Add text to an editor.
XADeditorgettext
Get the text from an editor.
XADeditorload
Load a file into an editor.
XADeditorsave
Save editor contents into a file.
XADeditorsettext
Set the text of an editor.
XADinputgettext
Get the text of an input object.
XADinputsettext
Set the text of an input object.
XADlistadd
Add an item to a list
XADlistgetsel
Get the selected item from a list.
XADlistselect
Select a list item
XADlistshow
Show a list.
XADmultilistrefresh
Update the visual display (usually after many XADmultilistsettext operations).
XADmultilistsetcolname
Set multilist column names.
XADmultilistsetsize
(Re)set the size of a multilist.
XADmultilistsettext
Set a multilist item.
XADmultilistshow
Load and display multi-dimensional arrays or a set in a multilist.
XADprogressset
Set the progress state.
XADradiogetstate
Get the state of a radio button.
XADradiosetstate
Get the state of a radio button.
XADscrollbargetpos
Obtain the current position of the scrollbar.
XADscrollbarset
Set scrollbar characteristics.
XADtabgettab
Get the current tab selection.
XADtabsettab
Select a given tab.
XADtextaddtext
Add text to a text object.
XADtextgettext
Get the text of a text object.
XADtextsettext
Set text of a text object.
XADtreeadd
Add a branch to a tree
XADtreeexpand
Expands a tree branch .
XADtreereset
Clears the content of a tree
XADwindowaddmenu
Add a dropdown menu to the window.
XADwindowclose
Close a window.
XADwindowhide
Hide a window.
XADwindowkeep
Keep a window.
XADwindowopen
Open a window.
XADwindowsettimer
(Re)set a timer.
XADwindowshow
Display a window.

Events specific to objects

XAD_EVENT_CHANGED
Input, editor or scrollbar changed event.
XAD_EVENT_MENU
Menu event.
XAD_EVENT_PRESSED
Button pressed event.
XAD_EVENT_SELECTION
Selection event.
XAD_EVENT_TIMER
Timer event.
XAD_EVENT_WINDOW_CLOSED
Window closed event.
XAD_EVENT_WINDOW_CLOSING
Window closing event.
XAD_EVENT_WINDOW_HIDDEN
Window hidden event.
XAD_EVENT_WINDOW_MOVED
Window moved event.
XAD_EVENT_WINDOW_OPENED
Window opened event.
XAD_EVENT_WINDOW_RESIZED
Window resized event.
XAD_EVENT_WINDOW_SHOWN
Window shown event.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.