All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

row-layout Class

Summary

A layout which arranges its children in a row.

Package

capi

Superclasses

grid-layout

Initargs
:ratios
The size ratios between the layout's children.
:adjust
The vertical adjustment for each child.
:gap
The gap between each child.
:uniform-size-p
If t, each child in the row has the same width.
Accessors

layout-ratios

Description

The class row-layout lays its children out in a row. It inherits the behavior from grid-layout. The description is a list of the layout's children, and the layout also translates the initargs ratios, adjust, gap and uniform-size-p into the grid layout's equivalent arguments x-ratios, y-adjust, x-gap and x-uniform-size-p.

description may also contain the keywords :divider and :separator which create a divider or separator as a child of the row-layout. The user can move a divider, but cannot move a separator.

When specifying :ratios in a row with :divider or :separator, you should use nil to specify that the divider or separator is given its minimum size.

Examples
(setq row (capi:contain
           (make-instance
            'capi:row-layout
            :description
            (list
             (make-instance 'capi:push-button
                            :text "Press me")
             (make-instance 'capi:title-pane
                            :text "Title")
             (make-instance 'capi:list-panel
                            :items '(1 2 3)))
            :adjust :center)))
 
(capi:apply-in-pane-process 
 row #'(setf capi:layout-y-adjust) :bottom row)
 
(capi:apply-in-pane-process 
 row #'(setf capi:layout-y-adjust) :top row)

This last example shows a row with a stretchable dummy pane between two other elements which are fixed at their minimum size. Try resizing it:

(capi:contain
 (make-instance 'capi:row-layout
                :description 
                (list (make-instance 'capi:push-button
                                     :text "foo")
                      nil
                      (make-instance 'capi:push-button
                                     :text "bar"))
                :ratios '(nil 1 nil)))
See also

column-layout
1.2.1 CAPI elements
5.2 Button panel classes
6 Laying Out CAPI Panes
7 Programming with CAPI Windows
11 Defining Interface Classes - top level windows


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:33:57