Clutter.GridLayout¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
If |
||
r/w |
The amount of space between two consecutive columns |
||
r/w |
The orientation of the layout |
||
r/w |
If |
||
r/w |
The amount of space between two consecutive rows |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Clutter.GridLayout(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Clutter.GridLayout
structure contains only private data and should be accessed using the provided APINew in version 1.12.
- classmethod new()¶
- Returns:
the new
Clutter.GridLayout
- Return type:
Creates a new
Clutter.GridLayout
- attach(child, left, top, width, height)¶
- Parameters:
child (
Clutter.Actor
) – theClutter.Actor
to addleft (
int
) – the column number to attach the left side of child totop (
int
) – the row number to attach the top side of child towidth (
int
) – the number of columns that child will spanheight (
int
) – the number of rows that child will span
Adds a widget to the grid.
The position of child is determined by left and top. The number of ‘cells’ that child will occupy is determined by width and height.
New in version 1.12.
- attach_next_to(child, sibling, side, width, height)¶
- Parameters:
child (
Clutter.Actor
) – the actor to addsibling (
Clutter.Actor
orNone
) – the child of self that child will be placed next to, orNone
to place child at the beginning or endside (
Clutter.GridPosition
) – the side of sibling that child is positioned next towidth (
int
) – the number of columns that child will spanheight (
int
) – the number of rows that child will span
Adds a actor to the grid.
The actor is placed next to sibling, on the side determined by side. When sibling is
None
, the actor is placed in row (for left or right placement) or column 0 (for top or bottom placement), at the end indicated by side.Attaching widgets labeled [1], [2], [3] with sibling ==
None
and side ==Clutter.GridPosition.LEFT
yields a layout of ‘3 [2]’[1].New in version 1.12.
- get_child_at(left, top)¶
- Parameters:
- Returns:
the child at the given position, or
None
- Return type:
Gets the child of self whose area covers the grid cell whose upper left corner is at left, top.
New in version 1.12.
- get_column_homogeneous()¶
- Returns:
whether all columns of self have the same width.
- Return type:
Returns whether all columns of self have the same width.
- get_column_spacing()¶
- Returns:
the spacing between coluns of self
- Return type:
Retrieves the spacing set using
Clutter.GridLayout.set_column_spacing
()New in version 1.12.
- get_orientation()¶
- Returns:
the orientation of the layout
- Return type:
Retrieves the orientation of the self.
New in version 1.12.
- get_row_homogeneous()¶
- Returns:
whether all rows of self have the same height.
- Return type:
Returns whether all rows of self have the same height.
New in version 1.12.
- get_row_spacing()¶
- Returns:
the spacing between rows of self
- Return type:
Retrieves the spacing set using
Clutter.GridLayout.set_row_spacing
()New in version 1.12.
- insert_column(position)¶
- Parameters:
position (
int
) – the position to insert the column at
Inserts a column at the specified position.
Children which are attached at or to the right of this position are moved one column to the right. Children which span across this position are grown to span the new column.
New in version 1.12.
- insert_next_to(sibling, side)¶
- Parameters:
sibling (
Clutter.Actor
) – the child of self that the new row or column will be placed next toside (
Clutter.GridPosition
) – the side of sibling that child is positioned next to
Inserts a row or column at the specified position.
The new row or column is placed next to sibling, on the side determined by side. If side is
Clutter.GridPosition.LEFT
orClutter.GridPosition.BOTTOM
, a row is inserted. If side isClutter.GridPosition.LEFT
ofClutter.GridPosition.RIGHT
, a column is inserted.New in version 1.12.
- insert_row(position)¶
- Parameters:
position (
int
) – the position to insert the row at
Inserts a row at the specified position.
Children which are attached at or below this position are moved one row down. Children which span across this position are grown to span the new row.
New in version 1.12.
- set_column_homogeneous(homogeneous)¶
-
Sets whether all columns of self will have the same width.
New in version 1.12.
- set_column_spacing(spacing)¶
- Parameters:
spacing (
int
) – the spacing between columns of the layout, in pixels
Sets the spacing between columns of self
New in version 1.12.
- set_orientation(orientation)¶
- Parameters:
orientation (
Clutter.Orientation
) – the orientation of theClutter.GridLayout
Sets the orientation of the self.
Clutter.GridLayout
uses the orientation as a hint when adding children to theClutter.Actor
using it as a layout manager viaClutter.Actor.add_child
(); changing this value will not have any effect on children that are already part of the layout.New in version 1.12.
- set_row_homogeneous(homogeneous)¶
-
Sets whether all rows of self will have the same height.
New in version 1.12.
Property Details¶
- Clutter.GridLayout.props.column_homogeneous¶
-
Whether all columns of the layout should have the same width
New in version 1.12.
- Clutter.GridLayout.props.column_spacing¶
-
The amount of space in pixels between two consecutive columns
New in version 1.12.
- Clutter.GridLayout.props.orientation¶
- Name:
orientation
- Type:
- Default Value:
- Flags:
The orientation of the layout, either horizontal or vertical
New in version 1.12.
- Clutter.GridLayout.props.row_homogeneous¶
-
Whether all rows of the layout should have the same height
New in version 1.12.