Jump to content

Widget toolkit

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Toussaint (talk | contribs) at 07:07, 26 March 2007 (→‎Cross-platform,). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 toolkit 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 lay out the widgets by setting 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 the developer to define them at the initialisation of the application or even at runtime (see pluggable look and feel).

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, called Xt or "Intrinsics", but they are used only by Motif, most other toolkits such as GTK+ or Qt bypass them and use xlib.
    • 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 could be replaced with similar third-party solutions.

High-level widget toolkits

On Unix, under the X Window System:

Note that the X Window system was originally primarily for Unix-like operating systems, but it now runs on Microsoft Windows as well using, for example, Cygwin, so some or all of these toolkits can also be used under Windows.

Cross-platform,

based on Flash
  • Adobe Flash allows creating widgets running in most web browsers and in several mobile phones.
  • Adobe Flex provides high level widgets for building web user interfaces. Flash widgets can be used in Flex.
  • Flash and Flex widgets will run without a browser in the forthcoming Apollo runtime environment.
  • The Free Software reimplementation of Flash, GNU Gnash, which is under development, can also run Flash widgets outside of a browser.
based on XML
  • XUL
  • XAML with WPF/E
  • Trixul and [2] A lightweight XML/JavaScript/C++ toolkit, inspired by XUL, for use in desktop applications, and providing cross-platform, native support for Cocoa, .NET Forms, and Gtk+.
  • XUI A Java and XML toolkit for building Rich Internet Applications.
based on AJAX
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.
  • SPARK is an application framework built upon SVG.
  • 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 a standard toolkit for the running platform (such as the 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.
  • CEGUI, open source (MIT License), configurable GUI designed for game development.
  • 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 [3]. It comes with a 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 [4], 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 and 7, gcc 3 & 4 and XCode 1.5. Cross platform and native widgets (including stand alone HTML engine), graphical dialog designer, translatable Unicode applications, 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.
  • NovaTK, a GUI Toolkit for X11. It is written in C++ and depends only on Xlib.
  • IP Pascal uses a graphics library built on top 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 a class library wrapping GTK+ 1.2, Gtk+ 2.x and the Windows API (Carbon, Windows CE and Qt4 support are all in development).
  • Curl is an integrated language intended to replace both HTML and a programming language such as Java or JavaScript. It is designed to yield faster performance due to using compilation. Non-commercial use is free.
    • 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 represents a single widget or describes an interface event. This led to an evolution in which third-party developers each realised their own personal systems of classes.
    • 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 GUIs.
    • ReAction: Evolution of the ClassACT system.

Not yet categorised

References

  1. ^ This version provides the core API of the .NET Framework 2.0, but its implementation of this API is still incomplete [1].

See also