Gtk.ConstraintGuide¶
class — extends GObject.Object, ConstraintTarget
An invisible layout element in a GtkConstraintLayout.
The GtkConstraintLayout treats guides like widgets. They
can be used as the source or target of a GtkConstraint.
Guides have a minimum, maximum and natural size. Depending on the constraints that are applied, they can act like a guideline that widgets can be aligned to, or like flexible space.
Unlike a GtkWidget, a GtkConstraintGuide will not be drawn.
Constructors¶
new¶
Creates a new GtkConstraintGuide object.
Methods¶
get_max_size¶
Gets the maximum size of guide.
get_min_size¶
Gets the minimum size of guide.
get_name¶
Retrieves the name set using ConstraintGuide.set_name.
get_nat_size¶
Gets the natural size of guide.
get_strength¶
Retrieves the strength set using ConstraintGuide.set_strength.
set_max_size¶
Sets the maximum size of guide.
If guide is attached to a GtkConstraintLayout,
the constraints will be updated to reflect the new size.
Parameters:
width— the new maximum width, or -1 to not change itheight— the new maximum height, or -1 to not change it
set_min_size¶
Sets the minimum size of guide.
If guide is attached to a GtkConstraintLayout,
the constraints will be updated to reflect the new size.
Parameters:
width— the new minimum width, or -1 to not change itheight— the new minimum height, or -1 to not change it
set_name¶
Sets a name for the given GtkConstraintGuide.
The name is useful for debugging purposes.
Parameters:
name— a name for theguide
set_nat_size¶
Sets the natural size of guide.
If guide is attached to a GtkConstraintLayout,
the constraints will be updated to reflect the new size.
Parameters:
width— the new natural width, or -1 to not change itheight— the new natural height, or -1 to not change it
set_strength¶
Sets the strength of the constraint on the natural size of the
given GtkConstraintGuide.
Parameters:
strength— the strength of the constraint
Properties¶
max_height¶
The maximum height of the guide.
max_width¶
The maximum width of the guide.
min_height¶
The minimum height of the guide.
min_width¶
The minimum width of the guide.
name¶
A name that identifies the GtkConstraintGuide, for debugging.
nat_height¶
The preferred, or natural, height of the guide.
nat_width¶
The preferred, or natural, width of the guide.
strength¶
The GtkConstraintStrength to be used for the constraint on
the natural size of the guide.