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

pane-adjusted-offset Generic Function

Summary

Calculates the offset required to place a pane correctly in a layout.

Package

capi

Signature

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

Arguments
pane
A pane.
adjust
A keyword or a list of keyword and an integer.
available-size
An integer.
actual-size
An integer.
Values
offset
An integer.
Description

The generic function pane-adjusted-offset calculates the offset required by adjust so that the pane pane of size actual-size pixels is placed correctly within available-size pixels in its parent layout. It is called by all of the layouts that inherit from x-y-adjustable-layout to interpret the values of x-adjust and y-adjust.

Typically, adjust will be a keyword or a list of the form (keyword n) where n is an integer. These values of adjust are interpreted as by pane-adjusted-position.

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

Notes
  1. pane-adjusted-offset is deprecated.
  2. Only a keyword value for adjust should be supplied when pane is a column-layout or row-layout.
Examples
(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)
See also

layout
x-y-adjustable-layout


CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42