Class
GtkConstraint
since: 4.0
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.
Available since: 4.0
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.
since: 4.0
gtk_constraint_new_constant
Creates a new constraint representing a relation between a layout attribute on a target and a constant value.
since: 4.0
Instance methods
gtk_constraint_get_constant
Retrieves the constant factor added to the source attributes’ value.
since: 4.0
gtk_constraint_get_multiplier
Retrieves the multiplication factor applied to the source attribute’s value.
since: 4.0
gtk_constraint_get_source
Retrieves the GtkConstraintTarget
used as the source for the constraint.
since: 4.0
gtk_constraint_get_source_attribute
Retrieves the attribute of the source to be read by the constraint.
since: 4.0
gtk_constraint_get_target
Retrieves the GtkConstraintTarget
used as the target for
the constraint.
since: 4.0
gtk_constraint_get_target_attribute
Retrieves the attribute of the target to be set by the constraint.
since: 4.0
gtk_constraint_is_attached
Checks whether the constraint is attached to a GtkConstraintLayout
,
and it is contributing to the layout.
since: 4.0
gtk_constraint_is_constant
Checks whether the constraint describes a relation between an attribute
on the GtkConstraint:target
and a constant value.
since: 4.0
gtk_constraint_is_required
Checks whether the constraint is a required relation for solving the constraint layout.
since: 4.0
Properties
Gtk.Constraint:constant
The constant value to be added to the GtkConstraint:source-attribute
.
since: 4.0
Gtk.Constraint:multiplier
The multiplication factor to be applied to
the GtkConstraint:source-attribute
.
since: 4.0
Gtk.Constraint:source-attribute
The attribute of the GtkConstraint:source
read by the constraint.
since: 4.0
Gtk.Constraint:target-attribute
The attribute of the GtkConstraint:target
set by the constraint.
since: 4.0
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.
since: 2.0