clutter.Container

clutter.Container — Interface for container actors

Synopsis

class clutter.Container(gobject.GInterface):
    def add(actor, ...)
def remove(actor, ...)
def get_children()
def foreach(callback, callback_data)
def find_child_by_name(name)
def raise_child(actor, sibling)
def lower_child(actor, sibling)
def sort_depth_order()

Signal Prototypes

"actor-added" def callback(container, actor, user_param1, ...)
"actor-removed" def callback(container, actor, user_param1, ...)

Description

clutter.Container is an interface for writing actors containing other actors. It provides a standard API for adding, removing and iterating over the children of a container.

An actor implementing the Container interface is clutter.Group.

Methods

clutter.Container.add

    def add(actor, ...)
actor :an actor to be placed inside the continer
... :zero or more actors to add

The add() method places new, unparented actors inside a clutter.Container.

clutter.Container.remove

    def remove(actor, ...)
actor :an actor to be removed from the continer
... :zero or more actors to remove

The remove() method removes a child from a clutter.Container.

clutter.Container.foreach

    def foreach(callback, callback_data)
callback :a function to be called on each actor
... :data to be passed to the callback

The foreach() method invokes a callback on every child of a clutter.Container.

clutter.Container.raise_child

    def raise_child(actor, sibling)
actor :the actor to raise
sibling :the sibling to raise to, or None

Raises actor at the level of sibling, in the depth ordering. If sibling is None then actor will be raised at the top.

clutter.Container.lower_child

    def lower_child(actor, sibling)
actor :the actor to lower
sibling :the sibling to lower to, or None

Lowers actor at the level of sibling, in the depth ordering. If sibling is None then actor will be lowered at the bottom.

clutter.Container.find_child_by_name

    def find_child_by_name(name)
name :the name of the child

Finds the actor with the given name.

clutter.Container.sort_depth_order

    def sort_depth_order()

Resorts the children of a container according to their depth.

Signals

The "actor-added" clutter.Container Signal

    def callback(container, actor, user_param1, ...)
container :the container that received the signal
actor :the newly added child
user_param1 :the first user parameter (if any) specified with the connect() method
... :additional user parameters (if any)

The "actor-added" signal is emitted when a new actor has been added to the container.

The "actor-removed" clutter.Container Signal

    def callback(container, actor, user_param1, ...)
container :the container that received the signal
actor :the removed child
user_param1 :the first user parameter (if any) specified with the connect() method
... :additional user parameters (if any)

The "actor-removed" signal is emitted when an actor has been removed from the container.