Constraint
GtkConstraint
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 class@Gtk.ConstraintLayout 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.
Constructors
Creates a new constraint representing a relation between a layout attribute on a source and a layout attribute on a target.
Creates a new constraint representing a relation between a layout attribute on a target and a constant value.
Properties
The multiplication factor to be applied to the property@Gtk.Constraint:source-attribute.
The order relation between the terms of the constraint.
The source of the constraint.
The attribute of the property@Gtk.Constraint:source read by the constraint.
The target of the constraint.
The attribute of the property@Gtk.Constraint:target set by the constraint.
Functions
Checks whether the constraint is attached to a class@Gtk.ConstraintLayout, and it is contributing to the layout.
Checks whether the constraint describes a relation between an attribute on the property@Gtk.Constraint:target and a constant value.
Checks whether the constraint is a required relation for solving the constraint layout.