IT lexicon › Programming › Widget toolkit

Widget toolkit

Programming På svenska → Updated: 2026-10-08

The library of ready-made buttons, menus, scrollbars and text fields, plus the event loop and layout rules that hold them together, so a program never has to build its interface out of lines and rectangles.

A window system hands out a rectangle and a stream of mouse clicks. Everything that looks like an interface comes from the layer above. The Macintosh put its layer in ROM in 1984 and called it the Toolbox; Windows built its into USER. X11 stuck to its principle of not dictating appearance, so there the toolkit became a separate product and a battlefield: Xt supplied the framework, Athena the ugly free option, Motif and XView the two commercial camps. The word widget itself comes from Xt, which distinguished widgets with their own X window from gadgets without one.

The second wave was written in C++ and C for the free desktops: Qt in 1995, GTK in 1997, FLTK in 1998, with Tk as the one every scripting language borrowed. The dividing line runs between toolkits that draw everything themselves and therefore look the same everywhere, such as Qt, GTK and Java's Swing, and those that wrap the platform's native controls, such as wxWidgets and SWT. Cocoa is Apple's, inherited from NeXT. Since the 2010s the calls are being replaced by declarative descriptions in QML, SwiftUI and Compose, and a sizeable share of desktop software uses a web browser as its toolkit instead.

← Back to the lexicon