1 CAPI Reference Entries

switchable-layout

Class

Summary

A subclass ofsimple-layout that displays only one of its children at a time, and provides functionality for switching the displayed child to one of the other children.

Superclasses

simple-layout

Slots

visible-child
The currently visible child from the children.

Accessors

switchable-layout-visible-child

Description

Theswitchable-layout is passed a list of children to be its initial list of children, and also the initially visible child (which defaults to the first of the children). It inherits all of its layout behavior fromsimple-layout as it only ever lays out one child at a time.

Example

(setq children (list
                (make-instance 'capi:push-button
                               :text "Press Me")
                (make-instance 'capi:list-panel
                               :items '(1 2 3 4 5))))

(setq layout (capi:contain (make-instance 'capi:switchable-layout :description children)))

(setf (capi:switchable-layout-visible-child layout) (second children))

(setf (capi:switchable-layout-visible-child layout) (first children))

Example File

capi/layouts/switchable-layout.lisp

See Also

layout


CAPI Reference Manual, Liquid Common Lisp Version 5.0 - 3 OCT 1997

Generated with Harlequin WebMaker