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.

Hierarchy

hierarchy this GtkConstraint ancestor_0 GObject ancestor_0--this

Ancestors

  • GObject

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_constant

Retrieves the constant factor added to the source attributes’ value.

gtk_constraint_get_multiplier

Retrieves the multiplication factor applied to the source attribute’s value.

gtk_constraint_get_relation

The order relation between the terms of the constraint.

gtk_constraint_get_source

Retrieves the GtkConstraintTarget used as the source for the constraint.

gtk_constraint_get_source_attribute

Retrieves the attribute of the source to be read by the constraint.

gtk_constraint_get_strength

Retrieves the strength of the constraint.

gtk_constraint_get_target

Retrieves the GtkConstraintTarget used as the target for 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:constant

The constant value to be added to the GtkConstraint:source-attribute.

Gtk.Constraint:multiplier

The multiplication factor to be applied to the GtkConstraint:source-attribute.

Gtk.Constraint:relation

The order relation between the terms of the constraint.

Gtk.Constraint:source

The source of the constraint.

Gtk.Constraint:source-attribute

The attribute of the GtkConstraint:source read by the constraint.

Gtk.Constraint:strength

The strength of the constraint.

Gtk.Constraint:target

The target of the constraint.

Gtk.Constraint:target-attribute

The attribute of the GtkConstraint:target set by the constraint.

Class structure

struct GtkConstraintClass {
  GObjectClass parent_class;
  
}
Class members
parent_class
GObjectClass
  No description available.