Description

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:

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 grefpkproperties 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 grefpkproperties command.

object.selectFonts( menu )

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

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

object.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. Revision : 11/04/2009, Roger

object.init()

Initialize the properties UI

Basically put stripes in the background.

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

object.properties( gal it )

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

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

object.showProperties()

See "showEnsure".

Side-effect use a slightly different color for this information. Revision : 11/04/2009, Roger

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

object.selectFont( font )

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

object.realignHeader()

Redesigned display section on-top. Synchronize the template main layout with the child area »extended«. The icon and label element are aliens to extended, but managed by it. »realignHeader« increases the same rows inside the parent frame to define a minimal size, for extended, to make it large enough for the alien controls.

The mechanism is something akin to mixed propagation, were propagation occurs for the two mentioned controls and is otherwise disabled for the following controls.

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

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

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

object.initTextId( windowId variable command data )