Description

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.

WARNING THIS FILE IS HANDWRITTEN USING »TEMPLATE«
CONSEQUENTLY IT CAN'T BE MODIFIED WITH JESZRA.

Window Command

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

object.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:

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

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

object.visibility( palette )

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

object.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!

object.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]

object.init()

stripes the »grefpalman« window.

object.grefpalman( ... )

Undocumented.

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

object.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 Jeszra.

Pulled and moved into utilties. The function is also being used to create the configuration of Jeszra.

object.hide( palette )

Hide the given »palette«. Pulled from grefpackages.

object.deletePalette()

Remove the selected palette from the Palettes.

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

object.getPaletteByTitle( title )

Undocumented.