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


Home | Packages | Files | Procedures | Classes | Keywords | External packages


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
Membervariables
entry
Methods
InvokeEntry, addMenu, createSubwidgets, entryconfigure

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

entry
Mapping from symbolic names to menu entries

InvokeEntry (command)

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

addMenu (name underline spec)

Adds a new menubutton and its entries to the menubar.
Argument: nameString to display in the new button
Argument: underlineIndex of the character in name to underline.
Argument: specA 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 ()

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: commandSymbolic name of the command to operate on.
Argument: argsList of option, value pairs.


Generated by AutoDoc 2.1 at 02/20/1999, invoked by Andreas Kupries