Methods and Variables

New mega-widgets built using [incr Tk] should be derived from either itk::Widget or itk::Toplevel. Both classes are subclasses of itk::Archetype.

Public Methods

The following methods are built into all mega-widgets. For a mega-widget having the Tk name pathName, the following methods are supported:

pathname cget -option

Return the current value of option option.

pathname component

Return a list of the well-known components.

pathname component name command [arg...]

Invoke the given command command as a method on the component called name, optionally with additional arguments.

pathname configure

Return a list describing all of the available options.

pathname configure -option

Return the current value of option option.

pathname configure -option value...

Set the value of option option to value. Multiple option-value pairs can be supplied.

The cget and configure commands work just like the corresponding Tk widget commands.

Protected Methods

These methods are used in the implementation of a mega-widget:

itk_component add
[-protected] [-private] [--]
symbolicName  {
    widget pathName  [arg...]
} [ {
    ignore -option...
    keep   -option...
    rename -option  -newName resourceClass resourceClass
    usual [tag]
}  ]

Commands in this format create a widget and register it as a mega-widget component. The optional block containing ignore, keep, rename, and usual commands controls how the configuration options for this component are merged into the master option list for the mega-widget.

Ignore removes one ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.