Figure 2.1. grefpalman

The palettes preferences page.

Herein new palettes can be created, imported from disc, exported into a file. Palettes can be deleted and hidden.

These code was original part of grefpackages.tcl. For safety reasons pulled into its own dialog. The configuration is done by Grefpackages(n) , the option database and parameters.

The functionality has further changed in 2009, the goal is a clear separation between maintaining palettes at all, and editing the content of a palette. As a side-effect the customize palette page is much simpler and smaller, too.


Window Command

A Window created through the grefpalman 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 grefpalman 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 grefpalman command.

pathName visibility palette

Alters the visibility of the given »palette«. Replacement for checkSelection. Pulled from grefpackages.

pathName addPalette

Create a new galette and define a name for it. The require and ensure stuff will be defined when the content of this galette is edited. get the supposed name from the gistbox and create a new galette form that. The title will be identical to the galette's own name. It is required to know where the palettes are stored in general (the parent window). In contrast to the other gistboxes: Assume the provided name should be used as a single entry!

pathName import

Import a previous defined palette from disk. See »Export« also. Display a File open dialog.

Source this code right away, but instantiate the palette underneath the palette container. This location might vary in different versions of Gestalt. Careful about this!

Suppose code like this: galette %1$s.mypal set toolbar [%1$s toolbar]

pathName init

stripes the »grefpalman« window.

pathName grefpalman ...


pathName display palette

Show the given »palette«. The palette has had to be mapped before display can be used for it... and either grid or floating is required for this. Otherwise modify hide in order to track the geometry management.

-- Actual doesn't make much sense. Grid is the only commutative manager anyway. --

Pulled from grefpackages.

pathName makeInterp

Create a limited interpreter named »storep«. This interpreter is used to generate the needed code for each palette, selected for export. Some code fractions are modified later to enable easy reload into Gestalt.

pathName hide palette

Hide the given »palette«. Pulled from grefpackages.

pathName deletePalette

Remove the selected palette from the Palettes.

pathName export

Allows to permanently store a palette as ».gpal« file on the disk ... warning the used vectors have to be stored, too. These vectors are located inside a namespace identical to the filename in order to avoid name clashes after an re-import. Display a file save dialog.

pathName getPaletteByTitle title