Class
GtkConstraint
Description [src]
final class Gtk.Constraint : GObject.Object
{
/* No available fields */
}
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
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.
Constructors
gtk_constraint_new
Creates a new constraint representing a relation between a layout attribute on a source and a layout attribute on a target.
gtk_constraint_new_constant
Creates a new constraint representing a relation between a layout attribute on a target and a constant value.
Instance methods
gtk_constraint_get_multiplier
Retrieves the multiplication factor applied to the source attribute’s value.
gtk_constraint_get_source_attribute
Retrieves the attribute of the source to be read by the constraint.
gtk_constraint_get_target_attribute
Retrieves the attribute of the target to be set by the constraint.
gtk_constraint_is_attached
Checks whether the constraint is attached to a GtkConstraintLayout
,
and it is contributing to the layout.
gtk_constraint_is_constant
Checks whether the constraint describes a relation between an attribute
on the GtkConstraint:target
and a constant value.
gtk_constraint_is_required
Checks whether the constraint is a required relation for solving the constraint layout.
Properties
Gtk.Constraint:multiplier
The multiplication factor to be applied to
the GtkConstraint:source-attribute
.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.