Copyright © 2008, 2009 Arndt Roger Schneider
»useToken« activates the glyph vector graphics system implemented in the toolbar. If »useToken« is set to »1« (true), then the item property »iconFont« is evaluated and the provided image substituted through the glyph given by the property: »token«.
The item properties »bgImage« and »image« are recessive to »token«, whenever »useToken« is set.
»useGrid« tells the toolbar to place each item aligned on a grid defined by »gridSize«.
»gridSize« expects a distance denoting the size of a cell. An item may occupy one or more of such cells.
»gridSize« is used in a fuzzy-like way. If the dimensions of neighboring items are small in compared to the actual item, then the actual item may share some space from its neighbors. The same applies if the actual item is small compare to the neighboring items –it does yield some space to them.
»showImage«, a boolean property, tells the toolbar to display images.
»image« may be »fgImage«, »image« or »token« and »iconFont« or »vector«.
»showText«, a boolean property, tells the toolbar to display the »label« of all its items.
This option must have a proper boolean value, which specifies whether or not the window should include a tear-off entry at the left. The default windows bindings arrange for the window to be torn off when the tear-off entry is invoked.
If this option has a non-empty value, then it specifies a Tcl command to invoke whenever the window is torn off.
The conventional Runtime Library template mechanism is used for the »tearoff« functionality. That is A torn-off toolbar is converted into a floating window and replaces the original –embedded– window.
Under Construction.
Toolbar items may be visible or invisible. This setting is controlled via the »show« property. Suppose there are four items inside the toolbar named »a«, »b«, »c« and »d« in this situation all items will be initial visible –right after they were added to the toolbar, unless »show« was specified prior to the add commands.
Example A.7. Implicit Visible Items
# Create the toolbar without specifying # show makes all added items visible. .toolbar add command a … .toolbar add command b … .toolbar add command c … .toolbar add command d …
Example A.8. Explicit Visible Items
# Example hide d – and add variable space (~) .toolbar configure -show {a b ~ c}
In addition, line break can be controlled by defining »columnbreak« for an item.
A toolbar customization function.
The »customizeCommand« will be accessible from the toolbar context menu.
Use the »customizeCommand« in order to invoke the Gooleditor for this toolbar.
The »vectorSize« is reported to the canvas graphics based vectors.
It is OK to ignore the size parameter, when creating a vector.
Always use resolution independent values like »24p« –24 points. 24p is the »vectorSize« default value.