



 
 
So far, you have seen how you can create a variety of different window elements using the CAPI. Up to now, though, you have only created interfaces which contain one of these elements. The CAPI provides a series of layout elements which allow you to combine several elements in a single window. This chapter provides an introduction to the different types of layout available and the ways in which each can be used.
Layouts are created just like any other CAPI element, by using 
make-instance
. Each layout must contain a description of the CAPI elements it contains, given as a list to the 
:description
 keyword.
A layout is used to group any instances of 
simple-pane
 and its subclasses (for instance all the elements you met in the last chapter), and pinboard object and its subclasses (discussed in Creating Your Own Panes). Once again, you should make sure you have defined the 
test-callback
 function before attempting any of the examples in this chapter. Its definition is repeated here for convenience.
(defun test-callback (data interface)
(display-message "Data ~S in interface ~S"
data interface))
CAPI User Guide (Macintosh version) - 30 Aug 2011