NextPrevUpTopContentsIndex

10.5 Gadgets

Gadgets are panes that implement such common toolkit components as push buttons or scroll bars. Each gadget class has a set of associated generic functions that serve the same role that callbacks serve in traditional toolkits. (A callback is a function that informs an application that one of its gadgets has been used.) For example, a push button has an "activate" callback function that is invoked when its button is "pressed;" a scroll bar has a "value changed" callback that is invoked after its indicator has been moved.

The gadget definitions specified by CLIM are abstract; that is, the gadget definition does not specify the exact user interface of the gadget, but only specifies the semantics that the gadget should provide. For instance, it is not defined whether the user clicks on a push button with the mouse, or moves the mouse over the button and then presses some key on the keyboard to invoke the "activate" callback. Each toolkit implementation will specify the look and feel of their gadgets. Typically, the look and feel will be derived directly from the underlying toolkit.

Each of CLIM's abstract gadgets has at least one standard implementation that is written using the facilities provided solely by CLIM itself. The gadgets' appearances are achieved via calls to the CLIM graphics functions, and their interactive behavior is defined in terms of the CLIM input event processing mechanism. Since these gadget implementations are written entirely in terms of CLIM, they are portable across all supported CLIM host window systems. Furthermore, since the specific look and feel of each such gadget is "fixed" in CLIM Lisp code, the gadget implementation will look and behave the same in all environments.

10.5.1 Abstract Gadgets

10.5.2 Basic Gadget Classes

10.5.3 Abstract Gadget Classes

10.5.4 Integrating Gadgets and Output Records


CommonLisp Interface Manager 2.0 User's Guide - 30 Jul 2004

NextPrevUpTopContentsIndex