Copyright © 2009 Arndt Roger Schneider
The RTL based option creator is used
to instantiate the template galette with a
Tk Window. The used creator window must have a
-class
property.
Acceptable Tk Windows are: toplevel for floating windows, and frame for embedded windows.
See the options manual entry for details on the standard options.
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 4.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 4.8. 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. See also galette command visibility.
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.
Synthetic events on visibility changes.
A Window created through the galette command exposes various functions. Using these functions has the following general form:
(option object ?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.
Monitor this events to implement auto- hide/show the content of other galettes. Rewritten : 02/28/2008, Roger Revision : 06/26/2009, Roger-events
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.
For a galette the creation state can be changed after creation. Thus when a floating galette is recreated as an embedded window »fallback« gets called and re-integrates this window into its previous container.
Only for the »grid« geometry manager.
Forwards itemconfigure calls to the internal »toolbar«.
Doesn’t operate on the galette, itself.
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.
The »fallback« procedure is registered for the window destroy command. The window will be re-managed when it is supposed to be destroyed.