Clutter.BoxLayout

g Clutter.BoxLayout Clutter.BoxLayout Clutter.LayoutManager Clutter.LayoutManager Clutter.LayoutManager->Clutter.BoxLayout GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Clutter.LayoutManager GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

Clutter.LayoutManager (13), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_alignment (actor)

get_easing_duration ()

get_easing_mode ()

get_expand (actor)

get_fill (actor)

get_homogeneous ()

get_orientation ()

get_pack_start ()

get_spacing ()

get_use_animations ()

get_vertical ()

pack (actor, expand, x_fill, y_fill, x_align, y_align)

set_alignment (actor, x_align, y_align)

set_easing_duration (msecs)

set_easing_mode (mode)

set_expand (actor, expand)

set_fill (actor, x_fill, y_fill)

set_homogeneous (homogeneous)

set_orientation (orientation)

set_pack_start (pack_start)

set_spacing (spacing)

set_use_animations (animate)

set_vertical (vertical)

Virtual Methods

Inherited:

Clutter.LayoutManager (9), GObject.Object (7)

Properties

Name

Type

Flags

Short Description

easing-duration

int

r/w

The duration of the animations deprecated

easing-mode

int

r/w

The easing mode of the animations deprecated

homogeneous

bool

r/w

Whether the layout should be homogeneous, i.e. all children get the same size

orientation

Clutter.Orientation

r/w

The orientation of the layout

pack-start

bool

r/w

Whether to pack items at the start of the box

spacing

int

r/w

Spacing between children

use-animations

bool

r/w

Whether layout changes should be animated deprecated

vertical

bool

d/r/w

Whether the layout should be vertical, rather than horizontal deprecated

Signals

Inherited:

Clutter.LayoutManager (1), GObject.Object (1)

Fields

Inherited:

Clutter.LayoutManager (1), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Clutter.LayoutManager

r

Class Details

class Clutter.BoxLayout(**kwargs)
Bases:

Clutter.LayoutManager

Abstract:

No

Structure:

Clutter.BoxLayoutClass

The Clutter.BoxLayout structure contains only private data and should be accessed using the provided API

New in version 1.2.

classmethod new()
Returns:

the newly created Clutter.BoxLayout

Return type:

Clutter.LayoutManager

Creates a new Clutter.BoxLayout layout manager

New in version 1.2.

get_alignment(actor)
Parameters:

actor (Clutter.Actor) – a Clutter.Actor child of self

Returns:

x_align:

return location for the horizontal alignment policy

y_align:

return location for the vertical alignment policy

Return type:

(x_align: Clutter.BoxAlignment, y_align: Clutter.BoxAlignment)

Retrieves the horizontal and vertical alignment policies for actor as set using Clutter.BoxLayout.pack() or Clutter.BoxLayout.set_alignment()

New in version 1.2.

Deprecated since version 1.12: Clutter.BoxLayout will honour Clutter.Actor's Clutter.Actor :x-align and Clutter.Actor :y-align properies

get_easing_duration()
Returns:

the duration of the animations, in milliseconds

Return type:

int

Retrieves the duration set using Clutter.BoxLayout.set_easing_duration()

New in version 1.2.

Deprecated since version 1.12.

get_easing_mode()
Returns:

an easing mode

Return type:

int

Retrieves the easing mode set using Clutter.BoxLayout.set_easing_mode()

New in version 1.2.

Deprecated since version 1.12.

get_expand(actor)
Parameters:

actor (Clutter.Actor) – a Clutter.Actor child of self

Returns:

True if the Clutter.Actor should expand, False otherwise

Return type:

bool

Retrieves whether actor should expand inside self

New in version 1.2.

Deprecated since version 1.12: Clutter.BoxLayout will honour Clutter.Actor's Clutter.Actor :x-expand and Clutter.Actor :y-expand properies

get_fill(actor)
Parameters:

actor (Clutter.Actor) – a Clutter.Actor child of self

Returns:

x_fill:

return location for the horizontal fill policy

y_fill:

return location for the vertical fill policy

Return type:

(x_fill: bool, y_fill: bool)

Retrieves the horizontal and vertical fill policies for actor as set using Clutter.BoxLayout.pack() or Clutter.BoxLayout.set_fill()

New in version 1.2.

Deprecated since version 1.12: Clutter.BoxLayout will honour Clutter.Actor's Clutter.Actor :x-align and Clutter.Actor :y-align properies

get_homogeneous()
Returns:

True if the Clutter.BoxLayout is arranging its children homogeneously, and False otherwise

Return type:

bool

Retrieves if the children sizes are allocated homogeneously.

New in version 1.4.

get_orientation()
Returns:

the orientation of the layout

Return type:

Clutter.Orientation

Retrieves the orientation of the self.

New in version 1.12.

get_pack_start()
Returns:

True if the Clutter.BoxLayout should pack children at the beginning of the layout, and False otherwise

Return type:

bool

Retrieves the value set using Clutter.BoxLayout.set_pack_start()

New in version 1.2.

get_spacing()
Returns:

the spacing between children of the Clutter.BoxLayout

Return type:

int

Retrieves the spacing set using Clutter.BoxLayout.set_spacing()

New in version 1.2.

get_use_animations()
Returns:

True if the animations should be used, False otherwise

Return type:

bool

Retrieves whether self should animate changes in the layout properties.

New in version 1.2.

Deprecated since version 1.12.

get_vertical()
Returns:

True if the Clutter.BoxLayout is arranging its children vertically, and False otherwise

Return type:

bool

Retrieves the orientation of the self as set using the Clutter.BoxLayout.set_vertical() function

New in version 1.2.

Deprecated since version 1.12: Use Clutter.BoxLayout.get_orientation() instead

pack(actor, expand, x_fill, y_fill, x_align, y_align)
Parameters:

Packs actor inside the Clutter.Container associated to self and sets the layout properties

New in version 1.2.

Deprecated since version 1.12: Clutter.BoxLayout honours Clutter.Actor's align and expand properties. The preferred way is adding the actor with Clutter.Actor.add_child() and setting Clutter.Actor :x-align, Clutter.Actor :y-align, Clutter.Actor :x-expand and Clutter.Actor :y-expand

set_alignment(actor, x_align, y_align)
Parameters:

Sets the horizontal and vertical alignment policies for actor inside self

New in version 1.2.

Deprecated since version 1.12: Clutter.BoxLayout will honour Clutter.Actor's Clutter.Actor :x-align and Clutter.Actor :y-align properies

set_easing_duration(msecs)
Parameters:

msecs (int) – the duration of the animations, in milliseconds

Sets the duration of the animations used by self when animating changes in the layout properties.

New in version 1.2.

Deprecated since version 1.12: The layout manager will honour the easing state of the children when allocating them.

set_easing_mode(mode)
Parameters:

mode (int) – an easing mode, either from Clutter.AnimationMode or a logical id from Clutter.Alpha.register_func()

Sets the easing mode to be used by self when animating changes in layout properties.

New in version 1.2.

Deprecated since version 1.12: The layout manager will honour the easing state of the children when allocating them.

set_expand(actor, expand)
Parameters:

Sets whether actor should expand inside self

New in version 1.2.

Deprecated since version 1.12: Clutter.BoxLayout will honour Clutter.Actor's Clutter.Actor :x-expand and Clutter.Actor :y-expand properies

set_fill(actor, x_fill, y_fill)
Parameters:
  • actor (Clutter.Actor) – a Clutter.Actor child of self

  • x_fill (bool) – whether actor should fill horizontally the allocated space

  • y_fill (bool) – whether actor should fill vertically the allocated space

Sets the horizontal and vertical fill policies for actor inside self

New in version 1.2.

Deprecated since version 1.12: Clutter.BoxLayout will honour Clutter.Actor's Clutter.Actor :x-align and Clutter.Actor :y-align properies

set_homogeneous(homogeneous)
Parameters:

homogeneous (bool) – True if the layout should be homogeneous

Sets whether the size of self children should be homogeneous

New in version 1.4.

set_orientation(orientation)
Parameters:

orientation (Clutter.Orientation) – the orientation of the Clutter.BoxLayout

Sets the orientation of the Clutter.BoxLayout layout manager.

New in version 1.12.

set_pack_start(pack_start)
Parameters:

pack_start (bool) – True if the self should pack children at the beginning of the layout

Sets whether children of self should be layed out by appending them or by prepending them

New in version 1.2.

set_spacing(spacing)
Parameters:

spacing (int) – the spacing between children of the layout, in pixels

Sets the spacing between children of self

New in version 1.2.

set_use_animations(animate)
Parameters:

animate (bool) – True if the self should use animations

Sets whether self should animate changes in the layout properties

The duration of the animations is controlled by Clutter.BoxLayout.set_easing_duration(); the easing mode to be used by the animations is controlled by Clutter.BoxLayout.set_easing_mode().

Enabling animations will override the easing state of each child of the actor using self, and will use the Clutter.BoxLayout :easing-mode and Clutter.BoxLayout :easing-duration properties instead.

New in version 1.2.

Deprecated since version 1.12: The layout manager will honour the easing state of the children when allocating them.

set_vertical(vertical)
Parameters:

vertical (bool) – True if the layout should be vertical

Sets whether self should arrange its children vertically alongside the Y axis, instead of horizontally alongside the X axis

New in version 1.2.

Deprecated since version 1.12: Use Clutter.BoxLayout.set_orientation() instead.

Property Details

Clutter.BoxLayout.props.easing_duration
Name:

easing-duration

Type:

int

Default Value:

500

Flags:

READABLE, WRITABLE

The duration of the animations, in case Clutter.BoxLayout :use-animations is set to True.

The duration is expressed in milliseconds.

New in version 1.2.

Deprecated since version 1.12: The Clutter.BoxLayout will honour the easing state of the children when allocating them.

Clutter.BoxLayout.props.easing_mode
Name:

easing-mode

Type:

int

Default Value:

6

Flags:

READABLE, WRITABLE

The easing mode for the animations, in case Clutter.BoxLayout :use-animations is set to True.

The easing mode has the same semantics of Clutter.Animation :mode: it can either be a value from the Clutter.AnimationMode enumeration, like Clutter.AnimationMode.EASE_OUT_CUBIC, or a logical id as returned by Clutter.Alpha.register_func().

The default value is Clutter.AnimationMode.EASE_OUT_CUBIC.

New in version 1.2.

Deprecated since version 1.12: The Clutter.BoxLayout will honour the easing state of the children when allocating them.

Clutter.BoxLayout.props.homogeneous
Name:

homogeneous

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the Clutter.BoxLayout should arrange its children homogeneously, i.e. all children get the same size

New in version 1.4.

Clutter.BoxLayout.props.orientation
Name:

orientation

Type:

Clutter.Orientation

Default Value:

Clutter.Orientation.HORIZONTAL

Flags:

READABLE, WRITABLE

The orientation of the Clutter.BoxLayout, either horizontal or vertical

New in version 1.12.

Clutter.BoxLayout.props.pack_start
Name:

pack-start

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the Clutter.BoxLayout should pack items at the start or append them at the end

New in version 1.2.

Clutter.BoxLayout.props.spacing
Name:

spacing

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The spacing between children of the Clutter.BoxLayout, in pixels

New in version 1.2.

Clutter.BoxLayout.props.use_animations
Name:

use-animations

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the Clutter.BoxLayout should animate changes in the layout, overriding the easing state of the children.

New in version 1.2.

Deprecated since version 1.12: Clutter.BoxLayout will honour the easing state of the children when allocating them.

Clutter.BoxLayout.props.vertical
Name:

vertical

Type:

bool

Default Value:

False

Flags:

DEPRECATED, READABLE, WRITABLE

Whether the Clutter.BoxLayout should arrange its children alongside the Y axis, instead of alongside the X axis

New in version 1.2.

Deprecated since version 1.12: Use Clutter.BoxLayout :orientation instead.