Window-specific Options

Command-Line Name: -languagevariable, Database Name: languageVariable, Database Class; -

Tcl Variable, this variable will receive the selected language.

Command-Line Name: -keyboardvariable, Database Name: keyboardVariable, Database Class; -

Tcl Variable, this variable will receive the selected keyboard.

Command-Line Name: -newfilemenu, Database Name: newFileMenu, Database Class; -

window path name to the »New« sub menu under the »File« menu inside of the main menu bar.

Command-Line Name: -newfilevariable, Database Name: newFileVariable, Database Class; -

Tcl Variable, this variable will receive the selected »New« menu entry text.

Command-Line Name: -newvariable, Database Name: newVariable, Database Class; -

Tcl Variable, this variable will receive the boolean state the »New« menu entry. The »New« sub menu will be replaced by a »New« menu entry, when the boolean value of »-newvariable« is set (true).

Command-Line Name: -projectvariable, Database Name: projectVariable, Database Class; -

Tcl Variable, this variable will receive a boolean value. The variable’s contents indicates that a new blank project is being created when Jeszra starts.

Command-Line Name: -oninsertvariable, Database Name: onInsertVariable, Database Class; -

Tcl Variable, this variable will receive a boolean value. Activate the »Insert« Dialog. The insert dialog is used to predefine window name, properties and which geometry manager is used.

The insert dialog can be activated for single types, too. The insert dialog contains a footer in which it is registered for the current type. Since, activating the insert dialog for specific types requires that the insert dialog itself is present. The most practical way to achieve this is by activating it globally –which is what »grefgeneral« does– and then to activate it for the specific types. Currently »Label« and »Toplevel« are registered for the insert dialog. The menu entries do also deploy it.

Command-Line Name: -splinesvariable, Database Name: splinesVariable, Database Class: -

Undocumented

Command-Line Name: -updatecommand, Database Name: updateCommand, Database Class; -

Tcl Command, it is called whenever a change inside grefgeneral was made. »-updatecommand« is needed to propagate keyboard and language changes throughout Jeszra.

Command-Line Name: -idvariable, Database Name: iDVariable, Database Class; -

Tcl Variable, contains the ID of the selected »New« menu entry.

Command-Line Name: -rootchildvariable, Database Name: rootchildVariable, Database Class; -

Tcl Variable, boolean value. rootchildvariable instructs Jeszra to always put a toplevel window directly under the Tk-root window ».«.

Every toplevel window starts a new template or procedure of its own.

Description

Figure 7.2. grefgeneral


The »grefgeneral« command creates a »grefgeneral« window.

»grefgeneral« is a preferences page. It is dedicated to global and conventional settings.

The general page controls the appearance of certain interactive dialogs, such as the Insert dialog.

The Insert Dialog appears when a new item / window is created. Its purpose is to predefine names and properties for a new item.

Whether toplevel windows are allowed deep down inside a window hierarchy.

@fixmes The initialization has to be revised. The current new state isn't reflected when the dialog is opened. Provide something like a second constructor...

As an intermediate measure use the option database. –Maybe this can be adopted from Jeszra also.

Window Command

A Window created through the grefgeneral 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:

objectcget(option)

Returns the current value of the configuration option given by option. Option may have any of the values accepted by the grefgeneral 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 grefgeneral command.

object.populateLanguages( m )

Interactively called. The language option menu »m« is filled with the available language definitions.

Not yet, full implemented.

object.populateKeyboard( m )

Interactively called. The keyboard option menu –identified as »m«– is filled with the available keyboard definitions. Not yet, full implemented.

object.init()

Secondary constructor for template grefgeneral.

object.enable( target sender )

Activate, deactivate the predefined new project setting. This is controlled through the sender. Rewritten : 11/29/2007, Roger

object.selectedNew( id menu )

Method, called from within the menubutton menu. »selectedNew« identifies the selected New command, given as »id« and »menu«.

The menubar is notified via »-updateCommand«.

object.populateNew( m menubutton )

Fills the menu »m« posted by »menubutton«, with the main-menubar file »new« menu entries. This function is especial needed under AQUA in order to reduce the main menu to a single level design.

Find the main menu, select the file sub menu and retrieve the labels from ... then add to this menu here