Tornado API Reference : GUI Tcl Library (UNIX)

toolbar

NAME

toolbar - tool bar manager

TCL PROCEDURES

toolBarItemCreate - create a new tool bar button or update an old one
toolBarItemDelete - delete a toolbar item

DESCRIPTION

This file implements Tool bars management for Tcl UNIX GUI.

SEE ALSO

toolbar


GUI Tcl Library (UNIX) : Tcl Procedures

toolBarItemCreate

NAME

toolBarItemCreate - create a new tool bar button or update an old one

LOCALE

UNIX GUI

SYNOPSIS

toolBarItemCreate name button [binding [dragbinding [dropbinding]]]

toolBarItemCreate name space

DESCRIPTION

This function creates a new toolbar item. If the second argument is button, a button is created. If the second argument is space, space is inserted between the rightmost existing button and the next new button that is added. The button is bound to the Tcl action specified in binding, and this expression is invoked when the button is activated.

If a button with the supplied name already exists, its binding, dragbinding, and dropbinding are simply updated. If a like-named space already exists, it is left alone. Buttons and spaces cannot mutate into one another with this call.

DRAG & DROP If a button is dragged and eventually dropped, its dragbinding is invoked (if present) with two arguments: the x y coordinates within the button where the drag was originated with the pointer. The dragbinding's return value is used as the text that is dropped at the drop site. If a button is dragged from a location, but the drop is not completed, the dragbinding is not invoked.

If something is dropped on a button, its dropbinding is invoked with the content of the drag as an argument.

CUSTOMIZATION

When a button is created, a directory in the resource tree is searched to find an icon for it. The bitmap resource area is located at $WIND_BASE/resource/bitmaps/appname. The controls subdirectory is searched for a bitmap file whose name matches the name of the toolbar item. If such a file is found it is used as the icon for the button; otherwise the name of the button is placed in it.

The Xt name of the button or space widget is the same as the name supplied in the specification. This name can be used in X Resource files to change the attributes of the widget.

ERRORS

SEE ALSO

toolbar, toolBarItemDelete, menuCreate, menuButtonCreate


GUI Tcl Library (UNIX) : Tcl Procedures

toolBarItemDelete

NAME

toolBarItemDelete - delete a toolbar item

LOCALE

UNIX GUI

SYNOPSIS

toolBarItemDelete name

DESCRIPTION

This function deletes the specified tool bar item.

SEE ALSO

toolbar, toolBarItemCreate