Layout constraints contain properties that are used by the layouts to figure out the size and position of elements. Each BlElement
Object << #BlElement
traits: {TBlTransformable + TBlEventTarget + TBlDebug};
slots: {
#spaceReference .
#parent .
#children .
#bounds .
#measuredBounds .
#boundsCache .
#eventDispatcher .
#constraints .
#layout .
#transformation .
#taskQueue .
#errorHandler .
#userData .
#visuals .
#flags .
#theme };
tag: 'Core';
package: 'Bloc'
has common layout constraits that contain properties common to all layouts.
BlElement>>#constraints
constraints
"Return layout constraints object which is used by the layout strategy.
constraints can not be nil.
@see BlElement>>#constraintsDo: for more convenient method to update constraints,
as it requests layout update."
<return: #BlLayoutConstraints>
^ constraints
allows users to get a reference to the constraints of an element:
BlElement new constraints
The following snippet shows how to create a new instance of the common constraints.
BlLayoutCommonConstraints new