Widget toolkit
From Wikipedia, the free encyclopedia
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.
Contents |
[edit] General characteristics
(This section deals mostly with High-level widget toolkits characteristics)
A high-level widget toolkit is an API that manages 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 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 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 are 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).
[edit] Popular widget toolkits
[edit] Low-level widget toolkits
- Integrated in the operating system:
- The Mac OS toolbox, or Macintosh APIs, formerly located in ROM, but in "new world" Macs, on disk. A cleaned up version for Mac OS X is called Carbon.
- The Windows API used in Microsoft Windows.
- As a separate layer on top of the operating system:
- The X Window System contains primitive building blocks, called Intrinsics, but they are almost always accessed using Motif, GTK+ or Qt.
- The Amiga OS Intuition was formerly present in the Amiga Kickstart ROM and integrated itself with a medium-high level widget library which invoked the Workbench Amiga native GUI. Since Amiga OS 2.0, Intuition.library became disk based and object oriented. Also Workbench.library and Icon.library became disk based, and suitable to be changed with similar third party solutions.
[edit] High-level widget toolkits
- On Macintosh:
- 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.
- On Unix, under the X Window System:
- Xaw, the Project Athena widget set for the X Window System.
- Motif used in the Common Desktop Environment.
- Lesstif, an open source (LGPL) version of Motif.
- InterViews, a toolkit written in C++.
- Cross-platform,
- based on Flash
- Adobe Flash allows to create widgets running in most of web browsers and in several mobile phones. Allows to create widgets you can compose for building Flex applications
- Adobe Flex provide tens of high level widgets you can use for building any kind of web user interface
- Flash and Flex widgets will run without browser with Apollo future engine.
- based on XML:
- based on AJAX:
- Backbase AJAX
- TIBCO General Interface has many rich AJAX GUI components including vector charts and is now also available through an open source BSD license.
- Dojo Toolkit
- Google Web Toolkit
- based on SVG:
- airWRX is an application framework that runs from a USB flash drive, and turns its PC host and other nearby PCs into a multi-screen, web-like digital workspace.
- based on the Java programming language:
- The Abstract Windowing Toolkit is used in Java applications. It typically uses another toolkit on the selected platform in turn.
- Swing is Sun Microsystems's replacement for AWT in newer Java versions.
- The Standard Widget Toolkit is a native widget toolkit for Java that was invented as part of the Eclipse project. SWT will use the running platforms widget toolkit (such as Windows API or GTK+) underneath.
- based on the programming languages C or C++, often with bindings to other languages:
- YAAF, open source (YAAF Open Source License), designed to facilitate creating cross-platform applications.
- Tk, a widget set accessed from Tcl and other high-level script languages (interfaced in Python as Tkinter).
- GTK+, open source (LGPL), primarily for the X Window System, ported to and emulated under other platforms; used in the GNOME and XFCE desktop environments.
- Qt, open source (QPL, GPL) available under Unix and Linux (with X Window), MS Windows, Mac OS X and embedded Linux systems; also available in commercial versions under these platforms; used in KDE and the Opera browser.
- CLX (Component Library for Cross-platform), used with Borland's Delphi, C++ Builder, and Kylix, for producing cross-platform applications. It is based on Qt, wrapped in such a way that its programming interface is similar to that of the VCL toolkit.
- wxWidgets (formerly wxWindows), open source (relaxed LGPL), abstracts toolkits across several platforms for C++, Python and Perl.
- FOX toolkit, open source (LGPL), cross-platform toolkit.
- FLTK, open source (LGPL), cross-platform toolkit designed to be small and fast.
- The Visual Component Framework (VCF) is an open source (BSD license) C++ framework project.
- Juce provides GUI and widget set with the same look and feel in Microsoft Windows, X Window Systems, and MacOSX
- Ultimate++ (open source, most parts BSD license) has its own platform-independent widgets [1]. It comes with cross-platform rapid application development suite, a set of libraries ( SQL, XML, NTL, etc..), an integrated development environment TheIDE (similar to Code::Blocks, Dev-C++, etc with easy GUI switching between compilers (like Gcc, free MS Visual C++ Toolkit 2003 [2], etc.) and their configurations (release, debug etc)), own interpreter (called Esc), forms and icons designer.
- Lgi (LGPL), Ports for Windows, Cygwin, Linux (xlib), BeOS and MacOSX (in progress). Compiles with VC++ 6 & 7, gcc 3 & 4 and XCode 1.5. Cross platform & native widgets (inc stand alone HTML engine), graphical dialog designer, translatable unicode apps, IDE, and small binaries.
- Agar is a set of cross-platform graphics libraries which includes a comprehensive GUI toolkit. Agar supports OpenGL rendering as well as simple frame buffer displays with SDL.
- Based on the Pascal programming language:
- IP Pascal uses graphics library built ontop of standard language constructs. Also unusual for being a procedural toolkit that is cross platform (no callbacks or other tricks), and is completely upward compatible with standard serial input and output paradigms. Completely standard programs with serial output can be run and extended with graphical constructs.
- Lazarus LCL (for Pascal, Object Pascal and Delphi programming language via Free Pascal compiler), as classes toolkit over GTK+ 1.2, Gtk+ 2.x and Windows API (Carbon, Windows CE and Qt4 in development).
- based on Flash
- 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 led 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.
[edit] Not yet categorised
[edit] See also
[edit] External links
- The GUI Toolkit, Framework Page, comparing some of the modern GUIs out there (mirror geocities, other mirror).
- Survey of Widget sets
- GUI Toolkits for The X Window System (Leslie Polzer, freshmeat.net, 27 July 2003)