Figure 2.3. grefpkproperties

Part of »grefpackages«.

Allows to specify details of an toolbar item inside a »galette«. The specified command is executed when its representation –in the user interface– is depressed.

As a side effect, some settings are stored inside the option database. These are history settings for the dialog itself as well as attributes applied to the type of the worked on item (Type is an attribute of an item and does not necessarily match the identity of that item).

Window Command

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

pathName selectFonts menu

Populates the given »menu« with all the synthetic defined fonts. This font might later be applied with »selectFont«.

pathName openIkon

Open a file browser in order to load an image file.

Uses the tk file dialog, load an image file and creates an image object for this file. The image will be used inside the toolbar to represent the command.

pathName showEnsure

Does /show hide the ensure element as demanded by the user or whenever there is some data stored within ensure.

Ensure is automatically opened when there is data; the state will however not affect other templates. Only the user will change it globally, when he chooses to open "ensure".

If on the other hand the checkbutton gets unchecked and there is data stored, a notice will be written next to the ensure checkbutton to inform him about the stored data.

The same scheme is used for properties.

pathName init

Initialize the properties UI

Basically put stripes in the background.

pathName switchContainer

Changes the definition for the window class. A container is a window, which can hold children in its area. Normal windows do not contain children, but might be forced to do.

pathName properties gal it

Initialization after the GUI was created. Provides the data for the properties GUI.

pathName done

Customize the associated palette with data from GUI.

The toolbar and galette are separate entities; for this matter the full command for invoking the galette item is stored inside the toolbar itself.

@fixmes : Make sure the type and protoname do not contain space characters.

pathName showProperties

See "showEnsure"

pathName showWindowInColumn ?windowId? ?variable? ?column?

Internal used. The property and ensure fields use this procedure. This procedure shows/hides certain windows »windowId« inside a given »column«.

The »variable« determines whether the window is to be hidden or gets displayed.

pathName selectFont font

Applies the selected »font« on the glyph insert field. This »font« will be applied to the toolbar item, too.

pathName createFont

Displays a »rtl_makeFont« dialog, in which a new synthetic font can be generated or another font selected.

The selected font is then applied to the toolbar item,

pathName insertGlyphen key

Monitors the glyph icon input field and removes previous entries. The provided »key« holds the substitute, but isn't inserted by this procedure–the text field does this automatically.

pathName switchBuilt-in

Defines that a container window has a associated geometry manager. This associated geometry manager is normally implemented by the window itself... Need not to be the window built-in manager.

pathName initTextId windowId variable command data