Window-specific Options

Command-Line Name: -usetoken, Database Name: useToken, Database Class; -

»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.

Command-Line Name: -usegrid, Database Name: useGrid, Database Class; -

»useGrid« tells the toolbar to place each item aligned on a grid defined by »gridSize«.

Command-Line Name: -gridsize, Database Name: gridSize, Database Class; -

»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.

Command-Line Name: -showimage, Database Name: showImage, Database Class; -

»showImage«, a boolean property, tells the toolbar to display images.

»image« may be »fgImage«, »image« or »token« and »iconFont« or »vector«.

Command-Line Name: -showtext, Database Name: showText, Database Class; -

»showText«, a boolean property, tells the toolbar to display the »label« of all its items.

Command-Line Name: -tearoff, Database Name: tearoff, Database Class; -

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.

Command-Line Name: -tearoffcommand, Database Name: tearoffCommand, Database Class; -

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.

Command-Line Name: -show, Database Name: show, Database Class; -

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.

Command-Line Name: -title, Database Name: title, Database Class; -

The »title« property is only used for a free-floating toolbar. The text property »title« is used as the caption for the created toplevel window.

Command-Line Name: -autobreak, Database Name: autobreak, Database Class; -

A boolean property. Either 0 or 1. Default is 0 (false/off). Tells the toolbar to break the items into multiple lines.

In addition, line break can be controlled by defining »columnbreak« for an item.

Command-Line Name: -usemenu, Database Name: useMenu, Database Class; -

»useMenu« expects a boolean value. if »useMenu« is set to »1« (true) then a context menu will presented after a <<Context>> (a right-button-click) occured. Do also use »customizeCommand« together with »useMenu«.

Command-Line Name: -hidecommand, Database Name: hideCommand, Database Class; -

The »hideCommand« is used inside the toolbar context menu. The conventional response to this command is to invoke the »Hide Toolbar« menu entry in the »View« menu.

Command-Line Name: -customizecommand, Database Name: customizeCommand, Database Class; -

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.

Command-Line Name: -vectorsize, Database Name: vectorSize, Database Class; -

The »vectorSize« is reported to the canvas graphics based vectors.

In the future: Vectors, glyphs and images may become fully interactively resize-able –with a scroll-wheel. This feature requires that all vector graphics originate from TkPath.

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.

The Zoolbar already supports »vectorSize« for images.

Window Command

A Window created through the zoolbar command exposes various functions. Using these functions has the following general form:

          pathName option ?arg arg ...?

PathName is the same as the window path name. Option and the args determine the exact behavior of the command. The following commands are possible for this window:

pathName cget option

Returns the current value of the configuration option given by option. Option may have any of the values accepted by the zoolbar command.

pathName configure ?option? ?value option value ...?

Query or modify the configuration options of the window. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given window option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the zoolbar command.

pathName ungradient


pathName delete item

Removes the given »item« from the Zoolbar.

 Written     : 2007, Roger

pathName pendingMbutton width height

Related to »pendingRedraw«. Internal used, too. The suggested Mbutton is the menubutton to the right side, which provides access to the truncatedd Zoolbar items –listed inside a menu.

 Written     : 2007, Roger

pathName customizeMenu menu

Creates the context menu for the Zoolbar. The provided »menu« is emptied before new menu entries are being added to it.

 Written     : 2007, Roger

pathName itemcget name attr

Queries the item »name« for its property »attr«.

 Written     : 06/10/2008, Roger
 Example     : .zoolbar itemcget help -vector

pathName add type name ...

»add« is the item creation function inside a Zoolbar. The general mechanism is as-close-as-possible to its model: menu.

However, each item added to a Zoolbar must be »name«d.

 Written     : 2007, Roger

pathName pendingRedraw width height

Internal used. »pendingRedraw« delays the redraw operations –using after idle. »widht« and »height« are the new dimension for the Zoolbar.

 Written     : 2007, Roger

pathName postMenu menu

Displays all truncated items inside of a »menu« to the right side of the Zoolbar.

 Written     : 2007, Roger

pathName insertCounter item

Internal used. Adds »item« to the member list.

 Written     : 2007, Roger

pathName tearoff x y ...

Converts a Zoolbar into a floating window.

 Written     : 2007, Roger

pathName alternateStippleColor fillcolor


pathName active type index color fpassive

Changes the state of item »index« into active. The provided »color« is used as the image foreground color, whenever the image is a »bitmap«.

 Written     : 2007, Roger

pathName fallback

Reintegrates a former »gridded« Zoolbar at the previous place. The actual zoolbar must be a floating window.

 Written     : 2007, Roger

pathName itemconfigure name ...

Either queries or set certain properties for the item identified with »name«.

 Written     : 2007, Roger

pathName gridPos elWidth useGrid

decide position of item in toolbar (related to toplevel).

See also »griddedSize«.

 Written     : 2007, Roger

pathName type name

Retrieve the »type« of the item with »name«.

 Written     : 2007, Roger

pathName init


pathName gradient


pathName showContext widget x y

Displays the context menu (see customizeMenu) on-screen at point: »x, y«. »widget« is unused.

 Written     : 2007, Roger

pathName stripes

Creates »gstripes::stripes« compliant stripes. Zinc is not compatible with the convontional »gstripes« design.

 Written     : 2007, Roger

pathName execute index widget x y execute

Internal used. Identifies the item located at point »x, y« and executes »execute«, if the point lies near or inside the bounding box of the item idenitified with »index«.

 Written     : 2007, Roger

pathName redraw elements fInactive offsetY offsetX linebreak

»redraw« does all the drawings inside the Zoolbar. For a more detailed discussion see the Goolbar redraw entry.

Zoolbar is a Goolbar ported to Zinc.

 Written     : 2007, Roger

pathName griddedSize right distance useGrid

Calculate the item position in times of grid The grid is meant to give the toolbar –and multiple toolbars… an even look since the items aren’t dependent on there dimensions placed.

 Written     : 2007, Roger