itk(n)

πŸ“¦
version 4.2.3 Β· 2 versions
, in fedora 43, fedora 44

✨ itk β€” the [incr Tk] era πŸ’–

okay bestie, welcome to itk(n), the manual page for itk, aka the framework for building mega-widgets in Tcl/Tk. this is giving main character energy for your Tk apps, no cap 🌸


🌈 NAME 🌈

itk β€” framework for building mega-widgets in Tcl/Tk πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

okay so. mega-widgets are high-level widgets that are constructed using Tk widgets as component parts, usually without any C code. literally zero C required, we love that for us 🫢

a fileselectionbox, for example, may have a few listboxes, some entry widgets and some control buttons. these individual widgets are put together in a way that makes them act like one big widget. iconic behavior honestly.

a fileselectionbox mega-widget can be created with a command like:

fileselectionbox .fsb -background blue -foreground white

once it has been created, it can be reconfigured with a command like:

.fsb configure -background green -foreground black

and all of its internal components will change color. yes bestie, all of them. the way that everything just updates at once?? obsessed 😭✨

each mega-widget has a set of methods that can be used to manipulate it. for example, the current selection can be queried from a fileselectionbox like this:

set fileName [.fsb get]

in effect, a mega-widget looks and acts exactly like a Tk widget, but is considerably easier to implement. periodt. πŸ’…

[incr Tk] is a framework for building mega-widgets. it uses [incr Tcl] to support the object paradigm, and adds base classes which provide default widget behaviors. it's giving inheritance, it's giving structure, it's giving slay.

all [incr Tk] widgets are derived from the Archetype base class. this class manages internal component widgets, and provides methods like "configure" and "cget" to access configuration options. your faves could never πŸŽ€

the Widget base class inherits everything from Archetype, and adds a Tk frame which acts as a container for the mega-widget. it is used to build mega-widgets that sit inside of other frames and toplevels. derived classes create other internal components and pack them into the "hull" frame created by the Widget base class. nesting?? we love nesting πŸͺ†

the Toplevel base class inherits everything from Archetype, but adds a Tk toplevel which acts as a container for the mega-widget. it is used to build mega-widgets, such as dialog boxes, that have their own toplevel window. derived classes create other internal components and pack them into the "hull" toplevel created by the Toplevel base class. your own window, your own rules πŸ‘‘


🌸 [incr Widgets] LIBRARY 🌸

[incr Widgets] is a mega-widget library built using [incr Tk]. it can be used right out of the box, and contains more than 30 different widget classes, including:

  • fileselectiondialog
  • tabnotebook
  • panedwindow
  • combobox
  • optionmenu
  • scrolledlistbox
  • scrolledframe
  • messagedialog
  • and many others... ✨

the catalog demo in the "iwidgets/demos" directory shows all of the available widgets in action. go look, it's lowkey a whole vibe check 🌈

each widget class has its own man page describing the features available. so like, there's more reading. sorry bestie, i don't make the rules πŸ“š


πŸ’œ KEYWORDS πŸ’œ

class, object, object-oriented, mega-widget


okay that's the whole page, bestie!! πŸ’– this was itk version 3.0, from the itk(n) manual, and honestly? she ate. now go build something iconic πŸ¦‹βœ¨

πŸ“¦ where this page comes from