Generic Function
pane-adjusted-position generic function calculates how to place a pane correctly within a layout, given a minimum and maximum position.
pane-adjusted-position pane adjust min-position max-position
&key &allow-other-keys
pane-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. :topPlace the pane at the top of the region.
:bottomPlace the pane at the bottom of the region.
:leftPlace the pane at the left of the region.
:rightPlace the pane at the right of the region.
:centerPlace the pane in the center of the region.
grid-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.
(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)
layoutx-y-adjustable-layout