1 CAPI Reference Entries

pane-adjusted-position

Generic Function

Summary

Thepane-adjusted-position generic function calculates how to place a pane correctly within a layout, given a minimum and maximum position.

Syntax

pane-adjusted-position pane adjust min-position max-position
                       &key &allow-other-keys

Description

This function calculates the position required by the adjust keyword so that the pane pane is placed correctly within the available space in its parent layout, given a minimum and maximum position. It is a complementary function topane-adjusted-offset, and the default method actually callspane-adjusted-offset with the gap between the two positions, and then adds on the minimum position to get the new position.

The default method accepts the following values for adjust.

: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. It is preferable to add new methods topane-adjusted-offset as these changes will be seen by the default method ofpane-adjusted-position.

Example

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

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

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

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

See Also

layout
x-y-adjustable-layout


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

Generated with Harlequin WebMaker