Copyright © 2008, 2009 Arndt Roger Schneider
The Tcl/Tk package for deployed by this galette.
The »require« property isn’t used by the galette and may be abused as an external test condition, stored inside the galette.
The above scenario is, how I do use »require« within my own software. It is not likely to change in the future.
»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.
This »command« fragment is executed when an item in the toolbar is activated. The Goolbar items may have their own independent commands, replacing the galette »command« property.
Expression, the result of the »ensure« expression enables or disables all items inside the galette.
»ensure« is deployed by the ensure function. The »ensure« function parameter »parentWidget« is feed via »format« into the »ensure« expression. Thus valid substitution for ensure are »%s« and »%1$s«, place holders for »parentWidget«.
»undo« holds a code fragment informing how an action from this particular Galette can be undone.
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.14. 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.15. Explicit Visible Items
# Example hide d – and add variable space (~) .toolbar configure -show {a b ~ c}
»-hidetitle« tells the window to unmap an integrated title bar.
For a Galette: the integrated toolbar automatically opens, when the title is hidden.
The item properties »bgImage« and »image« are recessive to »token«, whenever »useToken« is set.
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.
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.
Galette (Palette): Implements a special-type toolbar. Galette features multiple lines of entries and deploys a gridwin for scrollbar management. The customization and context menu is reused from the toolbar.
Revision : 05/18/2009, Roger 1.1 06/26/2009
The extended interface from the goolbar is used. Focus-Ring and -takefocus management exported via the template interface.
ActiveForeground, ActiveBackground and Highlighting exported via template interface.
A Window created through the galette 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:
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the galette command.
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 galette command.
Change the visibility of the galette toolbar. This function interrelate with property »hideTitle«. The toolbar stays visible when hideTitle is active.
Side effect : Creates displaying synthetic events. Hiding and Showing.
Queries inside the given »interp« for the »-ensure« property. And thus controls the visibility of all the items inside the contained »toolbar«.
Test if the current items are applicable in the current situation ...
Retrieve the contained toolbar ... the toolbar should be filled directly ...
The secondary constructor for template »galette«. Mostly deals with stripes and also floating window customization. Internal used by the template procedure.
A Drag-n-Drop operation is under progress. That is, a galette is moved inside of its container. The galette must be managed by grid, for using this code.
As with every template, the galette supports multiple creation windows. And for that reason a galette may be represented embedded and floating.
Normally »resize« operations should be done on the parent level. This is however –for some picky reasons— not done here. Therefore resize is an internal function of the galette.
Executes the global »-command« property for the item »type« and applies »name« and »args« to the invoke call.
This call can be omitted, when the »toolbar« item features a non-standard »-command«.
Palette is moved inside parent to another cell.
When the palette gets moved, determine in which row/ column it was placed to.
Calls »occupied« in order to tidy-up the grid of its container window.
Counterpart to »fallback«. »tearoff« is called for an embedded galette, in order to convert it into a floating window. The coordinates »x, y« denote the place of the left and top corner of the created floating galette.