CLIM supplies a set of abstract gadgets that have been designed to be compatible with with a variety of user interface toolkits, including Xt widget-based toolkits (such as Motif), OpenLook, and MacApp and MicroSoft Windows. [annotate]
CLIM's "concrete" gadget classes will all be subclasses of these abstract gadget classes. Each concrete gadget maps to an implementation-specific object that is managed by the underlying toolkit. For example, while a CLIM program manipulates an object of class scroll-bar, the underlying implementation-specific object might be an Xt widget of type Xm_Scroll_Bar. As events are processed on the underlying object the corresponding generic operations are applied to the Lisp gadget. [annotate]
Minor issue: Do we want to define something like gadget-handle that is a documented way to get ahold of the underlying toolkit object? --- ILA [annotate]
Note that not all operations will necessarily be generated by particular toolkit implementations. For example, a user interface toolkit that is designed for a 3-button mouse may generate significantly more gadget events than one designed for a 1-button mouse. [annotate]
The push-button gadget provides press-to-activate switch behavior. [annotate]
arm-callback will be invoked when the push button becomes armed (such as when the pointer moves into it, or a pointer button is pressed over it). When the button is actually activated (by releasing the pointer button over it), activate-callback will be invoked. Finally, disarm-callback will be invoked after activate-callback, or when the pointer is moved outside of the button. [annotate]
The instantiable class that implements an abstract push button. It is a subclass of action-gadget and labelled-gadget-mixin. [annotate] |
This is used to initialize the "show as default" property for the gadget, described below. [annotate] |
Returns the "show as default" property for the push button gadget. When true, the push button will be drawn with a heavy border, which indicates that this button is the "default operation". [annotate] |
The instantiable class that implements a portable push button; a subclass of push-button. [annotate] |
The toggle-button gadget provides "on/off" switch behavior. This gadget typically appears as a box that is optionally highlighted with a check-mark. If the check-mark is present, the gadget's value is t, otherwise it is nil. [annotate]
arm-callback will be invoked when the toggle button becomes armed (such as when the pointer moves into it, or a pointer button is pressed over it). When the toggle button is actually activated (by releasing the pointer button over it), value-changed-callback will be invoked. Finally, disarm-callback will be invoked after value-changed-callback, or when the pointer is moved outside of the toggle button. [annotate]
The instantiable class that implements an abstract toggle button. It is a subclass of value-gadget and labelled-gadget-mixin. [annotate] |
This is used to initialize the indicator type property for the gadget, described below. [annotate] |
Returns the indicator type for the toggle button. This will be either :one-of or :some-of. The indicator type controls the appearance of the toggle button. For example, many toolkits present a one-of-many choice differently from a some-of-many choice. [annotate] |
Returns true if the button is selected, otherwise returns false. [annotate] |
The instantiable class that implements a portable toggle button; a subclass of toggle-button. [annotate] |
The menu-button gadget provides similar behavior to the toggle-button gadget, except that it is intended for items in menus. The returned value is generally the item chosen from the menu. [annotate]
arm-callback will be invoked when the menu button becomes armed (such as when the pointer moves into it, or a pointer button is pressed over it). When the menu button is actually activated (by releasing the pointer button over it), value-changed-callback will be invoked. Finally, disarm-callback will be invoked after value-changed-callback, or when the pointer is moved outside of the menu button. [annotate]
The instantiable class that implements an abstract menu button. It is a subclass of value-gadget and labelled-gadget-mixin. [annotate] |
The instantiable class that implements a portable menu button; a subclass of menu-button. [annotate] |
The scroll-bar gadget corresponds to a scroll bar. [annotate]
The instantiable class that implements an abstract scroll bar. This is a subclass of value-gadget, oriented-gadget-mixin, and range-gadget-mixin. [annotate] |
:drag-callback | [Initarg] |
:scroll-to-bottom-callback | [Initarg] |
:scroll-to-top-callback | [Initarg] |
:scroll-down-line-callback | [Initarg] |
:scroll-up-line-callback | [Initarg] |
:scroll-down-page-callback | [Initarg] |
:scroll-up-page-callback | [Initarg] |
Specifies the drag and other scrolling callbacks for the scroll bar. [annotate] |
Returns the function that will be called when the indicator of the scroll bar is dragged. This function will be invoked with a two arguments, the scroll bar and the new value. [annotate] |
scroll-bar-scroll-to-bottom-callback | scroll-bar | [Generic Function] |
scroll-bar-scroll-to-top-callback | scroll-bar | [Generic Function] |
scroll-bar-scroll-down-line-callback | scroll-bar | [Generic Function] |
scroll-bar-scroll-up-line-callback | scroll-bar | [Generic Function] |
scroll-bar-scroll-down-page-callback | scroll-bar | [Generic Function] |
scroll-bar-scroll-up-page-callback | scroll-bar | [Generic Function] |
Returns the functions that will be used as callbacks when various parts of the scroll bar are clicked on. These are all functions of a single argument, the scroll bar. [annotate] When any of these functions returns nil, that indicates that there is no callback of that type for the gadget. [annotate] |
This callback is invoked when the value of the scroll bar is changed while the indicator is being dragged. This is implemented by calling the function stored in scroll-bar-drag-callback with two arguments, the scroll bar and the new value. [annotate] The value-changed-callback is invoked only after the indicator is released after dragging it. [annotate] |
scroll-to-top-callback | scroll-bar client gadget-id | [Callback Generic Function] |
scroll-to-bottom-callback | scroll-bar client gadget-id | [Callback Generic Function] |
scroll-up-line-callback | scroll-bar client gadget-id | [Callback Generic Function] |
scroll-up-page-callback | scroll-bar client gadget-id | [Callback Generic Function] |
scroll-down-line-callback | scroll-bar client gadget-id | [Callback Generic Function] |
scroll-down-page-callback | scroll-bar client gadget-id | [Callback Generic Function] |
All of the callbacks above are invoked when appropriate parts of the scroll bar are clicked on. Note that each implementation may not have "hot spots" corresponding to each of these callbacks. [annotate] |
The instantiable class that implements a portable scroll bar; a subclass of scroll-bar. [annotate] |
The slider gadget corresponds to a slider. [annotate]
The instantiable class that implements an abstract slider. This is a subclass of value-gadget, oriented-gadget-mixin, range-gadget-mixin, and labelled-gadget-mixin. [annotate] |
Specifies the drag callback for the slider, whether the slider should show its current value, and how many decimal places to the right of the decimal point should be displayed when the slider is showing its current value. [annotate] |
Specifies a label to be used at the low end and high end of the sldier, and what the text style of those labels should be. [annotate] |
Specifies the number of tick marks that should be drawn on the scroll bar, and the number of quanta in the scroll bar. If the scroll bar is quantized, the scroll bar will consist of discrete values rather than continuous values. [annotate] |
Returns true if the slider shows its value, otherwise returns false [annotate] |
Returns the function that will be called when the indicator of the slider is dragged. This function will be invoked with a two arguments, the slider and the new value. [annotate] When this function returns nil, that indicates that there is no drag callback for the gadget. [annotate] |
This callback is invoked when the value of the slider is changed while the indicator is being dragged. This is implemented by calling the function stored in slider-drag-callback with two arguments, the slider and the new value. [annotate] The value-changed-callback is invoked only after the indicator is released after dragging it. [annotate] |
The instantiable class that implements a portable slider; a subclass of slider. [annotate] |
Radio boxes and check boxes are special kinds of gadgets that constrain one or more toggle buttons. At any one time, only one of the buttons managed by the radio box, or zero or more of the buttons managed by a check box, may be "on". The contents of a radio box or a check box are its buttons, and as such a radio box or check bnox is responsible for laying out the buttons that it contains. A radio box or check box is a client of each of its buttons so that the value of the radio or check box can be properly computed. [annotate]
As the current selection changes, the previously selected button and the newly selected button both have their value-changed-callback handlers invoked. [annotate]
The instantiable class that implements an abstract radio box, that is, a gadget that constrains a number of toggle buttons, only one of which may be selected at any one time. It is a subclass of value-gadget and oriented-gadget-mixin. [annotate] |
This is used to specify which button, if any, should be initially selected. [annotate] |
radio-box-current-selection | radio-box | [Generic Function] |
(setf radio-box-current-selection) | button radio-box | [Generic Function] |
Returns (or sets) the current selection for the radio box. The current selection will be one of the toggle buttons in the box. [annotate] |
Returns a sequence of all of the selections in the radio box. The elements of the sequence will be toggle buttons. [annotate] |
Returns the selected button. This will return the same value as radio-box-current-selection [annotate] |
The instantiable class that implements a portable radio box; a subclass of radio-box. [annotate] |
The instantiable class that implements an abstract check box, that is, a gadget that constrains a number of toggle buttons, zero or more of which may be selected at any one time. It is a subclass of value-gadget and oriented-gadget-mixin. [annotate] |
This is used to specify which buttons, if any, should be initially selected. [annotate] |
check-box-current-selection | check-box | [Generic Function] |
(setf check-box-current-selection) | button check-box | [Generic Function] |
Returns (or sets) the current selection for the check box. The current selection will be a list of zero or more of the toggle buttons in the box. [annotate] |
Returns a sequence of all of the selections in the check box. The elements of the sequence will be toggle buttons. [annotate] |
Returns the selected buttons as a list. This will return the same value as check-box-current-selection [annotate] |
The instantiable class that implements a portable check box; a subclass of check-box. [annotate] |
Creates a radio box whose buttons are created by the forms in body. The macro radio-box-current-selection can be wrapped around one of forms in body in order to indicate that that button is the current selection. [annotate] If type is :one-of, a radio-box will be created. If type is :some-of, a check-box will be created. [annotate] For example, the following creates a radio box with three buttons in it, the second of which is initially selected. [annotate] (with-radio-box () (make-pane 'toggle-button :label "Mono") (radio-box-current-selection (make-pane 'toggle-button :label "Stereo")) (make-pane 'toggle-button :label "Quad")) The following simpler form can also be used when the programmer does not need to control the appearance of each button closely. [annotate] (with-radio-box () "Mono" "Stereo" "Quad") |
The instantiable class that implements an abstract list pane, that is, a gadget whose semantics are similar to a radio box or check box, but whose visual appearance is a list of buttons. It is a subclass of value-gadget. [annotate] |
Either :nonexclusive or :exclusive. When it is :exclusive, the list pane acts like a radio box, that is, only a single item can be selected. Otherwise, the list pane acts like a check box, in that zero or more items can be selected. The default is :exclusive. [annotate] |
The :items initarg specifies a sequence of items to use as the items of the list pane. The name of the item is extracted by the function that is the value of the :name-key initarg, which defaults to princ-to-string. The value of the item is extracted by the function that is the value of the :value-key initarg, which defaults to identity. The :test initarg specifies a function of two arguments that is used to compare items; it defaults to eql. [annotate] For example, [annotate] (make-pane 'list-pane :value '("Lisp" "C++") :mode :nonexclusive :items '("Lisp" "Fortran" "C" "C++" "Cobol" "Ada") :test 'string=) |
Returns the single selected item when the mode is :exclusive, or a sequence of selected items when the mode is :nonexclusive. [annotate] |
The instantiable class that implements a portable list pane; a subclass of list-pane. [annotate] |
The instantiable class that implements an abstract option pane, that is, a gadget whose semantics are identical to a list pane, but whose visual appearance is a single push button which, when pressed, pops up a menu of selections.. It is a subclass of value-gadget. [annotate] |
Either :nonexclusive or :exclusive. When it is :exclusive, the option pane acts like a radio box, that is, only a single item can be selected. Otherwise, the option pane acts like a check box, in that zero or more items can be selected. The default is :exclusive. [annotate] |
The :items initarg specifies a sequence of items to use as the items of the option pane. The name of the item is extracted by the function that is the value of the :name-key initarg, which defaults to princ-to-string. The value of the item is extracted by the function that is the value of the :value-key initarg, which defaults to identity. The :test initarg specifies a function of two arguments that is used to compare items; it defaults to eql. [annotate] For example, (make-pane 'option-pane :value '("Lisp" "C++") :mode :nonexclusive :items '("Lisp" "Fortran" "C" "C++" "Cobol" "Ada") :test 'string=) |
Returns the single selected item when the mode is :exclusive, or a sequence of selected items when the mode is :nonexclusive. |
The instantiable class that implements a portable option pane; a subclass of option-pane. [annotate] |
The text-field gadget corresponds to a small field containing text. [annotate]
The instantiable class that implements an abstract text field. This is a subclass of value-gadget and action-gadget. [annotate] The value of a text field is the text string. [annotate] |
This is used to specify whether or not the text field may be edited. [annotate] |
The instantiable class that implements a portable text field; a subclass of text-field. [annotate] |
The text-editor gadget corresponds to a large field containing multiple lines of text. [annotate]
The instantiable class that implements an abstract large text field. This is a subclass of text-field. [annotate] The value of a text editor is the text string. [annotate] |
Specifies the width and height of the text editor in columns and number of lines. [annotate] |
The instantiable class that implements a portable text editor; a subclass of text-editor. [annotate] |