It derives from <GObject>.
Describes a constraint between attributes of two widgets, expressed as a linear equation.
The typical equation for a constraint is:
target.target_attr = source.source_attr × multiplier + constant
Each <GtkConstraint> is part of a system that
will be solved by a <GtkConstraintLayout>
in order to allocate and position each child widget or guide.
The source and target, as well as their attributes, of a
<GtkConstraint> instance are immutable after
creation.
The constant value to be added to the constraint:source-attribute.
Its value is a real number.
It can only be set when the object is made, with #:constant.
The multiplication factor to be applied to the constraint:source-attribute.
Its value is a real number.
It can only be set when the object is made, with #:multiplier.
The order relation between the terms of the constraint.
Its value is a <GtkConstraintRelation>
(or, to set it, one of its symbols).
It can only be set when the object is made, with #:relation.
The source of the constraint.
The constraint will set the constraint:target-attribute property of the target
using the constraint:source-attribute property of the source.
Its value is a <GtkConstraintTarget>, or
#f.
It can only be set when the object is made, with #:source.
The attribute of the constraint:source read by the constraint.
Its value is a
<GtkConstraintAttribute> (or, to set
it, one of its symbols).
It can only be set when the object is made, with
#:source-attribute.
The strength of the constraint.
The strength can be expressed either using one of the symbolic values of
the <GtkConstraintStrength>
enumeration, or any positive integer value.
Its value is a 32-bit integer.
It can only be set when the object is made, with #:strength.
The target of the constraint.
The constraint will set the constraint:target-attribute property of the target
using the constraint:source-attribute property of the source
widget.
Its value is a <GtkConstraintTarget>, or
#f.
It can only be set when the object is made, with #:target.
The attribute of the constraint:target set by the constraint.
Its value is a
<GtkConstraintAttribute> (or, to set
it, one of its symbols).
It can only be set when the object is made, with
#:target-attribute.
Retrieves the constant factor added to the source attributes’ value.
Passed: a <GtkConstraint>.
Returned: a real number.
a constant factor
Retrieves the multiplication factor applied to the source attribute’s value.
Passed: a <GtkConstraint>.
Returned: a real number.
a multiplication factor
The order relation between the terms of the constraint.
Passed: a <GtkConstraint>.
Returned: a <GtkConstraintRelation>.
a relation type
Retrieves the <GtkConstraintTarget> used
as the source for the constraint.
If the source is set to NULL at creation, the constraint will use
the widget using the
<GtkConstraintLayout> as the source.
Passed: a <GtkConstraint>.
Returned: a <GtkConstraintTarget>, or
#f.
the source of the constraint
Retrieves the attribute of the source to be read by the constraint.
Passed: a <GtkConstraint>.
Returned: a <GtkConstraintAttribute>.
the source’s attribute
Retrieves the strength of the constraint.
Passed: a <GtkConstraint>.
Returned: a 32-bit integer.
the strength value
Retrieves the <GtkConstraintTarget> used
as the target for the constraint.
If the targe is set to NULL at creation, the constraint will use
the widget using the
<GtkConstraintLayout> as the target.
Passed: a <GtkConstraint>.
Returned: a <GtkConstraintTarget>, or
#f.
Retrieves the attribute of the target to be set by the constraint.
Passed: a <GtkConstraint>.
Returned: a <GtkConstraintAttribute>.
the target’s attribute
Checks whether the constraint is attached to a
<GtkConstraintLayout>, and it is
contributing to the layout.
Passed: a <GtkConstraint>.
Returned: a boolean.
TRUE if the constraint is attached
Checks whether the constraint describes a relation between an attribute
on the constraint:target and a
constant value.
Passed: a <GtkConstraint>.
Returned: a boolean.
TRUE if the constraint is a constant relation
Checks whether the constraint is a required relation for solving the constraint layout.
Passed: a <GtkConstraint>.
Returned: a boolean.
#t if the constraint is required
Creates a new constraint representing a relation between a layout attribute on a source and a layout attribute on a target.
Passed: a <GtkConstraintTarget>, or
#f.
the target of the constraint
Passed: a <GtkConstraintAttribute>, or
one of its symbols.
the attribute of target to be set
Passed: a <GtkConstraintRelation>, or
one of its symbols.
the relation equivalence between target_attribute and
source_attribute
Passed: a <GtkConstraintTarget>, or
#f.
the source of the constraint
Passed: a <GtkConstraintAttribute>, or
one of its symbols.
the attribute of source to be read
Passed: a real number.
a multiplication factor to be applied to source_attribute
Passed: a real number.
a constant factor to be added to source_attribute
Passed: a 32-bit integer.
the strength of the constraint
Returned: a <GtkConstraint>.
the newly created constraint
Creates a new constraint representing a relation between a layout attribute on a target and a constant value.
Passed: a <GtkConstraintTarget>, or
#f.
a the target of the constraint
Passed: a <GtkConstraintAttribute>, or
one of its symbols.
the attribute of target to be set
Passed: a <GtkConstraintRelation>, or
one of its symbols.
the relation equivalence between target_attribute and
constant
Passed: a real number.
a constant factor to be set on target_attribute
Passed: a 32-bit integer.
the strength of the constraint
Returned: a <GtkConstraint>.
the newly created constraint