NAME

CQCC::IOPtkWidget - Base class for IOPtk widgets supporting Perl/Tk


CLASS DESCRIPTION

This class provides common utility functions for the IOPtk component widgets supporting the IOPerlTK user interface class. It provides basic support for initialization and destruction, common attribute handling, event callbacks, and named object management and lookup.

The IOPerlTK class provides a front end to creating and managing IOPtkWidget objects so that the Trigger classes do not need to directly use this class or its subclasses.

SUPPORT POLICY: See TriggerCQCC.pm for the Rational Support Policy.


METHODS

DESTROY()
This method handles basic destruction of the object, removing it from its parent's children lists, destroying the Perl/Tk widgets, and deleting it from the named lookup tables.

DoCallback(itemName, itemCmd)
This method processes a callback event associated with the object, usually to support buttons or menu items.

If the object has a CALLBACK_OBJECT attribute, the itemCmd is interpreted as a method call to that object with optional arguments. itemCmd can be either an array reference to provide arguments or as a string name with the name of the method.

If the object has no CALLBACK_OBJECT attribute, itemCmd is evaluated directly.

new CQCC::IOPtkWidget(name, parent, type, key-value pairs)
This method initializes the object's attributes, adds it to a named lookup table, adds it as a new child to its parent widget, and processes common attribute settings.

All IOPtk* widgets should be created through the appropriate constructor functions in CQCC::IOPerlTK and not through direct calls to new().

newSubType()
The IOPtkWidget subclasses can be specialized by a subtype method to implement a particular widget such as a label or button. This internal method is called by the subclass to complete initialization by calling the subtype method.

@list = PackArgs( {default pack arguments} )
This internal method is called by a subclass to return a list arguments to the PerlTK pack() call, either using the default pack arguments being passed in or the PACK attribute list (preferred) provided by the new call.

TKoptions()
This internal method retrieves any Perl/Tk initialization options defined by the TK attribute (a list reference) and the FONTPTR attribute if one is provided.

TKSubWidget(subwidgetName)
This method retrieves Perl/Tk widgets used in the implementation of the IOPtkWidget. It is provided to allow more direct access to Perl/TK when required but should be used sparingly.

Subwidget names vary depending on the particular IOPtkWidget class. This method also supports ``TOP'' to get the outermost widget used in the IOPtkWidget implementation.

WidgetLookup(name, noreport)
This function returns a pointer to the IOPtkWidget with the given name. It permits IOPtkWidgets to be created without needing to maintain the resultant pointers. If noreport is true, then no error messages are reported for unfound widgets; otherwise, a fatal error is generated.