cluttermm: Clutter::Container Class Reference

Inheritance diagram for Clutter::Container:
Collaboration diagram for Clutter::Container:

Public Types

typedef sigc::slot< void,

const Glib::RefPtr< Actor >& > 
SlotForEach
 For instance, void on_foreach(const Glib::RefPtr<Actor>& actor) More...

 

Public Member Functions

virtual ~Container ()
 
ClutterContainer* gobj ()
 Provides access to the underlying C GObject. More...

 
const ClutterContainer* gobj () const
 Provides access to the underlying C GObject. More...

 
void add_actor (const Glib::RefPtr< Actor >& actor)
 Adds a Clutter::Actor to container. More...

 
void remove_actor (const Glib::RefPtr< Actor >& actor)
 Removes actor from container. More...

 
std::vector< Glib::RefPtr

< Actor > > 
get_children ()
 
std::vector< Glib::RefPtr

< const Actor > > 
get_children () const
 
void lower_child (const Glib::RefPtr< Actor >& actor, const Glib::RefPtr< Actor >& sibling)
 Lowers actor to sibling level, in the depth ordering. More...

 
void lower_child (const Glib::RefPtr< Actor >& actor)
 
void raise_child (const Glib::RefPtr< Actor >& actor, const Glib::RefPtr< Actor >& sibling)
 Raises actor to sibling level, in the depth ordering. More...

 
void raise_child (const Glib::RefPtr< Actor >& actor)
 
Glib::RefPtr< Actorfind_child (const Glib::ustring& child_name)
 Finds a child actor of a container by its name. More...

 
Glib::RefPtr< const Actorfind_child (const Glib::ustring& child_name) const
 Finds a child actor of a container by its name. More...

 
void foreach (const SlotForEach& slot)
 
template<class PropertyType >
void set_child_property (const Glib::RefPtr< Actor >& child, const Glib::ustring& property_name, const PropertyType& value)
 
void set_child_property_value (const Glib::RefPtr< Actor >& child, const Glib::ustring& property_name, const Glib::ValueBase& value)
 Sets a container-specific property on a child of container. More...

 
template<class PropertyType >
void get_child_property (const Glib::RefPtr< const Actor >& child, const Glib::ustring& property_name, PropertyType& value) const
 
void get_child_property_value (const Glib::RefPtr< const Actor >& child, const Glib::ustring& property_name, Glib::ValueBase& value) const
 
Glib::RefPtr< ChildMetaget_child_meta (const Glib::RefPtr< const Actor >& actor)
 Retrieves the Clutter::ChildMeta which contains the data about the container specific state for actor. More...

 
Glib::RefPtr< const ChildMetaget_child_meta (const Glib::RefPtr< const Actor >& actor) const
 Retrieves the Clutter::ChildMeta which contains the data about the container specific state for actor. More...

 
Glib::SignalProxy1< void,

const Glib::RefPtr< Actor >& > 
signal_actor_added ()
 
Glib::SignalProxy1< void,

const Glib::RefPtr< Actor >& > 
signal_actor_removed ()
 
Glib::SignalProxy2< void,

const Glib::RefPtr< Actor >

&, GParamSpec* > 
signal_child_notify ()
 

Static Public Member Functions

static void add_interface (GType gtype_implementer)
 
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...

 

Protected Member Functions

 Container ()
 You should derive from this class to use it. More...

 
void sort_depth_order ()
 Sorts a container's children using their depth. More...

 
virtual void add_vfunc (const Glib::RefPtr< Actor >& actor)
 
virtual void remove_vfunc (const Glib::RefPtr< Actor >& actor)
 
virtual void raise_vfunc (const Glib::RefPtr< Actor >& actor, const Glib::RefPtr< Actor >& sibling)
 
virtual void lower_vfunc (const Glib::RefPtr< Actor >& actor, const Glib::RefPtr< Actor >& sibling)
 
virtual void sort_depth_order_vfunc ()
 
virtual void foreach_vfunc (ClutterCallback callback, gpointer user_data)
 
void actor_added (const Glib::RefPtr< Actor >& actor)
 Emit signal_actor_added(). More...

 
void actor_removed (const Glib::RefPtr< Actor >& actor)
 Emit signal_actor_removed(). More...

 
virtual void create_child_meta_vfunc (const Glib::RefPtr< Actor >& actor)
 
virtual void destroy_child_meta_vfunc (const Glib::RefPtr< Actor >& actor)
 
virtual Glib::RefPtr< ChildMetaget_child_meta_vfunc (const Glib::RefPtr< Actor >& actor)
 
virtual void on_actor_added (const Glib::RefPtr< Actor >& actor)
 This is a default handler for the signal signal_actor_added(). More...

 
virtual void on_actor_removed (const Glib::RefPtr< Actor >& actor)
 This is a default handler for the signal signal_actor_removed(). More...

 
virtual void on_child_notify (const Glib::RefPtr< Actor >& actor, GParamSpec* pspec)
 This is a default handler for the signal signal_child_notify(). More...

 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Clutter::Containerwrap (ClutterContainer* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...

 

Member Typedef Documentation

typedef sigc::slot<void, const Glib::RefPtr<Actor>&> Clutter::Container::SlotForEach

For instance, void on_foreach(const Glib::RefPtr<Actor>& actor)

Deprecated:
See foreach().

Constructor & Destructor Documentation

Clutter::Container::Container ( )
protected

You should derive from this class to use it.

virtual Clutter::Container::~Container ( )
virtual

Member Function Documentation

void Clutter::Container::actor_added ( const Glib::RefPtr< Actor >&  actor)
protected
void Clutter::Container::actor_removed ( const Glib::RefPtr< Actor >&  actor)
protected
void Clutter::Container::add_actor ( const Glib::RefPtr< Actor >&  actor)

Adds a Clutter::Actor to container.

This function will emit the "actor-added" signal. The actor should be parented to container. You cannot add a Clutter::Actor to more than one Clutter::Container.

This function will call Clutter::ContainerIface.add(), which is a deprecated virtual function. The default implementation will call Clutter::Actor::add_child().

Virtual: add

Since cluttermm 0.4:

Deprecated: 1.10: Use Clutter::Actor::add_child() instead.

Deprecated:
Use Actor::add_child() instead.
Parameters
actorThe first Clutter::Actor to add.
static void Clutter::Container::add_interface ( GType  gtype_implementer)
static
virtual void Clutter::Container::add_vfunc ( const Glib::RefPtr< Actor >&  actor)
protectedvirtual
virtual void Clutter::Container::create_child_meta_vfunc ( const Glib::RefPtr< Actor >&  actor)
protectedvirtual
virtual void Clutter::Container::destroy_child_meta_vfunc ( const Glib::RefPtr< Actor >&  actor)
protectedvirtual
Glib::RefPtr<Actor> Clutter::Container::find_child ( const Glib::ustring child_name)

Finds a child actor of a container by its name.

Search recurses into any child container.

Since cluttermm 0.6:
Parameters
child_nameThe name of the requested child.
Returns
The child actor with the requested name, or 0 if no actor with that name was found.
Glib::RefPtr<const Actor> Clutter::Container::find_child ( const Glib::ustring child_name) const

Finds a child actor of a container by its name.

Search recurses into any child container.

Since cluttermm 0.6:
Parameters
child_nameThe name of the requested child.
Returns
The child actor with the requested name, or 0 if no actor with that name was found.
void Clutter::Container::foreach ( const SlotForEach slot)
Deprecated:
Use Actor::get_first_child() or Actor::get_last_child() to retrieve the beginning of the list of children, and Actor::get_next_sibling() and Actor::get_previous_sibling() to iterate over it. Alternatively, use the ActorIter API.
virtual void Clutter::Container::foreach_vfunc ( ClutterCallback  callback,
gpointer  user_data 
)
protectedvirtual
Glib::RefPtr<ChildMeta> Clutter::Container::get_child_meta ( const Glib::RefPtr< const Actor >&  actor)

Retrieves the Clutter::ChildMeta which contains the data about the container specific state for actor.

Since cluttermm 0.8:
Parameters
actorA Clutter::Actor that is a child of container.
Returns
The Clutter::ChildMeta for the actor child of container or 0 if the specifiec actor does not exist or the container is not configured to provide Clutter::ChildMetas.
Glib::RefPtr<const ChildMeta> Clutter::Container::get_child_meta ( const Glib::RefPtr< const Actor >&  actor) const

Retrieves the Clutter::ChildMeta which contains the data about the container specific state for actor.

Since cluttermm 0.8:
Parameters
actorA Clutter::Actor that is a child of container.
Returns
The Clutter::ChildMeta for the actor child of container or 0 if the specifiec actor does not exist or the container is not configured to provide Clutter::ChildMetas.
virtual Glib::RefPtr<ChildMeta> Clutter::Container::get_child_meta_vfunc ( const Glib::RefPtr< Actor >&  actor)
protectedvirtual
template <class PropertyType >
void Clutter::Container::get_child_property ( const Glib::RefPtr< const Actor >&  child,
const Glib::ustring property_name,
PropertyType &  value 
) const
inline
void Clutter::Container::get_child_property_value ( const Glib::RefPtr< const Actor >&  child,
const Glib::ustring property_name,
Glib::ValueBase value 
) const
std::vector<Glib::RefPtr<Actor> > Clutter::Container::get_children ( )
std::vector<Glib::RefPtr<const Actor> > Clutter::Container::get_children ( ) const
static GType Clutter::Container::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

ClutterContainer* Clutter::Container::gobj ( )
inline

Provides access to the underlying C GObject.

const ClutterContainer* Clutter::Container::gobj ( ) const
inline

Provides access to the underlying C GObject.

void Clutter::Container::lower_child ( const Glib::RefPtr< Actor >&  actor,
const Glib::RefPtr< Actor >&  sibling 
)

Lowers actor to sibling level, in the depth ordering.

This function calls the Clutter::ContainerIface.lower() virtual function, which has been deprecated. The default implementation will call Clutter::Actor::set_child_below_sibling().

Virtual: lower

Since cluttermm 0.6:

Deprecated: 1.10: Use Clutter::Actor::set_child_below_sibling() instead.

Deprecated:
Use set_child_below_sibling() instead.
Parameters
actorThe actor to raise.
siblingThe sibling to lower to, or 0 to lower to the bottom.
void Clutter::Container::lower_child ( const Glib::RefPtr< Actor >&  actor)
Deprecated:
"Use set_child_below_sibling() instead.
virtual void Clutter::Container::lower_vfunc ( const Glib::RefPtr< Actor >&  actor,
const Glib::RefPtr< Actor >&  sibling 
)
protectedvirtual
virtual void Clutter::Container::on_actor_added ( const Glib::RefPtr< Actor >&  actor)
protectedvirtual

This is a default handler for the signal signal_actor_added().

virtual void Clutter::Container::on_actor_removed ( const Glib::RefPtr< Actor >&  actor)
protectedvirtual

This is a default handler for the signal signal_actor_removed().

virtual void Clutter::Container::on_child_notify ( const Glib::RefPtr< Actor >&  actor,
GParamSpec *  pspec 
)
protectedvirtual

This is a default handler for the signal signal_child_notify().

void Clutter::Container::raise_child ( const Glib::RefPtr< Actor >&  actor,
const Glib::RefPtr< Actor >&  sibling 
)

Raises actor to sibling level, in the depth ordering.

This function calls the Clutter::ContainerIface.raise() virtual function, which has been deprecated. The default implementation will call Clutter::Actor::set_child_above_sibling().

Virtual: raise

Since cluttermm 0.6:

Deprecated: 1.10: Use Clutter::Actor::set_child_above_sibling() instead.

Deprecated:
Use set_child_above_sibling() instead.
Parameters
actorThe actor to raise.
siblingThe sibling to raise to, or 0 to raise to the top.
void Clutter::Container::raise_child ( const Glib::RefPtr< Actor >&  actor)
Deprecated:
"Use set_child_above_sibling() instead.
virtual void Clutter::Container::raise_vfunc ( const Glib::RefPtr< Actor >&  actor,
const Glib::RefPtr< Actor >&  sibling 
)
protectedvirtual
void Clutter::Container::remove_actor ( const Glib::RefPtr< Actor >&  actor)

Removes actor from container.

The actor should be unparented, so if you want to keep it around you must hold a reference to it yourself, using Glib::object_ref(). When the actor has been removed, the "actor-removed" signal is emitted by container.

This function will call Clutter::ContainerIface.remove(), which is a deprecated virtual function. The default implementation will call Clutter::Actor::remove_child().

Virtual: remove

Since cluttermm 0.4:

Deprecated: 1.10: Use Clutter::Actor::remove_child() instead.

Deprecated:
Use Actor::remove_child() instead.
Parameters
actorA Clutter::Actor.
virtual void Clutter::Container::remove_vfunc ( const Glib::RefPtr< Actor >&  actor)
protectedvirtual
template <class PropertyType >
void Clutter::Container::set_child_property ( const Glib::RefPtr< Actor >&  child,
const Glib::ustring property_name,
const PropertyType &  value 
)
inline
void Clutter::Container::set_child_property_value ( const Glib::RefPtr< Actor >&  child,
const Glib::ustring property_name,
const Glib::ValueBase value 
)

Sets a container-specific property on a child of container.

Since cluttermm 0.8:
Parameters
childA Clutter::Actor that is a child of container.
propertyThe name of the property to set.
valueThe value.
Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > Clutter::Container::signal_actor_added ( )
Slot Prototype:
void on_my_actor_added(const Glib::RefPtr<Actor>& actor)

The signal_actor_added() signal is emitted each time an actor has been added to container.

Since cluttermm 0.4:
Parameters
actorThe new child that has been added to container.
Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > Clutter::Container::signal_actor_removed ( )
Slot Prototype:
void on_my_actor_removed(const Glib::RefPtr<Actor>& actor)

The signal_actor_removed() signal is emitted each time an actor is removed from container.

Since cluttermm 0.4:
Parameters
actorThe child that has been removed from container.
Glib::SignalProxy2< void,const Glib::RefPtr<Actor>&,GParamSpec* > Clutter::Container::signal_child_notify ( )
Slot Prototype:
void on_my_child_notify(const Glib::RefPtr<Actor>& actor, GParamSpec* pspec)

The signal_child_notify() signal is emitted each time a property is being set through the Clutter::Container::child_set() and Clutter::Container::child_set_property() calls.

Since cluttermm 0.8:
Parameters
actorThe child that has had a property set.
pspecThe ParamSpec of the property set.
void Clutter::Container::sort_depth_order ( )
protected

Sorts a container's children using their depth.

This function should not be normally used by applications.

Since cluttermm 0.6:

Deprecated: 1.10: The Clutter::ContainerIface.sort_depth_order() virtual function should not be used any more; the default implementation in Clutter::Container does not do anything.

Deprecated:
This no longer does anything.
virtual void Clutter::Container::sort_depth_order_vfunc ( )
protectedvirtual

Friends And Related Function Documentation

Glib::RefPtr< Clutter::Container > wrap ( ClutterContainer *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:
  • cluttermm/container.h