1 CAPI Reference Entries

pane-adjusted-offset

Generic Function

Summary

Thepane-adjusted-offset generic function calculates the offset required to place a pane correctly in a layout.

Syntax

pane-adjusted-offset pane adjust available-size actual-size
                     &key &allow-other-keys

Description

This function calculates the offset required by the adjust keyword so that the pane pane is placed correctly within the available space in its parent layout. It is called by all of the layouts that inherit fromx-y-adjustable-layout to interpret the values ofx-adjust andy-adjust. Typically the value of adjust will be one of:

:top
Place the pane at the top of the region.

:bottom
Place the pane at the bottom of the region.

:left
Place the pane at the left of the region.

:right
Place the pane at the right of the region.

:center
Place the pane in the center of the region.

However, new methods can accept alternative values for adjust where required and can also add extra keywords. For example, thegrid-layout allows adjust to be a list of adjust values, and then passes the offset into this list as an additional keyword.

Example

(setq button-panel (make-instance 'capi:button-panel
                                  :items '(1 2 3)))

(capi:pane-adjusted-offset button-panel :center 200 100) (capi:pane-adjusted-offset button-panel :left 200 100)

(capi:pane-adjusted-offset button-panel :right 200 100)

100

See Also

layout
x-y-adjustable-layout


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

Generated with Harlequin WebMaker