5.5 Advanced Pane Layouts

5.5.1 Switchable layouts

A switchable layout allows you to place CAPI objects on top of one another and determine which object is displayed on top through Lisp code, possibly linked to a button or menu option through a callback. Switchable layouts are set up using aswitchable-layout element in amake-instance. As with the other layouts, such ascolumn-layout androw-layout, the elements to be organized are given as a list to the:description keyword. Here is an example:

(setq switching-panes (make-instance 
                       'switchable-layout
                       :description (list red-pane green-pane)))

(contain switching-panes)

Note that the default pane to be displayed is the red pane, which was the first pane in the description list. The two panes can now be switched between usingswitchable-layout-visible-child:

(setf (switchable-layout-visible-child switching-panes)
      green-pane)

(setf (switchable-layout-visible-child switching-panes) red-pane)


CAPI User Guide, Liquid Common Lisp Version 5.0 - 2 OCT 1997

Generated with Harlequin WebMaker