Here is a simple example of interface definition done with
(define-interface demo ()
:text "Page Up")
:text "Page Down")
:text "Open File"))
'(page-up page-down open-file)))
(:default-initargs :title "Demo"))
An instance of this interface can be displayed as follows:
At the moment the buttons do nothing, but they will eventually do the following:
Figure 10.1 A demonstration of a CAPI interface
Later on, we will specify callbacks for these buttons to provide this functionality.
(: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".
form could be generated by the Interface Builder tool in the LispWorks IDE. See the
LispWorks IDE User Guide
for details. As the interface becomes more complex, you will find it more convenient to edit the definition by hand.
CAPI User Guide (Windows version) - 30 Aug 2011