File 'gui/gMenubar.cls' (part of 'Pool_GuiBase')

Description (short)
Generic menubar widget
Written by
Andreas Kupries
Description
Generic menubar widget
Keywords
menubar, generic menubar

Class 'genericMenubar'

Description
Instances of this class maintain a generic menubar
Superclasses
widget
Options
command
Methods
public
InvokeEntry (command)
addMenu (name underline spec)
createSubwidgets ()
entryconfigure (command args)
Membervariables
public
entry

Options

-command
Script to execute upon invocation of a menu entry. Two arguments are added before any evaluation. These are the path to the menubar invoking the command and the symbolic name of the invoked command itself.

Methods

InvokeEntry (command)

Internal method, called upon invocation of a menu entry.
Argument: command Symbolic name of the invoked entry.

addMenu (name underline spec)

Adds a new menubutton and its entries to the menubar.
Argument: name String to display in the new button
Argument: underline Index of the character in name to underline.
Argument: spec A list suitable for usage with 'array set'. The first item of each pair is the command code to give to the external script (command) upon invocation of the entry. It serves as symbolic name of the entry too. The 2nd item in each pair is the string to display in the entry. A command of '-' indicates a separator line. The display string is ignored in this case, but has to be present nevertheless. A command name has to be unique over all menubuttons added to a menubar.

createSubwidgets ()

Overrides widget:createSubwidgets
Generate the menubar, place it in the toplevel, use the new menu mechanism of tk.

entryconfigure (command args)

Accessor method allowing the reconfiguration of all entries in the menubar. Access is given based upon the symbolic name of the entry. The mapping to the menu widget of the entry and its index in that is done here.
Argument: command Symbolic name of the command to operate on.
Argument: args List of option, value pairs.


Membervariables

entry
Mapping from symbolic names to menu entries

Generated by AutoDoc 2.4 at 09/14/2000, invoked by Andreas Kupries