Clutter.LayoutManager¶
- Subclasses:
Clutter.BinLayout
,Clutter.BoxLayout
,Clutter.FixedLayout
,Clutter.FlowLayout
,Clutter.GridLayout
,Clutter.TableLayout
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
dummy |
r |
||
parent_instance |
r |
Class Details¶
- class Clutter.LayoutManager(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
The
Clutter.LayoutManager
structure contains only private data and should be accessed using the provided APINew in version 1.2.
- allocate(container, allocation, flags)¶
- Parameters:
container (
Clutter.Container
) – theClutter.Container
using selfallocation (
Clutter.ActorBox
) – theClutter.ActorBox
containing the allocated area of containerflags (
Clutter.AllocationFlags
) – the allocation flags
Allocates the children of container given an area
See also
Clutter.Actor.allocate
()New in version 1.2.
- begin_animation(duration, mode)¶
- Parameters:
- Returns:
The
Clutter.Alpha
created by the layout manager; the returned instance is owned by the layout manager and should not be unreferenced- Return type:
Begins an animation of duration milliseconds, using the provided easing mode
The easing mode can be specified either as a
Clutter.AnimationMode
or as a logical id returned byClutter.Alpha.register_func
()The result of this function depends on the self implementation
New in version 1.2.
Deprecated since version 1.12.
- child_get_property(container, actor, property_name, value)¶
- Parameters:
container (
Clutter.Container
) – aClutter.Container
using selfactor (
Clutter.Actor
) – aClutter.Actor
child of containerproperty_name (
str
) – the name of the property to getvalue (
GObject.Value
) – aGObject.Value
with the value of the property to get
Gets a property on the
Clutter.LayoutMeta
created by self and attached to a child of containerThe
GObject.Value
must already be initialized to the type of the property and has to be unset withGObject.Value.unset
() after extracting the real value out of itNew in version 1.2.
- child_set_property(container, actor, property_name, value)¶
- Parameters:
container (
Clutter.Container
) – aClutter.Container
using selfactor (
Clutter.Actor
) – aClutter.Actor
child of containerproperty_name (
str
) – the name of the property to setvalue (
GObject.Value
) – aGObject.Value
with the value of the property to set
Sets a property on the
Clutter.LayoutMeta
created by self and attached to a child of containerNew in version 1.2.
- end_animation()¶
Ends an animation started by
Clutter.LayoutManager.begin_animation
()The result of this call depends on the self implementation
New in version 1.2.
Deprecated since version 1.12.
- find_child_property(name)¶
- Parameters:
name (
str
) – the name of the property- Returns:
a
GObject.ParamSpec
describing the property, orNone
if no property with that name exists. The returnedGObject.ParamSpec
is owned by the layout manager and should not be modified or freed- Return type:
Retrieves the
GObject.ParamSpec
for the layout property name inside theClutter.LayoutMeta
sub-class used by selfNew in version 1.2.
- get_animation_progress()¶
- Returns:
the progress of the animation
- Return type:
Retrieves the progress of the animation, if one has been started by
Clutter.LayoutManager.begin_animation
()The returned value has the same semantics of the
Clutter.Alpha
:alpha
valueNew in version 1.2.
Deprecated since version 1.12.
- get_child_meta(container, actor)¶
- Parameters:
container (
Clutter.Container
) – aClutter.Container
using selfactor (
Clutter.Actor
) – aClutter.Actor
child of container
- Returns:
a
Clutter.LayoutMeta
, orNone
if theClutter.LayoutManager
does not have layout properties. The returned layout meta instance is owned by theClutter.LayoutManager
and it should not be unreferenced- Return type:
Retrieves the
Clutter.LayoutMeta
that the layout self associated to the actor child of container, eventually by creating one if theClutter.LayoutManager
supports layout propertiesNew in version 1.0.
- get_preferred_height(container, for_width)¶
- Parameters:
container (
Clutter.Container
) – theClutter.Container
using selffor_width (
float
) – the width for which the height should be computed, or -1
- Returns:
- Return type:
Computes the minimum and natural heights of the container according to self.
See also
Clutter.Actor.get_preferred_height
()New in version 1.2.
- get_preferred_width(container, for_height)¶
- Parameters:
container (
Clutter.Container
) – theClutter.Container
using selffor_height (
float
) – the height for which the width should be computed, or -1
- Returns:
- Return type:
Computes the minimum and natural widths of the container according to self.
See also
Clutter.Actor.get_preferred_width
()New in version 1.2.
- layout_changed()¶
Emits the
Clutter.LayoutManager
::layout-changed
signal on selfThis function should only be called by implementations of the
Clutter.LayoutManager
classNew in version 1.2.
- list_child_properties()¶
- Returns:
the newly-allocated,
None
-terminated array ofGObject.ParamSpec
s. UseGLib.free
() to free the resources allocated for the array- Return type:
Retrieves all the
GObject.ParamSpec
s for the layout properties stored inside theClutter.LayoutMeta
sub-class used by selfNew in version 1.2.
- set_container(container)¶
- Parameters:
container (
Clutter.Container
orNone
) – aClutter.Container
using self
If the
Clutter.LayoutManager
sub-class allows it, allow adding a weak reference of the container using self from within the layout managerThe layout manager should not increase the reference count of the container
New in version 1.2.
- do_allocate(container, allocation, flags) virtual¶
- Parameters:
container (
Clutter.Container
) – theClutter.Container
using managerallocation (
Clutter.ActorBox
) – theClutter.ActorBox
containing the allocated area of containerflags (
Clutter.AllocationFlags
) – the allocation flags
Allocates the children of container given an area
See also
Clutter.Actor.allocate
()New in version 1.2.
- do_begin_animation(duration, mode) virtual¶
- Parameters:
- Returns:
The
Clutter.Alpha
created by the layout manager; the returned instance is owned by the layout manager and should not be unreferenced- Return type:
Begins an animation of duration milliseconds, using the provided easing mode
The easing mode can be specified either as a
Clutter.AnimationMode
or as a logical id returned byClutter.Alpha.register_func
()The result of this function depends on the manager implementation
New in version 1.2.
Deprecated since version 1.12.
- do_end_animation() virtual¶
Ends an animation started by
Clutter.LayoutManager.begin_animation
()The result of this call depends on the manager implementation
New in version 1.2.
Deprecated since version 1.12.
- do_get_animation_progress() virtual¶
- Returns:
the progress of the animation
- Return type:
Retrieves the progress of the animation, if one has been started by
Clutter.LayoutManager.begin_animation
()The returned value has the same semantics of the
Clutter.Alpha
:alpha
valueNew in version 1.2.
Deprecated since version 1.12.
- do_get_child_meta_type() virtual¶
- Return type:
- do_get_preferred_height(container, for_width) virtual¶
- Parameters:
container (
Clutter.Container
) – theClutter.Container
using managerfor_width (
float
) – the width for which the height should be computed, or -1
- Returns:
- Return type:
Computes the minimum and natural heights of the container according to manager.
See also
Clutter.Actor.get_preferred_height
()New in version 1.2.
- do_get_preferred_width(container, for_height) virtual¶
- Parameters:
container (
Clutter.Container
) – theClutter.Container
using managerfor_height (
float
) – the height for which the width should be computed, or -1
- Returns:
- Return type:
Computes the minimum and natural widths of the container according to manager.
See also
Clutter.Actor.get_preferred_width
()New in version 1.2.
- do_layout_changed() virtual¶
Emits the
Clutter.LayoutManager
::layout-changed
signal on managerThis function should only be called by implementations of the
Clutter.LayoutManager
classNew in version 1.2.
- do_set_container(container) virtual¶
- Parameters:
container (
Clutter.Container
orNone
) – aClutter.Container
using manager
If the
Clutter.LayoutManager
sub-class allows it, allow adding a weak reference of the container using manager from within the layout managerThe layout manager should not increase the reference count of the container
New in version 1.2.
Signal Details¶
- Clutter.LayoutManager.signals.layout_changed(layout_manager)¶
- Signal Name:
layout-changed
- Flags:
- Parameters:
layout_manager (
Clutter.LayoutManager
) – The object which received the signal
The
::layout-changed
signal is emitted each time a layout manager has been changed. EveryClutter.Actor
using the manager instance as a layout manager should connect a handler to the::layout-changed
signal and queue a relayout on themselves:static void layout_changed (ClutterLayoutManager *manager, ClutterActor *self) { clutter_actor_queue_relayout (self); } ... self->manager = g_object_ref_sink (manager); g_signal_connect (self->manager, "layout-changed", G_CALLBACK (layout_changed), self);
Sub-classes of
Clutter.LayoutManager
that implement a layout that can be controlled or changed using parameters should emit the::layout-changed
signal whenever one of the parameters changes, by usingClutter.LayoutManager.layout_changed
().New in version 1.2.