About iTk or incr Tk


[incr Tk] or iTk is a framework meant for easy creation of mega widgets utilizing and requiring the [incr Tcl] object system. These mega widgets are a kind of high-level widgets such as ‘tab notebook’ or ‘file browser’ which although function like the ordinary Tk widgets, are built utilizing the Tk widgets as their component parts, without the need of writing any C code. A mega widget appears and performs just like any Tk widget, but how it differs from the former is the way it can be implemented very easily.

The working of [incr Tk]

As mentioned above, [incr Tk] or iTk is a paradigm for creation of mega widgets, as well as a set of base classes that support this paradigm. [incr Tk] provides three different base classes which are a part of the itk namespace. These are:

itk::Toplevel
itk::Widget
itk::Archetype

All [incr Tk] mega widgets are a derivative of the itk::Archetype, that’s responsible for better management of the configuration options and component widgets.

Coming to the base class itk::widget, it adds a frame that functions as the ‘hull’ for a mega widget. For instance, mega widgets of the ‘Combobox’ kind may be derived from the itk::widget, as they reside within the other top levels and frames.

On the other hand, with regard to the itk::toplevel base class, it adds a top-level widget in the form of a ‘hull’ component. For example, mega widgets of the kind like ‘MessageDialog’ or ‘Dialog’ may possibly be derived from the itk::TopLevel, as they reside within their own respective top-level windows.