7 Defining Interface Classes
define-interface
:(define-interface demo () () (:panes (page-up push-button :text "Page Up") (page-down push-button :text "Page Down") (open-file push-button :text "Open File")) (:layouts (row-of-buttons row-layout '(page-up page-down open-file))) (:default-initargs :title "Demo"))An instance of this interface can be displayed as follows:
(make-instance 'demo)At the moment the buttons do nothing, but they will eventually do the following:(display *)
Figure 7.1 A demonstration of a CAPI interface
Later on, we will specify callbacks for these buttons to provide this functionality.
The (:default-initargs :title "Demo")
part at the end is necessary to give the interface a title. If no title is given, the default name is "Untitled CAPI Interface".
Generated with Harlequin WebMaker