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

NextPrevUpTopContentsIndex

get-constraints

Function
Summary

Returns the external constraints for an element.

Package

capi

Signature

get-constraints element => min-width , min-height , max-width , max-height

Arguments

element

An instance of simple-pane (or one of its subclasses), or an instance of pinboard-object (or one of its subclasses).

Values

min-width , min-height

Integers specifying the minimum external dimensions of element .

max-width , max-height

Integers specifying the maximum external dimensions of element .

Description

The function get-constraints returns the external constraints for element as multiple values.

The values are the minimum width, the minimum height, the maximum width and the maximum height of the element including borders. A containing layout will use these values when laying out its children.

get-constraints calls the generic function calculate-constraints to calculate these sizes initially, but then just uses the values in the geometry cache for the element. To force an element to take account of its new constraints, call the function invalidate-pane-constraints.

See also

calculate-constraints
define-layout
element
invalidate-pane-constraints
Laying Out CAPI Panes


CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017

NextPrevUpTopContentsIndex