Class: Gtk::Constraint

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(target, target_attribute, relation, constant, strength) ⇒ Gtk::Constraint

Creates a new constraint representing a relation between a layout attribute on a target and a constant value.

Parameters:

  • target (Gtk::ConstraintTarget)

    a the target of the constraint

  • target_attribute (Gtk::ConstraintAttribute)

    the attribute of target to be set

  • relation (Gtk::ConstraintRelation)

    the relation equivalence between target_attribute and constant

  • constant (Float)

    a constant factor to be set on target_attribute

  • strength (Integer)

    the strength of the constraint

Instance Method Details

#constantFloat

The constant value to be added to the [propertyGtk.Constraint:source-attribute].

Returns:

  • (Float)

    constant

#constant=(constant) ⇒ Float

The constant value to be added to the [propertyGtk.Constraint:source-attribute].

Parameters:

  • constant (Float)

Returns:

  • (Float)

    constant

  • (Float)

    constant

#is_attachedBoolean

Checks whether the constraint is attached to a [classGtk.ConstraintLayout], and it is contributing to the layout.

Returns:

  • (Boolean)

    TRUE if the constraint is attached

#is_constantBoolean

Checks whether the constraint describes a relation between an attribute on the [propertyGtk.Constraint:target] and a constant value.

Returns:

  • (Boolean)

    TRUE if the constraint is a constant relation

#is_requiredBoolean

Checks whether the constraint is a required relation for solving the constraint layout.

Returns:

  • (Boolean)

    true if the constraint is required

#multiplierFloat

The multiplication factor to be applied to the [propertyGtk.Constraint:source-attribute].

Returns:

  • (Float)

    multiplier

#multiplier=(multiplier) ⇒ Float

The multiplication factor to be applied to the [propertyGtk.Constraint:source-attribute].

Parameters:

  • multiplier (Float)

Returns:

  • (Float)

    multiplier

  • (Float)

    multiplier

#relationGtk::ConstraintRelation

The order relation between the terms of the constraint.

Returns:

#relation=(relation) ⇒ Gtk::ConstraintRelation

The order relation between the terms of the constraint.

Parameters:

Returns:

#sourceGtk::ConstraintTarget

The source of the constraint.

The constraint will set the [propertyGtk.Constraint:target-attribute] property of the target using the [propertyGtk.Constraint:source-attribute] property of the source.

Returns:

#source=(source) ⇒ Gtk::ConstraintTarget

The source of the constraint.

The constraint will set the [propertyGtk.Constraint:target-attribute] property of the target using the [propertyGtk.Constraint:source-attribute] property of the source.

Parameters:

Returns:

#source_attributeGtk::ConstraintAttribute

The attribute of the [propertyGtk.Constraint:source] read by the constraint.

Returns:

#source_attribute=(source_attribute) ⇒ Gtk::ConstraintAttribute

The attribute of the [propertyGtk.Constraint:source] read by the constraint.

Parameters:

Returns:

#strengthInteger

The strength of the constraint.

The strength can be expressed either using one of the symbolic values of the [enumGtk.ConstraintStrength] enumeration, or any positive integer value.

Returns:

  • (Integer)

    strength

#strength=(strength) ⇒ Integer

The strength of the constraint.

The strength can be expressed either using one of the symbolic values of the [enumGtk.ConstraintStrength] enumeration, or any positive integer value.

Parameters:

  • strength (Integer)

Returns:

  • (Integer)

    strength

  • (Integer)

    strength

#targetGtk::ConstraintTarget

The target of the constraint.

The constraint will set the [propertyGtk.Constraint:target-attribute] property of the target using the [propertyGtk.Constraint:source-attribute] property of the source widget.

Returns:

#target=(target) ⇒ Gtk::ConstraintTarget

The target of the constraint.

The constraint will set the [propertyGtk.Constraint:target-attribute] property of the target using the [propertyGtk.Constraint:source-attribute] property of the source widget.

Parameters:

Returns:

#target_attributeGtk::ConstraintAttribute

The attribute of the [propertyGtk.Constraint:target] set by the constraint.

Returns:

#target_attribute=(target_attribute) ⇒ Gtk::ConstraintAttribute

The attribute of the [propertyGtk.Constraint:target] set by the constraint.

Parameters:

Returns: