Here we place several objects on the Object Clipboard. Then we link the Object Clipboard with a Listener tool, giving a convenient way to manipulate these objects in turn.
(capi:contain
(make-instance 'capi:display-pane
:text "Display Pane"
:background :green))
A green display pane is displayed.
(capi:contain
(make-instance 'capi:editor-pane
:text "Editor Pane"
:background :yellow))
A yellow editor pane is displayed.
(capi:contain
(make-instance 'capi:graph-pane))
Now choose Tools > Object Clipboard or click in the Podium. Notice that this creates an Object Clipboard tool if you do not already have one. The Object Clipboard shows the objects you just clipped, and the most recently clipped object appears at the top. It should look like CAPI panes in the Object Clipboard.
Figure 9.4 CAPI panes in the Object Clipboard
In the Listener choose
Edit > Link from
and select the Object Clipboard in the submenu. Now, whenever you select an object in the Object Clipboard, it is also pasted into the Listener - that is, it becomes the value of *
. We use this link to manipulate the CAPI pane objects in the Listener.
(capi:apply-in-pane-process
* #'(setf capi:simple-pane-background) :red *)
The display pane background becomes red.
Esc P
, and press Return
, to enter the same command again(capi:apply-in-pane-process
* #'(setf capi:simple-pane-background) :red *)
The editor pane background also becomes red.
(capi:apply-in-pane-process
* #'(setf capi:graph-pane-roots) '( 2 3) *)
Notice how linking the Listener with the Object Clipboard allows you to manipulate the clipped objects in turn via the value of *
.
LispWorks IDE User Guide (Windows version) - 13 Sep 2017