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.LayoutManagerstructure 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.Containerusing selfallocation (
Clutter.ActorBox) – theClutter.ActorBoxcontaining 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.Alphacreated 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.AnimationModeor 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.Containerusing selfactor (
Clutter.Actor) – aClutter.Actorchild of containerproperty_name (
str) – the name of the property to getvalue (
GObject.Value) – aGObject.Valuewith the value of the property to get
Gets a property on the
Clutter.LayoutMetacreated by self and attached to a child of containerThe
GObject.Valuemust 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.Containerusing selfactor (
Clutter.Actor) – aClutter.Actorchild of containerproperty_name (
str) – the name of the property to setvalue (
GObject.Value) – aGObject.Valuewith the value of the property to set
Sets a property on the
Clutter.LayoutMetacreated 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.ParamSpecdescribing the property, orNoneif no property with that name exists. The returnedGObject.ParamSpecis owned by the layout manager and should not be modified or freed- Return type:
Retrieves the
GObject.ParamSpecfor the layout property name inside theClutter.LayoutMetasub-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:alphavalueNew in version 1.2.
Deprecated since version 1.12.
- get_child_meta(container, actor)¶
- Parameters:
container (
Clutter.Container) – aClutter.Containerusing selfactor (
Clutter.Actor) – aClutter.Actorchild of container
- Returns:
a
Clutter.LayoutMeta, orNoneif theClutter.LayoutManagerdoes not have layout properties. The returned layout meta instance is owned by theClutter.LayoutManagerand it should not be unreferenced- Return type:
Retrieves the
Clutter.LayoutMetathat the layout self associated to the actor child of container, eventually by creating one if theClutter.LayoutManagersupports layout propertiesNew in version 1.0.
- get_preferred_height(container, for_width)¶
- Parameters:
container (
Clutter.Container) – theClutter.Containerusing 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.Containerusing 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-changedsignal on selfThis function should only be called by implementations of the
Clutter.LayoutManagerclassNew in version 1.2.
- list_child_properties()¶
- Returns:
the newly-allocated,
None-terminated array ofGObject.ParamSpecs. UseGLib.free() to free the resources allocated for the array- Return type:
Retrieves all the
GObject.ParamSpecs for the layout properties stored inside theClutter.LayoutMetasub-class used by selfNew in version 1.2.
- set_container(container)¶
- Parameters:
container (
Clutter.ContainerorNone) – aClutter.Containerusing self
If the
Clutter.LayoutManagersub-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.Containerusing managerallocation (
Clutter.ActorBox) – theClutter.ActorBoxcontaining 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.Alphacreated 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.AnimationModeor 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:alphavalueNew in version 1.2.
Deprecated since version 1.12.
- do_get_child_meta_type() virtual¶
- Return type:
virtual function; override to return the
GObject.GTypeof theClutter.LayoutMetasub-class used by theClutter.LayoutManager
- do_get_preferred_height(container, for_width) virtual¶
- Parameters:
container (
Clutter.Container) – theClutter.Containerusing 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.Containerusing 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-changedsignal on managerThis function should only be called by implementations of the
Clutter.LayoutManagerclassNew in version 1.2.
- do_set_container(container) virtual¶
- Parameters:
container (
Clutter.ContainerorNone) – aClutter.Containerusing manager
If the
Clutter.LayoutManagersub-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-changedsignal is emitted each time a layout manager has been changed. EveryClutter.Actorusing the manager instance as a layout manager should connect a handler to the::layout-changedsignal 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.LayoutManagerthat implement a layout that can be controlled or changed using parameters should emit the::layout-changedsignal whenever one of the parameters changes, by usingClutter.LayoutManager.layout_changed().New in version 1.2.