Class: Clutter::GridLayout

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

Overview

The Clutter::GridLayoutClass structure contains only private data and should be accessed using the provided API

Instance Method Summary collapse

Methods inherited from LayoutManager

#allocate, #animation_progress, #begin_animation, #child_get, #child_get_property, #child_set, #child_set_property, #container=, #end_animation, #find_child_property, #get_child_meta, #get_preferred_height, #get_preferred_width, #layout_changed, #list_child_properties

Constructor Details

#initializeClutter::LayoutManager

Creates a new Clutter::GridLayout

Instance Method Details

#attach(child, left, top, width, height) ⇒ nil

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.

Parameters:

  • child (Clutter::Actor)

    the Clutter::Actor to add

  • left (Integer)

    the column number to attach the left side of child to

  • top (Integer)

    the row number to attach the top side of child to

  • width (Integer)

    the number of columns that child will span

  • height (Integer)

    the number of rows that child will span

Returns:

  • (nil)

#attach_next_to(child, sibling, side, width, height) ⇒ nil

Adds a actor to the grid.

The actor is placed next to sibling, on the side determined by side. When sibling is nil, 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 == nil and side == %CLUTTER_GRID_POSITION_LEFT yields a layout of [3][2][1].

Parameters:

  • child (Clutter::Actor)

    the actor to add

  • sibling (Clutter::Actor)

    the child of layout that child will be placed next to, or nil to place child at the beginning or end

  • side (Clutter::GridPosition)

    the side of sibling that child is positioned next to

  • width (Integer)

    the number of columns that child will span

  • height (Integer)

    the number of rows that child will span

Returns:

  • (nil)

#column_homogeneousBoolean

Returns whether all columns of layout have the same width.

Returns:

  • (Boolean)

    whether all columns of layout have the same width.

#column_homogeneous=(column_homogeneous) ⇒ Boolean

Whether all columns of the layout should have the same width

Parameters:

  • column_homogeneous (Boolean)

Returns:

  • (Boolean)

    column-homogeneous

  • (Boolean)

    column-homogeneous

#column_homogeneous?Boolean

Whether all columns of the layout should have the same width

Returns:

  • (Boolean)

    column-homogeneous

#column_spacingInteger

The amount of space in pixels between two consecutive columns

Returns:

  • (Integer)

    column-spacing

#column_spacing=(column_spacing) ⇒ Integer

The amount of space in pixels between two consecutive columns

Parameters:

  • column_spacing (Integer)

Returns:

  • (Integer)

    column-spacing

  • (Integer)

    column-spacing

#get_child_at(left, top) ⇒ Clutter::Actor

Gets the child of layout whose area covers the grid cell whose upper left corner is at left, top.

Parameters:

  • left (Integer)

    the left edge of the cell

  • top (Integer)

    the top edge of the cell

Returns:

#insert_column(position) ⇒ nil

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.

Parameters:

  • position (Integer)

    the position to insert the column at

Returns:

  • (nil)

#insert_next_to(sibling, side) ⇒ nil

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_GRID_POSITION_LEFT or %CLUTTER_GRID_POSITION_BOTTOM, a row is inserted. If side is %CLUTTER_GRID_POSITION_LEFT of %CLUTTER_GRID_POSITION_RIGHT, a column is inserted.

Parameters:

  • sibling (Clutter::Actor)

    the child of layout that the new row or column will be placed next to

  • side (Clutter::GridPosition)

    the side of sibling that child is positioned next to

Returns:

  • (nil)

#insert_row(position) ⇒ nil

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.

Parameters:

  • position (Integer)

    the position to insert the row at

Returns:

  • (nil)

#orientationClutter::Orientation

The orientation of the layout, either horizontal or vertical

Returns:

#orientation=(orientation) ⇒ Clutter::Orientation

The orientation of the layout, either horizontal or vertical

Parameters:

Returns:

#row_homogeneousBoolean

Returns whether all rows of layout have the same height.

Returns:

  • (Boolean)

    whether all rows of layout have the same height.

#row_homogeneous=(row_homogeneous) ⇒ Boolean

Whether all rows of the layout should have the same height

Parameters:

  • row_homogeneous (Boolean)

Returns:

  • (Boolean)

    row-homogeneous

  • (Boolean)

    row-homogeneous

#row_homogeneous?Boolean

Whether all rows of the layout should have the same height

Returns:

  • (Boolean)

    row-homogeneous

#row_spacingInteger

The amount of space in pixels between two consecutive rows

Returns:

  • (Integer)

    row-spacing

#row_spacing=(row_spacing) ⇒ Integer

The amount of space in pixels between two consecutive rows

Parameters:

  • row_spacing (Integer)

Returns:

  • (Integer)

    row-spacing

  • (Integer)

    row-spacing