Gtk.ConstraintGuide¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.ConstraintGuide(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
GtkConstraintGuide
is an invisible layout element in aGtkConstraintLayout
.The
GtkConstraintLayout
treats guides like widgets. They can be used as the source or target of aGtkConstraint
.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
, aGtkConstraintGuide
will not be drawn.- classmethod new()[source]¶
- Returns:
a new
GtkConstraintGuide
object.- Return type:
Creates a new
GtkConstraintGuide
object.
- get_max_size()[source]¶
- Returns:
- width:
return location for the maximum width
- height:
return location for the maximum height
- Return type:
Gets the maximum size of self.
- get_min_size()[source]¶
- Returns:
- width:
return location for the minimum width
- height:
return location for the minimum height
- Return type:
Gets the minimum size of self.
- get_name()[source]¶
-
Retrieves the name set using
Gtk.ConstraintGuide.set_name
().
- get_nat_size()[source]¶
- Returns:
- width:
return location for the natural width
- height:
return location for the natural height
- Return type:
Gets the natural size of self.
- get_strength()[source]¶
- Returns:
the strength of the constraint on the natural size
- Return type:
Retrieves the strength set using
Gtk.ConstraintGuide.set_strength
().
- set_max_size(width, height)[source]¶
- Parameters:
Sets the maximum size of self.
If self is attached to a
GtkConstraintLayout
, the constraints will be updated to reflect the new size.
- set_min_size(width, height)[source]¶
- Parameters:
Sets the minimum size of self.
If self is attached to a
GtkConstraintLayout
, the constraints will be updated to reflect the new size.
- set_name(name)[source]¶
-
Sets a name for the given
GtkConstraintGuide
.The name is useful for debugging purposes.
- set_nat_size(width, height)[source]¶
- Parameters:
Sets the natural size of self.
If self is attached to a
GtkConstraintLayout
, the constraints will be updated to reflect the new size.
- set_strength(strength)[source]¶
- Parameters:
strength (
Gtk.ConstraintStrength
) – the strength of the constraint
Sets the strength of the constraint on the natural size of the given
GtkConstraintGuide
.
Property Details¶
- Gtk.ConstraintGuide.props.max_height¶
- Name:
max-height
- Type:
- Default Value:
2147483647
- Flags:
The maximum height of the guide.
- Gtk.ConstraintGuide.props.max_width¶
- Name:
max-width
- Type:
- Default Value:
2147483647
- Flags:
The maximum width of the guide.
- Gtk.ConstraintGuide.props.min_height¶
- Name:
min-height
- Type:
- Default Value:
0
- Flags:
The minimum height of the guide.
- Gtk.ConstraintGuide.props.min_width¶
- Name:
min-width
- Type:
- Default Value:
0
- Flags:
The minimum width of the guide.
- Gtk.ConstraintGuide.props.name¶
-
A name that identifies the
GtkConstraintGuide
, for debugging.
- Gtk.ConstraintGuide.props.nat_height¶
- Name:
nat-height
- Type:
- Default Value:
0
- Flags:
The preferred, or natural, height of the guide.
- Gtk.ConstraintGuide.props.nat_width¶
- Name:
nat-width
- Type:
- Default Value:
0
- Flags:
The preferred, or natural, width of the guide.
- Gtk.ConstraintGuide.props.strength¶
- Name:
strength
- Type:
- Default Value:
- Flags:
The
GtkConstraintStrength
to be used for the constraint on the natural size of the guide.