CQCC::IOPtkMenu - IOPtk widget class for managing menu widgets
This class provides wrapper objects for a number of commonly used menu types hiding the implementation details and handling message translation and callback setup.
As a subclass of IOPtkWidget, it inherits some basic attribute management and initialization functionality.
How the IOPtkMenu object looks and behaves depends on its ``subtype'' which provides a lightweight subclassing feature. Each subtype has an initialization function that uses Perl/TK calls to define the widget; the subtype may have additional supporting methods to implement its behavior.
The currently supported subtypes include IOCommandMenu. See the method documentation for more information.
The IOPtkPanel ClassTest method provides an extensive test of all of the IOPtkMenu classes.
new CQCC::IOPtkMenu()
IOCommandMenu subtype
$IO->Menu(name, parent, "IOCommandMenu", key-values)>
This subtype method is called during initialization to define a generic Command Menu widget. It uses the Perl/TK Frame object then adds the menu items as buttons after translating their contents, and sets up callbacks as appropriate.
The CALLBACK_OBJECT attribute defines which object will receive the callback when it occurs. If not set the MENULIST callback is evaluated directly.
CALLBACK_OBJECT => $self,
The MENULIST attribute is a list reference of list references which contains the menu items and their callback information. This is a sample:
MENULIST => [ ["GUI_Commit"] => "Action_Commit", ["GUI_Help" ] => [ "Action_Help", "GUI_HelpMain" ], ],
The MENULIST is a list of pairs defining the button display message tag (i.e. [``GUI_Commit'']) and the callback which can be a string to define the name of the method or a list reference defining the method and its arguments. The callback is managed by the IOPtkWidget method, DoCallback.
The WIDTH attribute defines the minimum button width in terms of characters.
SUPPORT POLICY: See TriggerCQCC.pm for the Rational Support Policy.
ManageButtons(operation, buttonName, value)