LispWorks CAPI User Guide > 7 Modifying CAPI Windows

NextPrevUpTopContentsIndex

7.4 Swapping panes and layouts

The class switchable-layout is useful when your interface has several panes of which exactly one should be visible at any time. The class tab-layout provides similar functionality in a Window-system specific way. See Advanced pane layouts

To change to another layout, use (setf pane-layout) :

(setf layout 
      (capi:contain 
       (make-instance 'row-layout 
                      :description 
                      (list (make-instance 'title-pane :text "One") 
                            (make-instance 'title-pane :text "Two"))
                      :visible-min-height 100)))
 
(apply-in-pane-process
 layout #'(setf pane-layout)
 (make-instance 'column-layout 
                :description 
                (list (make-instance 'title-pane :text "Three") 
                      (make-instance 'title-pane :text "Four"))) 
 (element-interface layout))

To change the panes within a layout, use (setf layout-description) :

(setf layout 
      (capi:contain 
       (make-instance 'row-layout 
                      :description 
                      (list (make-instance 'title-pane :text "One") 
                            (make-instance 'title-pane :text "Two"))
                      :visible-min-height 100)))
 
(apply-in-pane-process
 layout #'(setf layout-description)
 (list (make-instance 'title-pane :text "Three") 
       (make-instance 'title-pane :text "Four")
       (make-instance 'title-pane :text "Five"))
 layout)

Note: you must not reuse already-displayed panes in a CAPI layout.


LispWorks CAPI User Guide (Unix version) - 22 Dec 2009

NextPrevUpTopContentsIndex