Tornado API Reference : GUI Tcl Library (UNIX)

tclMotifDialog

NAME

tclMotifDialog - Tcl dialog processing for Motif

TCL PROCEDURES

dialogCreate - create a new Tcl dialog
dialogPost - post a dialog
dialogDestroy - destroy a dialog
dialogUnpost - remove a dialog from the display
dialogSetValue - set the value of a dialog item
dialogSetValues - set the values of all items in a dialog
dialogGetValue - query the value of a dialog item
dialogGetValues - query the values of all dialog items
dialogListSelect - select an item in a dialog's list
dialogListDeselect - deselect an item in a dialog's list
dialogTitleSet - set the title of a dialog window

DESCRIPTION

This library allows to manipulate the Motif dialog facilities from the Tcl UNIX GUI

SEE ALSO

tclMotifDialog


GUI Tcl Library (UNIX) : Tcl Procedures

dialogCreate

NAME

dialogCreate - create a new Tcl dialog

LOCALE

UNIX GUI

SYNOPSIS

dialogCreate name [-size w h] {itemlist}

DESCRIPTION

This command creates a new dialog. A dialog is a collection of widgets, including pushbuttons, lists, and text entry fields, that may be arranged on a panel and then posted and manipulated with related Tcl commands. The supplied name is used as a parameter to all related dialog commands; if a dialog is created with the same name as an existing one, the old dialog is destroyed. If -size is specified, the dialog has the given dimensions. Itemlist is a list of dialog items. Each entry in the itemlist is itself a list.

DIALOG ITEMS

The syntax of a dialog item in the itemlist is:

dialogItem:   { itemType itemName itemPosition... [callback] }
itemType:     text | multitext | list | label | boolean | button | hsep |
              vsep
itemPosition: locSpec sizeSpec attachSpec...
locSpec:      [-x x] [-y y]
sizeSpec:     [-width width] [-height height]
attachSpec:   [sideSpec target[offset]]
sideSpec:     -left | -right | -top | -bottom
target:       . | @ | itemName | percentage
offset:       +pixels

ITEM TYPE

Most items have labels. When they do, the label text is equal to the itemName. A text item is a one-line text field. A multitext is a multiple line text editing area. A list is a list of text items, which can be selected one at a time. A label is simply a static string that can be used to label other elements of a dialog. A boolean is a pushbutton that can be clicked on or off, also known as a checkbox. A button is a simple pushbutton. An hsep is a horizontal separator bar, and a vsep is a vertical separator bar.

ITEM POSITION

Each item can be given several layout attributes to place it in the dialog, either absolutely or in relation to other dialog items.

Location
An item may be given an absolute position with the -x and -y specifications, where the origin is the upper left hand corner of the dialog.

Size
Each item can be given a size in pixels with the -width and -height specifications.

Attachment
Each side of the dialog can be given an attachment relative to another element in the dialog with the -left, -right, -top and -bottom specifications. The attachment can be to a relative position in the dialog by specifying a number between 0 and 100, which is interpreted as a percentage. If the dialog is grown or shrunk by the user, items with these relative attachments grow or shrink proportionately. If an item has no horizontal (-left or -right) attachment, it is attached to the left side of the form. If it has no vertical attachment (-top or -bottom), it is attached to the bottom of the previous item, or failing that, the top of the form.

Targets
An item side may also be attached to the corresponding boundary of the form by specifying . as the attachment. An item may be attached to the near side of another item, either by specifying the target item's name or using the @ shortcut character which represents the previous item. An attachment made in this way must refer to a previous item in the dialog item list. For any of these side attachments, a fixed offset in pixels may be added by appending a + and a pixel count to the attachment target.

ITEM CALLBACK

* Each item may have a callback specified, which can be any Tcl expression. For text items, the callback is invoked when the RETURN key is pressed in the field or when the mouse focus leaves the dialog. For button items, the callback is invoked when the button is pressed. For list items, the callback is invoked when a list item is selected. If a callback is applied to other items, it is never invoked. Callbacks are invoked literally with no arguments.

SEE ALSO

tclMotifDialog, dialogPost, dialogSetValues, dialogDestroy


GUI Tcl Library (UNIX) : Tcl Procedures

dialogPost

NAME

dialogPost - post a dialog

LOCALE

UNIX GUI

SYNOPSIS

dialogPost name [textFocusLossFlag]

DESCRIPTION

The named dialog is posted on the display. It is not an error to try to post a nonexistent dialog. The textFocusLossFlag option can be used to disable any callbacks on loss of focus in text entries (the default enables such callbacks).

SEE ALSO

tclMotifDialog, dialogUnpost, dialogCreate


GUI Tcl Library (UNIX) : Tcl Procedures

dialogDestroy

NAME

dialogDestroy - destroy a dialog

LOCALE

UNIX GUI

SYNOPSIS

dialogDestroy name

DESCRIPTION

The named dialog is destroyed. It is removed from the screen if it is visible. It is not an error to attempt to destroy a nonexistent dialog.

SEE ALSO

tclMotifDialog, dialogCreate, dialogPost, dialogUnpost


GUI Tcl Library (UNIX) : Tcl Procedures

dialogUnpost

NAME

dialogUnpost - remove a dialog from the display

LOCALE

UNIX GUI

SYNOPSIS

dialogUnpost name

DESCRIPTION

If visible, the named dialog is removed from the screen.

SEE ALSO

tclMotifDialog, dialogPost, dialogCreate


GUI Tcl Library (UNIX) : Tcl Procedures

dialogSetValue

NAME

dialogSetValue - set the value of a dialog item

LOCALE

UNIX GUI

SYNOPSIS

dialogSetValue name item1 value1 item2 value2... 

DESCRIPTION

Within the dialog name, the values of the items named by item1, item2... are replaced by the specified values. For text and multitext items, the values are strings which occupy the items. For boolean items, the values are 0 or 1 and are used to set the state of the toggle button. For list objects, the values are lists of strings to populate the list.

SEE ALSO

tclMotifDialog, dialogSetValues, dialogGetValue, dialogCreate


GUI Tcl Library (UNIX) : Tcl Procedures

dialogSetValues

NAME

dialogSetValues - set the values of all items in a dialog

LOCALE

UNIX GUI

SYNOPSIS

dialogSetValues name value...

DESCRIPTION

For each item in the named dialog that can receive a value, a value is removed from the argument list and installed in the item. The order of dialog items is the same as that of the item list when the dialog was created. Items (such as buttons) that do not take values are skipped. If there are more items that take value parameters than there are parameters in the dialog, the later items are undisturbed. If there are more value parameters than items that take values, the excess values are ignored.

SEE ALSO

tclMotifDialog, dialogSetValue, dialogGetValue, dialogCreate


GUI Tcl Library (UNIX) : Tcl Procedures

dialogGetValue

NAME

dialogGetValue - query the value of a dialog item

LOCALE

UNIX GUI

SYNOPSIS

dialogGetValue name [-enum] item...

DESCRIPTION

This command gets the value of the named item from the named dialog. For text and multitext items, this is the string contained in the text areas. For boolean items, it is 1 if the toggle is depressed, 0 otherwise. For lists, it is the item selected or {} if there is no list selection, unless -enum is specified, in which case all the list entries is reported in Tcl list form.

SEE ALSO

tclMotifDialog, dialogSetValue, dialogGetValues, dialogCreate


GUI Tcl Library (UNIX) : Tcl Procedures

dialogGetValues

NAME

dialogGetValues - query the values of all dialog items

LOCALE

UNIX GUI

SYNOPSIS

dialogGetValues name 

DESCRIPTION

This command returns a list of item values for all items in the named dialog that possess values. The order of the value list is the same as the order of the item list specified when the dialog was created.

SEE ALSO

tclMotifDialog, dialogGetValue, dialogSetValue, dialogCreate


GUI Tcl Library (UNIX) : Tcl Procedures

dialogListSelect

NAME

dialogListSelect - select an item in a dialog's list

LOCALE

UNIX GUI

SYNOPSIS

dialogListSelect name [-bottom] item string

DESCRIPTION

Within the named dialog and named item (which must be a list item), the supplied string is selected in the list, if it exists. The item thus selected is made visible by moving it to the top of the list (or to the bottom if -bottom is specified).

SEE ALSO

tclMotifDialog, dialogListDeselect, dialogGetValue, dialogSetValue, dialogCreate


GUI Tcl Library (UNIX) : Tcl Procedures

dialogListDeselect

NAME

dialogListDeselect - deselect an item in a dialog's list

LOCALE

UNIX GUI

SYNOPSIS

dialogListDeselect name [-bottom | -top] item string

DESCRIPTION

Within the named dialog and named item (which must be a list item), the supplied string is deselected in the list, if it exists. The item thus deselected is made visible by moving it to the top or the bottom of the list if -top or -bottom is specified.

SEE ALSO

tclMotifDialog, dialogListSelect, dialogGetValue, dialogSetValue, dialogCreate


GUI Tcl Library (UNIX) : Tcl Procedures

dialogTitleSet

NAME

dialogTitleSet - set the title of a dialog window

LOCALE

UNIX GUI

SYNOPSIS

dialogTitleSet name title

DESCRIPTION

The titlebar text of the named chart is set to title.

SEE ALSO

tclMotifDialog, dialogCreate, dialogPost