tekUI Reference manual


Frame (v2.12)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame

OVERVIEW

Implements inner and outer borders and the element's inner padding.

ATTRIBUTES
  • Border [IG] (table)

    An array of four thicknesses (in pixels) for the element's outer border, in the order left, right, top, bottom. If unspecified during initialization, the class' default outer border thicknesses are used.

  • BorderRegion [G] (Region)

    Region object holding the outline of the element's outer border

  • BorderClass [G] (Class)

    Border class used for the element's outer border, loaded from the directory tek/ui/border.

  • BorderStyle [IG] (string)

    Name of a style used for an element's outer border, which corresponds to the name of a border class (e.g. "recess"), used to create the element's border during initialization. If unspecified, the class' default outer border style is used.

  • IBorder [IG] (table)

    An array of four thicknesses in pixels for the element's inner border, in the order left, right, top, bottom. If unspecified during initialization, the class' default inner border thicknesses are used.

  • IBorderClass [G] (Class)

    Class used for the element's inner border, loaded from the directory tek/ui/border.

  • IBorderStyle [IG] (string)

    Name of a style used for an element's inner border, which corresponds to the name of a border class (e.g. "button"), used to create the element's border during initialization. If unspecified, the class' default inner border style is used.

  • Padding [IG] (table)

    An array of four offsets for the element's inner padding in the order left, right, top, bottom [pixels]. If unspecified during initialization, the class' default paddings are used.

IMPLEMENTS

border = Frame:getBorder()

Returns an element's table of outer border strengths [pixels] in the order left, top, right, bottom.


iborder = Frame:getIBorder()

Returns an element's table of inner border strengths [pixels] in the order left, top, right, bottom.


Frame:drawBorder()

This function draws the element's outer border.


Frame:onFocus(focused)

This method is invoked when the element's Focus attribute has changed (see also Area).


DirList (v3.2)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Group / DirList

OVERVIEW

This class implements a directory lister.

ATTRIBUTES
  • Path [IG] (string)

    Directory in the file system

  • Location [IG] (string)

    The entry currently selected, may be a file or directory

  • Selection [G] (table)

    An array of selected entries

  • Status [G] (string)

    Status of the lister:

    • "running" - the lister is currently being shown
    • "selected" - the user has selected one or more entries
    • "cancelled" - the lister has been cancelled by the user
  • Style [IG] (string)

    The visual appearance or purpose of the lister, which will determine the arrangement of some interface elements:

    • "requester" - for being used as a standalone file requester
    • "lister" - for being used as a lister component
    • "simple" - without accompanying user interface elements
  • SelectMode [IG] (String)

    Mode of selection:

    • "single" - allows selections of one entry at a time
    • "multi" - allows selections of multiple entries
IMPLEMENTS
OVERRIDES

DirList:abortScan()

This function aborts the coroutine which is currently scanning the directory. The caller of this function must be running in its own coroutine.


DirList:showDirectory(path)

Starts reading and displays the specified directory.


DirList:goParent()

Starts reading and displays the parent directory of the current directory.


Application (v2.7)

LINEAGE

ClassOverview : Class / Family / Application

OVERVIEW

This class implements the framework's entrypoint and main loop.

MEMBERS
  • Author [IG]

    Name of the application's author

  • Copyright [IG]

    Copyright notice applying to the application

  • ProgramName [IG]

    Name of the application

  • Status [G]

    Status of the application, can be: "connected", "connecting", "disconnected", "disconnecting", "initializing", "error", "running"

  • Theme [IG]

    Optional custom theme object; if unspecified, a default theme will be created

  • Title [IG]

    Title of the application, which will be inherited by windows; if unspecified, ProgramName will be used

IMPLEMENTS

Application:connect(parent)

Checks member linkage and connects all children by invoking their connect() methods. Note that unlike Element:connect(), this function is recursive.


element = Application:getElementById()

Returns the element that was registered with the Application under its unique Id. Returns nil if the Id was not found.


success, status = Application:run()

Runs the application. Returns when all child windows are closed or when the application's Status is set to "quit".


Application:addCoroutine(function, arg1, ...)

Adds a new coroutine to the application's list of serviced coroutines. The new coroutine is not immediately started, but at a later time during the application's update procedure. This gives the application an opportunity to service all pending messages and updates before the coroutine is actually started.


Application:suspend()

Suspends the caller (which must be running in a coroutine previously registered using Application:addCoroutine()) until it is getting rescheduled by the application. This gives the application an opportunity to service all pending messages and updates before the coroutine is continued.


status[, path, selection] = Application:requestFile(args)

Requests a single or multiple files or directories. Possible keys in the args table are:

  • Path - The initial path
  • Title - Window title [default "Select file or directory..."]
  • SelectMode - "multi" or "single" [default "single"]

The first return value is a string reading either "selected" or "cancelled". If the status is "selected", the second return value is the path where the requester was left, and the third value is a table of the items that were selected. Note: The caller of this function must be running in a coroutine (see Application:addCoroutine()).


PopList (v3.0)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Text / PopItem / PopList

OVERVIEW

This class is a specialization of a PopItem allowing the user to choose an item from a list.

ATTRIBUTES
  • ListObject [IG] (List)

    List object

  • SelectedEntry [ISG] (number)

    Number of the selected entry, or 0 if none is selected. Changing this attribute invokes the PopList:onSelectEntry() method.

IMPLEMENTS

PopList:onSelectEntry(line)

This method is invoked when the SelectedEntry attribute is set.


CheckMark (v2.17)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Text / CheckMark

OVERVIEW

Specialization of a Text for placing checkmarks.

Family (v2.3)

LINEAGE

ClassOverview : Class / Object / Family

OVERVIEW

This class implements a container for child object.

ATTRIBUTES
  • Children [IG] (table)

    Array of child objects

success = addMember(child[, pos])

Invokes the specified child's connect() method to check for its ability to integrate into the family, and if successful, inserts it into the family's list of children. Optionally, the child is inserted into the list at the specified position.


success = remMember(child)

Looks up child in the family's list of children, and if it can be found, invokes its disconnect() method and removes it from the list.


ListView (v4.3)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Group / ListView

OVERVIEW

This class implements a Group containing a ScrollGroup and optionally a group of column headers; its main purpose is to automate the somewhat complicated setup of multi-column lists with headers, but it can be used for single-column lists and lists without column headers as well.

ATTRIBUTES
  • Headers [I] (table)

    An array of strings containing the captions of column headers. [Default: unspecified]

  • HSliderMode [I] (string)

    This attribute is passed on the ScrollGroup - see there.

  • VSliderMode [I] (string)

    This attribute is passed on the ScrollGroup - see there.


Display (v6.0)

LINEAGE

ClassOverview : Class / Object / Display

OVERVIEW

This class manages a display device.

ATTRIBUTES
  • Theme [IG] (Theme)

    Theme object; if none is supplied during initialization, one is created.

IMPLEMENTS
OVERRIDES

width, height = Display:getTextSize(font, text)

Returns the width and height of the specified text when it is rendered with the given font.


font = Display:openFont(fontname)

Opens the named font. For a discussion of the fontname format, see Text.


Display:closeFont(font)

Closes the specified font


Display:getFontAttrs(font)

Returns the font attributes height, underline position and underline thickness.


PageGroup (v5.2)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Group / PageGroup

OVERVIEW

Implements a group whose children are layouted in individual pages.

ATTRIBUTES
  • PageCaptions [IG] (table)

    An array of strings containing captions for each page in the group.

  • PageNumber [IG] (number)

    Number of the page that is initally selected. [Default: 1]

Border (v3.0)

LINEAGE

ClassOverview : Class / Object / Border

OVERVIEW

This is the base class of all border classes. Border classes are located in the directory tek/ui/border.

IMPLEMENTS

Border.loadClass(stylename)

This function tries to load the named border class; if the class cannot be found, returns the base class.


left, right, top, bottom = Border:getBorder(element[, borders])

If specified, unpacks and returns the table borders, otherwise returns the class' default border thicknesses (with possible style variations for the given element) in the order left, right, top, bottom.


Border:draw(element, bordertab, x0, y0, x1, y1)

Draws the specified table of border thicknesses into the given rectangle, with possible style variations for the given element.


region = Border:getRegion(element, bordertab, x0, y0, x1, y1)

Returns a Region representing the outline of the specified border thicknesses for the given rectangle, with possible style variations for the given element.


FloatText (v3.3)

LINEAGE

ClassOverview : Class / Object / Element / Area / FloatText

OVERVIEW

Implements a scrollable text display. This class is normally the direct child of a Canvas

ATTRIBUTES
  • BGPen [IG]

    Pen for filling the background

  • FGPen [IG]

    Pen for rendering the text

  • FontSpec [IG]

    Font specifier; see Text for a format description

  • Text [ISG]]

    The text to be displayed

IMPLEMENTS

onSetText(text)

Handler called when a new Text is set.


PopupWindow (v1.4)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Group / Window / PopupWindow

OVERVIEW

This class specializes a Window for the use by a PopItem.

MenuItem (v3.2)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Text / PopItem / MenuItem

OVERVIEW

This class implements the basic items for window menus and popups. In particular, it displays a PopItem's Shortcut attribute and an arrow to indicate that there is a sub menu.

Drawable (v8.0)

LINEAGE

ClassOverview : Class / Object / Drawable

OVERVIEW

This class implements a graphical context which can be painted on.

IMPLEMENTS
OVERRIDES

Drawable:fillRect(x0, y0, x1, y1, pen)

Draws a filled rectangle.


Drawable:drawRect(x0, y0, x1, y1, pen)

Draws an unfilled rectangle.


Drawable:drawText(x0, y0, text, fgpen[, bgpen])

Renders text with the specified foreground pen. If the optional background pen is specified, the background under the text is filled in this color.


Drawable:drawLine(x0, y0, x1, y1, pen)

Draws a line using the specified pen.


Drawable:setFont(font)

Sets the specified font.


width, height = Drawable:getTextSize(text)

Determines the width and height of a text using the font which is currently set on the Drawable.


msg = Drawable:getMsg([msg])

Gets the next pending message from the Drawable. Optionally, the fields of the new message are inserted into the specified table.


Drawable:pushClipRect(x0, y0, x1, y1)

Pushes a new cliprect on the top of the drawable's stack of cliprects.


Drawable:popClipRect()

Pop the topmost cliprect from the Drawable.


Drawable:setShift(deltax, deltay)

Add a delta to the Drawable's coordinate displacement.


shiftx, shifty = Drawable:getShift()

Get the Drawable's current coordinate displacement.


Drawable:copyArea(x0, y0, x1, y1, deltax, deltay, exposures)

Copy the specified rectangle to the position determined by the relative coordinates deltax and deltay. The exposures argument is a table used for collecting the raw coordinates of rectangles which got exposed as a result of the copy operation.


Text (v11.2)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Text

OVERVIEW

This gadget implements text rendering.

ATTRIBUTES
  • FGPen [IG] (userdata)

    A colored pen for rendering the foreground of the element

  • FontSpec [IG] (string)

    A font specification in the form

    "[fontname1,fontname2,...][:][size]"
    

    Font names, if specified, will be probed in the order of their occurence in the string; the first font that can be opened will be used. For the font names, the following placeholders with predefined meanings are supported:

    • "__fixed": The default fixed font
    • "__main": The default main font, e.g. for buttons and menus
    • "__small": The default small font, e.g. for group captions
    • "__large": The default 'large' font
    • "__huge": The default 'huge' font

    If no font name is specified, the main font will be assumed. The size specification (in pixels) is optional as well, if absent, the respective font's default size will be used.

  • KeepMinHeight [IG] (boolean)

    After the initial size calculation, keep the minimal height of the element and do not rethink the layout in regard to a possible new minimal height (e.g. resulting from a newly set text).

  • KeepMinWidth [IG] (boolean)

    After the initial size calculation, keep the minimal width of the element and do not rethink the layout in regard to a possible new minimal width (e.g. resulting from a newly set text).

  • ShortcutMark [IG] (string)

    The initiatory character for keyboard shortcuts in the Text, used during initial text setup. The first character following the marker will be used as the gadget's KeyCode attribute (see also Gadget). By setting this attribute to false, the text is left unmodified and no attempts are made for extracting a keyboard shortcut. [Default: "_"]

  • Text [ISG] (string)

    The text that will be displayed on the element; it may span multiple lines (see also Text:makeTextRecords()). Setting this attribute invokes the Text:onSetText() method.

  • TextHAlign [IG] ("left", "center", "right")

    The text's horizontal alignment, which will be used in Text:makeTextRecords(). If false during initialization, the class' default will be used. [Default: "center"]

  • TextVAlign [IG] ("top", "center", "bottom")

    The text's vertical alignment, which will be used in Text:makeTextRecords(). If false during initialization, the class' default will be used. [Default: "center"]

IMPLEMENTS

width, height = getTextSize([textrecord])

This function calculates the total space occupied by the object's text records. Optionally, the user can pass a table of text records which are to be evaluated.


makeTextRecords(text)

This function parses a string and breaks it along the encountered newline characters into single-line records. Each record has the form

{ [1]=text, [2]=font, [3]=align-horizontal, [4]=align-vertical,
  [5]=margin-left, [6]=margin-right, [7]=margin-top,
  [8]=margin-bottom, [9]=font-height, [10]=text-width }

More undocumented fields may follow at higher indices. font is taken from opening the font specified in the object's FontSpec attribute, which also determines font-height and is used for calculating the text-width (in pixels). The alignment parameters are taken from the object's TextHAlign and TextVAlign attributes, respectively.


onSetText(text)

This handler is invoked when the element's Text attribute has changed.


Handle (v3.1)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Handle

OVERVIEW

Implements a handle to drag around in the group, thus reassigning widths (or heights) to its neighbours elements.

Slider (v6.7)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Numeric / Slider

OVERVIEW

This class implements a slider for adjusting a numerical value.

ATTRIBUTES
  • Child [IG] (Gadget)

    A gadget for being used as the slider's knob. By default, an internal knob gadget is used.

  • ForceInteger [IG] (boolean)

    If true, integer steps are enforced. By default, the slider moves continuously.

  • Orientation [IG] (string)

    Orientation of the slider, which can be "horizontal" or "vertical". [Default: "horizontal"]

  • Range [ISG] (number)

    The range of the slider, i.e. the size it represents. Setting this value invokes the Slider:onSetRange() method.

  • Style [IG] (string)

    Style of the slider:

    • "scrollbar" - for scrollbars
    • "number" - for adjusting numbers
    • "normal" - unspecified

    Default: "normal"

Slider:onSetRange(range)

This handler is invoked when the Slider's Range attribute has changed.


Numeric (v1.3)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Numeric

OVERVIEW

This class implements the management of numerical values. Without further specialization it has hardly any real-life use and may be considered an abstract class. See also Gauge and Slider for some of its child classes.

ATTRIBUTES
  • Default [IG] (number)

    The default for Value, which can be revoked using the Numeric:reset() method.

  • Max [ISG] (number)

    Maximum acceptable Value. Setting this value invokes the Numeric:onSetMax() method.

  • Min [ISG] (number)

    Minimum acceptable Value. Setting this value invokes the Numeric:onSetMin() method.

  • Step [ISG] (number)

    Default step value [Default: 1]

  • Value [ISG] (number)

    The current value represented by this class. Setting this value causes the Numeric:onSetValue() method to be invoked.

IMPLEMENTS

Numeric:increase([delta])

Increase Value by the specified delta. If delta is omitted, the Step attribute is used in its place.


Numeric:decrease([delta])

Decrease Value by the specified delta. If delta is omitted, the Step attribute is used in its place.


Numeric:reset()

Reset Value to is Default value.


onSetValue(val)

This handler is invoked when the Numeric's Value attribute has changed.


onSetMin(min)

This handler is invoked when the Numeric's Min attribute has changed.


onSetMax(max)

This handler is invoked when the Numeric's Max attribute has changed.


Area (v10.0)

LINEAGE

ClassOverview : Class / Object / Element / Area

OVERVIEW

This class implements an outer margin, layouting and drawing.

ATTRIBUTES
  • BGPen [G] (userdata)

    A colored pen for painting the background of the element

  • DamageRegion [G] (Region)

    see TrackDamage

  • Disabled [ISG] (boolean)

    If true, the element is in disabled state. This attribute is not handled by Area; see Gadget

  • Focus [ISG] (boolean)

    If true, the element has the input focus. This attribute is not handled by Area; see Frame

  • HAlign [IG] ("left", "center", "right")

    Horizontal alignment of the element in its group [default: "left"]

  • Height [IG] (number, false, or "auto", "fill", "free")

    Height of the element, in pixels, or

    • false - unspecified; during initialization, the class' default will be used
    • "auto" - Reserves the minimal height needed for the element.
    • "free" - Allows the element's height to grow to any size.
    • "fill" - Completely fills up the height that other elements in the same group have left, but does not claim more.

    Note: Normally, "fill" is useful only once per group.

  • Hilite [ISG] (boolean)

    If true, the element is in highlighted state. This attribute is not handled by Area; see Gadget

  • Margin [IG] (table)

    An array of four offsets for the element's outer margin in the order left, right, top, bottom [pixels]. If unspecified during initialization, the class' default margins are used.

  • MaxHeight [IG] (number)

    Maximum height of the element, in pixels [default: ui.HUGE]

  • MaxWidth [IG] (number)

    Maximum width of the element, in pixels [default: ui.HUGE]

  • MinHeight [IG] (number)

    Minimum height of the element, in pixels [default: 0]

  • MinWidth [IG] (number)

    Minimum width of the element, in pixels [default: 0]

  • Selected [ISG] (boolean)

    If true, the element is in selected state. This attribute is not handled by Area; see Gadget

  • TrackDamage [IG] (boolean)

    If true, the element gathers intra-area damages in a Region named DamageRegion, which can be used by class writers for implementing minimally invasive redrawing. [Default: false, the element is redrawn in its entirety.)

  • VAlign [IG] ("top", "center", "bottom")

    Vertical alignment of the element in its group [default: "top"]

  • Weight [ISG] (number)

    Determines the weight that is attributed to the element, relative to its siblings in its group. Invokes the Area:onSetWeight() method. Area:onSetWeight() recalculates all weights in the group and possibly causes relayouting and redrawing it. Note: By recommendation, the weights set in a group should sum up to 0x10000.

  • Width [IG] (number, false, or "auto", "fill", "free")

    Width of the element, in pixels, or

    • false - unspecified; during initialization, the class' default will be used
    • "auto" - Reserves the minimal width needed for the element.
    • "free" - Allows the element's width to grow to any size.
    • "fill" - Completely fills up the width that other elements in the same group have left, but does not claim more.

    Note: Normally, "fill" is useful only once per group.

IMPLEMENTS

success = Area:show(display, drawable)

Passes an element the Display and Drawable it will be rendered to. Returns a boolean indicating success. If you override this method, pass the call to your super class and check and propagate its return value. See also: Area:hide().


Area:hide()

Removes the display and drawable from an element. Override this method to free all display-related resources previously allocated in Area:show().


Area:rethinkLayout([damage])

This method causes a relayout of the element and possibly the Group in which it resides. The optional numeric argument damage indicates the kind of damage to apply to the element:

  • 0 - do not mark the element as damaged
  • 1 - slate the group (not its contents) for repaint [default]
  • 2 - mark the whole group and its contents as damaged

onSetWeight(weight)

Sets the weight of the element relative to the group in which it resides, and causes a relayout of this group.


minw, minh, maxw, maxh = Area:askMinMax(minw, minh, maxw, maxh)

This method is called during the layouting process for adding the required spatial extents (width and height) of this class to the min/max values passed from a child class, before passing them on to its super class. minw, minh are cumulative of the minimal size of the element, while maxw, maxw collect the size the element is allowed to expand to. Use ui.HUGE to indicate a 'huge' spatial extent.


changed = Area:layout(x0, y0, x1, y1[, markdamage])

Layouts the element into the specified rectangle. If the element's (or any of its childrens') coordinates change, returns true and marks the element as damaged, unless the optional argument markdamage is set to false.


found[, changed] = Area:relayout(element, x0, y0, x1, y1) [internal]

Searches for the specified element, and if this class (or the class of one of its children) is responsible for it, layouts it to the specified rectangle. Returns true if the element was found and its layout updated. A secondary return value of true indicates whether relayouting actually caused a change, i.e. a damage to the object.


Area:punch(region) [internal]

Subtracts the element from (punching a hole into) the specified Region. This function is called by the layouter.


Area:markDamage(x0, y0, x1, y1)

If the element overlaps with the given rectangle, this function marks it as damaged.


Area:draw()

Draws the element into the rectangle assigned to it by the layouter; the coordinates can be found in the element's Rect table. Note: Applications are not allowed to call this function directly.


Area:refresh() [internal]

Redraws the element (and all possible children) if they are marked as damaged. Note: This function is called inside the Window class; applications and classes are not allowed to call it themselves.


self = Area:getElementByXY(x, y)

Returns self if the element covers the specified coordinate.


msg = Area:passMsg(msg)

This function filters the specified input message. After processing, it is free to return the message unmodified (thus passing it on to the next message handler), to return a copy that has certain fields in the message modified, or to 'swallow' the message by returning false. If you override this function, you are not allowed to modify any data inside the original message; to alter a message, you must operate on and return a copy.


Area:setState(bg)

Sets the Background attribute according to the state of the element, and if it changed, slates the element for repainting.


can_receive = Area:checkFocus()

Returns true if this element can receive the input focus. (As an Area is non-interactive, the return value of this class' implementation is always false.)


element = Area:getElement(mode)

Returns an element's neighbours. This function can be overridden to control a class-specific tab cycle behavior. Possible values for mode are:

  • "parent" - returns the elements' parent element.
  • "children" - returns a table containing the element's children, or nil if the element has no children.
  • "siblings" - returns a table containing the element's siblings (including the element itself), or a table containing only the element, if it is not member of a group.
  • "next" - returns the next element in the group, or nil if the element has no successors.
  • "prev" - returns the previous element in the group, or nil if the element has no predecessors.
  • "nextorparent" - returns the next element in a group, or, if the element has no successor, the next element in the parent group (and so forth, until it reaches the topmost group).
  • "prevorparent" - returns the previous element in a group, or, if the element has no predecessor, the next element in the parent group (and so forth, until it reaches the topmost group).
  • "firstchild" - returns the element's first child, or nil if the element has no children.
  • "lastchild" - returns the element's last child, or nil if the element has no children.

Note: Tables returned by this function must be considered read-only.


Gadget (v9.4)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget

OVERVIEW

This class implements interactivity.

ATTRIBUTES
  • Active [SG] (boolean)

    Signifies a change of the Gadget's activation state. While active, the position of the mouse pointer is being verified (which is also reflected by the Hover attribute). When the Active state changes, the Gadget's behavior depends on its Mode attribute:

    • in "button" mode, the Selected attribute is set to the value of the Hover attribute. The Pressed attribute is set to the value of the Active attribute, if it caused a change of the Selected state.
    • in "toggle" mode, the Selected attribute of the Gadget is logically toggled, and the Pressed attribute is set to true.
    • in "touch" mode, the Selected and Pressed attributes are set to true, if the Gadget wasn't selected already.

    Changing this attribute invokes the Gadget:onActivate() method.

  • DblClick [SG] (boolean)

    Signifies that the element was doubleclicked; is is set to true when the element was doubleclicked and is still being held, and false when it was doubleclicked and then released. This attribute usually needs to get a notification handler attached to it before it is useful.

  • Disabled [ISG] (boolean)

    Signifies a change of the Gadget's ability to interact with the user. Invokes the Gadget:onDisable() method. When an element is getting disabled, it loses its focus, too.

  • Hilite [SG] (boolean)

    Signifies a change of the Gadget's highligting state. Invokes Gadget:onHilite().

  • Hold [SG] (boolean)

    Signifies that the element is being held. Invokes Gadget:onHold().

  • Hover [SG] (boolean)

    Signifies a change of the Gadget being hovered by the pointing device. Invokes Gadget:onHover().

  • KeyCode [IG] (string)

    If set, the keyboard equivalent that can be used to activate the element while it is shown [default: false]. See also PopItem for a discussion of denoting qualifiers, which applies to the KeyCode attribute as well.

  • Mode [IG] (string)

    Interaction mode of the Gadget; can be

    • "inert": The element does not react to input,
    • "toggle": The element does not rebound at all and keeps its Selected state; it can't be unselected by the user.
    • "touch": The element rebounds immediately and acts as a strobe, submitting always true for Pressed and Selected.
    • "button": The element sets the Pressed attribute only if the mouse pointer is released when hovering it. See also Active.
  • Pressed [SG] (boolean)

    Signifies that a button was pressed or released. Invokes Gadget:onPress().

  • Selected [ISG] (boolean)

    Signifies a change of the gadget's selection state. Invokes Gadget:onSelect().

  • Style [IG] (string)

    Visual style of the element; can be

    • "normal": The element is a normal gadget
    • "knob": The element is being used as a knob for a Slider
IMPLEMENTS

onHover(hovered)

This method is invoked when the gadget's Hover attribute has changed.


onActivate(active)

This method is invoked when the gadget's Active attribute has changed.


onDisable(disabled)

This method is invoked when the gadget's Disabled attribute has changed.


onSelect(selected)

This method is invoked when the gadget's Selected attribute has changed.


onHilite(selected)

This method is invoked when the gadget's Selected attribute has changed.


onPress(pressed)

This method is invoked when the gadget's Pressed attribute has changed.


onHold(held)

This method is invoked when the gadget's Hold attribute is set. While the gadget is being held, repeated Hold = true events are submitted in intervals of n/50 seconds determined by the Window.HoldTickInitRepeat attribute.


RadioButton (v1.5)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Text / CheckMark / RadioButton

OVERVIEW

Specialization of a CheckMark to implement mutually exclusive 'radio buttons'; they really make sense only if more than one of their kind are grouped together.

ScrollGroup (v8.4)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Group / ScrollGroup

OVERVIEW

This class implements a group containing a scrollable container and accompanying elements such as horizontal and vertical ScrollBars.

ATTRIBUTES
  • Canvas [IG] (Canvas)

    Specifies the Canvas which encapsulates the scrollable area and children.

  • HSliderMode [IG] (string)

    Specifies when the horizontal ScrollBar should be visible:

    • "on" - The horizontal scrollbar is displayed
    • "off" - The horizontal scrollbar is not displayed
    • "auto" - The horizontal scrollbar is displayed when the ListGadget is wider than the currently visible area.

    Note: The use of the "auto" mode is currently (v8.0) discouraged.

  • VSliderMode [IG] (string)

    Specifies when the vertical ScrollBar should be visible:

    • "on" - The vertical scrollbar is displayed
    • "off" - The vertical scrollbar is not displayed
    • "auto" - The vertical scrollbar is displayed when the ListGadget is taller than the currently visible area.

    Note: The use of the "auto" mode is currently (v8.0) discouraged.

PopItem (v4.1)

LINEAGE

ClassOverview : Class / Object / Element / Area / Frame / Gadget / Text / PopItem

OVERVIEW

This class provides an anchorage for popups. This also works recursively, i.e. elements of the PopItem class may contain other PopItems as their children. The most notable child class of the PopItem is the MenuItem.

ATTRIBUTES
  • Children [I] (table)

    Array of child objects - will be connected to the application while the popup is open.

  • Shortcut [IG] (string)

    Keyboard shortcut for the object; unlike Gadget.KeyCode, this shortcut is also enabled while the object is invisible. By convention, only combinations with a qualifier should be used here, e.g. "Alt+C", "Shift+Ctrl+Q". Qualifiers are separated by "+" and must precede the key. Valid qualifiers are:

    • "Alt", "LAlt", "RAlt"
    • "Shift", "LShift", "RShift"
    • "Ctrl", "LCtrl", "RCtrl"
    • "IgnoreCase"

    Alias names for keys are

    • "F1" ... "F12" (function keys),
    • "Left", "Right", "Up", "Down" (cursor keys)
    • "BckSpc", "Tab", "Esc", "Insert", "Overwrite", "PageUp", "PageDown", "Pos1", "End", "Print", "Scroll", and "Pause".