Open abstract class
The protocol class of all gadgets.
<object>
id:false-or(<object>). Default value: #f.
client:false-or(<object>). Default value: #f.
label:type-union(<string>, <image>). Required.
documentation:false-or(<string>). Default value: #f.
enabled?:<boolean>. Default value: #t.
read-only?:<boolean>. Default value: #f.
duim-gadgets
duim-gadgets
The class of all gadgets. You should not create a direct instance of this class.
The id: init-keyword lets you specify a unique identifier for the action gadget. This is a useful way of identifying gadgets, and provides you with an additional way of controlling execution of your code, allowing you to create simple branching statements such as:
select (gadget-id)
#"ok" => do-okay();
#"cancel" => do-cancel();
end select; Note, however, that specifying id: is not generally necessary. The id: init-keyword is useful in the case of tab controls, where it is returned by gadget-value.
Every gadget has a client: that is specified when the gadget is created. Typically, client: is a frame or a composite sheet.
The label: init-keyword lets you assign a label to any gadget. A label may be any string, or an image of an appropriate size (usually a small icon).
The documentation: init-keyword is used to provide a short piece of online help for the gadget. Any documentation supplied for a gadget may be used in a tooltip or a status bar. For example, moving the mouse over a menu command may display the supplied documentation for that command in the status bar of your application, or moving the mouse over any of the buttons in a tool bar may display a tooltip (a piece of pop-up text) that contains the supplied documentation.
If enabled?: is true, then the gadget is enabled; that is, the user can interact with the gadget in an appropriate way. If the gadget is not enabled, then the user cannot interact with it. For example, if a push button is not enabled, it cannot be clicked, or if a check box is not enabled, its setting cannot be switched on or off. Gadgets that are not enabled are generally grayed out on the screen.
If read-only?: is true, then the user cannot alter any of the values displayed in the gadget; this typically applies to text gadgets. Note that this is not the same as disabling the gadget -- if a gadget is set to read-only, it is not grayed out, and the user may still interact with it: only the values cannot be changed.
activate-gadget choose-from-dialog gadget-accelerator gadget-accelerator-setter gadget-client gadget-client-setter gadget-command gadget-command-setter gadget-default? gadget-default?-setter gadget-documentation gadget-documentation-setter gadget-value-changing-callback gadget-value-changing-callback-setter gadget-enabled? gadget-enabled?-setter gadget-id gadget-id-setter gadget-label gadget-label-setter gadget-mnemonic gadget-mnemonic-setter gadget-orientation gadget-popup-menu-callback gadget-popup-menu-callback-setter gadget-read-only? gadget-scrolling-horizontally? gadget-scrolling-vertically? update-gadget