article

In computer programming, widget toolkits (or GUI toolkits) are sets of basic building units for graphical user interfaces. They are often implemented as a library, or application framework.

See the article on widgets for a list of widgets.

General characteristics


(This section deals mostly with High-level widget toolkits characteristics)

A High-level widget toolkit is an API which manage the creation and behavior of a Graphical user interface :

  • The Graphical user interface is often created as a tree of widgets, some of them supporting the interaction with the user (labels, buttons, check box, ...), others being containers that group the other widgets (windows, panels, ...).
  • The content of the widgets tree, and the properties of the widgets, can often be modified at runtime (widgets can be added or removed from the tree).
  • The toolkit handles the user events, as for example when clicking on a button. The action following the detection of the event is not of the responsibility of the toolkit, but of the application. For example, if the user selects a file in a File dialog, the File dialog widget behavior, and the detection of the user event is managed by the widget toolkit, but the actual action to perform on the file after selection must be performed by the application.

Widget toolkits must have a means to position the widgets in their containers. The simplest way to define their positions is by defining their absolute (on the screen) or relative (to the parent) position in pixels or common distance units, but it is also often possible to layout the widgets by their relative positions without using distance units (see Layout manager).

Also the Look and feel of the widgets can be hardcoded in the toolkit, but some widget toolkit APIs decouple the Look and feel from the definition of the widgets, allowing to define them at the initialisation of the application or even at runtime (see Pluggable look and feel).

Popular widget toolkits


Low-level widget toolkits

  • Integrated in the operating system:
  • As a separate layer on top of the operating system:
    • The X Window System contains primitive building blocks, but they are almost always accessed using Motif, GTK+ or Qt.
    • The Amiga OS Intuition was formerly present into Amiga Kickstart ROM and integrated itself with medium-high level widget library which invoke Workbench Amiga native GUI. Since Amiga OS 2.0, Intuition.library become disk based and object oriented. Also Workbench.library and Icon.library become disk based, and suitable to be changed with similar third party solutions.

High-level widget toolkits

  • On Microsoft Windows:
    • The Microsoft Foundation Classes (MFC), used by most developers on the Microsoft Windows platform. This framework is a wrapper for the Windows API (Win32API), and not an independent toolkit.
    • The Windows Template Library (WTL), a template-based extension to ATL as replacement of MFC
    • SmartWin++, an MFC/WTL replacement using templates based on STL and Boost
    • The Object Windows Library is sort of Borland's alternative to MFC. This framework is a wrapper for the Windows API (Win32API), and not an independent toolkit.
    • The Visual Component Library (VCL) is Borland's toolkit used in its C++ Builder and Delphi products. This framework is a wrapper for the Windows API (Win32API), and not an independent toolkit.
    • The Windows Forms is .NET's set of classes that handle GUI controls. In the Microsoft implementation, this framework is a wrapper for the Windows API (Win32API), and not an independent toolkit. In the cross-platform Mono implementation, it is an independent toolkit, implemented entirely in managed code.

  • Engine under Lazarus (for Delphi via Free Pascal):
    • LCL as classes toolkit over GTK+ 1.2, Gtk+ 2.x and Windows API (Carbon, Windows CE and Qt4 in development).
  • On Amiga OS:
    • BOOPSI (Basic Object Oriented Programming System for Intuition) was introduced with OS 2.0 and enhanced Intuition with a system of classes in which every class individuate a single widget or describes an interface event. This leaded an evolution in which third parties developers realized each own his personal system of classes. It can be used to program Object Oriented into Amiga at any level.
    • Magic User Interface (MUI): system of Amiga Widget Classes. An open source implementation exists as part of the AROS Project.
    • ClassAct: another system of Amiga Widget Classes which evolved in AmigaOS 3.9 and 4.0 into Reaction based GUI's.
    • ReAction: Evolution of ClassACT system.

Not yet categorised

See also


External links


Widget toolkits | Graphical user interface

Toolkit | Toolkit | ウィジェット・ツールキット | Toolkit | 部件工具箱

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Widget toolkit".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld