Clutter::Behaviour Class Reference

#include <behaviour.h>

Inheritance diagram for Clutter::Behaviour:

Inheritance graph
[legend]

List of all members.

Public Types

typedef sigc::slot< void,
const Glib::RefPtr< Behaviour >
&, const Glib::RefPtr< Actor > & > 
SlotForEach
 For instance, void on_foreach(const Glib::RefPtr<Behaviour>& behaviour, const Glib::RefPtr<Actor>& actor).

Public Member Functions

virtual ~Behaviour ()
ClutterBehaviour * gobj ()
 Provides access to the underlying C GObject.
const ClutterBehaviour * gobj () const
 Provides access to the underlying C GObject.
ClutterBehaviour * gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void apply (const Glib::RefPtr< Actor > &actor)
 Applies behave to actor.
void remove (const Glib::RefPtr< Actor > &actor)
 Removes actor from the list of Clutter::Actor<!-- -->s to which behave applies.
void remove_all ()
 Removes every actor from the list that behave holds.
bool is_applied (const Glib::RefPtr< Actor > &actor)
 Check if behave applied to actor.
Glib::SListHandle
< Glib::RefPtr< Actor > > 
get_actors ()
 Retrieves all the actors to which behave applies.
Glib::SListHandle
< Glib::RefPtr< const Actor > > 
get_actors () const
 Retrieves all the actors to which behave applies.
int get_n_actors () const
 Gets the number of actors this behaviour is applied too.
Glib::RefPtr< Actorget_nth_actor (int index)
 Gets an actor the behaviour was applied to referenced by index num.
Glib::RefPtr< const Actorget_nth_actor (int index) const
 Gets an actor the behaviour was applied to referenced by index num.
Glib::RefPtr< Alphaget_alpha ()
 Retrieves the Clutter::Alpha object bound to behave.
Glib::RefPtr< const Alphaget_alpha () const
 Retrieves the Clutter::Alpha object bound to behave.
void set_alpha (const Glib::RefPtr< Alpha > &alpha)
 Binds alpha to a Clutter::Behaviour.
void actors_foreach (const SlotForEach &slot)
Glib::SignalProxy1< void,
const Glib::RefPtr< Actor > & > 
signal_applied ()
Glib::SignalProxy1< void,
const Glib::RefPtr< Actor > & > 
signal_removed ()

Protected Member Functions

 Behaviour ()
virtual void alpha_notify_vfunc (guint32 alpha_value)
virtual void on_applied (const Glib::RefPtr< Actor > &actor)
virtual void on_removed (const Glib::RefPtr< Actor > &actor)

Related Functions

(Note that these are not member functions.)

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


Member Typedef Documentation

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

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


Constructor & Destructor Documentation

virtual Clutter::Behaviour::~Behaviour (  )  [virtual]

Clutter::Behaviour::Behaviour (  )  [protected]


Member Function Documentation

ClutterBehaviour* Clutter::Behaviour::gobj (  )  [inline]

const ClutterBehaviour* Clutter::Behaviour::gobj (  )  const [inline]

ClutterBehaviour* Clutter::Behaviour::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented in Clutter::BehaviourBspline, Clutter::BehaviourDepth, Clutter::BehaviourEllipse, Clutter::BehaviourOpacity, Clutter::BehaviourPath, Clutter::BehaviourRotate, and Clutter::BehaviourScale.

void Clutter::Behaviour::apply ( const Glib::RefPtr< Actor > &  actor  ) 

Applies behave to actor.

This function adds a reference on the actor.

Since: 0.2

Parameters:
actor A Clutter::Actor.

void Clutter::Behaviour::remove ( const Glib::RefPtr< Actor > &  actor  ) 

Removes actor from the list of Clutter::Actor<!-- -->s to which behave applies.

This function removes a reference on the actor.

Since: 0.2

Parameters:
actor A Clutter::Actor.

void Clutter::Behaviour::remove_all (  ) 

Removes every actor from the list that behave holds.

Since: 0.4

bool Clutter::Behaviour::is_applied ( const Glib::RefPtr< Actor > &  actor  ) 

Check if behave applied to actor.

Parameters:
actor A Clutter::Actor.
Returns:
true if actor has behaviour. false otherwise.
Since: 0.4.

Glib::SListHandle<Glib::RefPtr<Actor> > Clutter::Behaviour::get_actors (  ) 

Retrieves all the actors to which behave applies.

It is not recommended for derived classes to use this in there alpha notify method but use clutter_behaviour_actors_foreach as it avoids alot of needless allocations.

Returns:
A list of actors. You should free the returned list with Glib::slist_free() when finished using it.
Since: 0.2.

Glib::SListHandle<Glib::RefPtr<const Actor> > Clutter::Behaviour::get_actors (  )  const

Retrieves all the actors to which behave applies.

It is not recommended for derived classes to use this in there alpha notify method but use clutter_behaviour_actors_foreach as it avoids alot of needless allocations.

Returns:
A list of actors. You should free the returned list with Glib::slist_free() when finished using it.
Since: 0.2.

int Clutter::Behaviour::get_n_actors (  )  const

Gets the number of actors this behaviour is applied too.

Returns:
The number of applied actors
Since: 0.2.

Glib::RefPtr<Actor> Clutter::Behaviour::get_nth_actor ( int  index  ) 

Gets an actor the behaviour was applied to referenced by index num.

Parameters:
index The index of an actor this behaviour is applied too.
Returns:
A Clutter actor or 0 if index is invalid.
Since: 0.2.

Glib::RefPtr<const Actor> Clutter::Behaviour::get_nth_actor ( int  index  )  const

Gets an actor the behaviour was applied to referenced by index num.

Parameters:
index The index of an actor this behaviour is applied too.
Returns:
A Clutter actor or 0 if index is invalid.
Since: 0.2.

Glib::RefPtr<Alpha> Clutter::Behaviour::get_alpha (  ) 

Retrieves the Clutter::Alpha object bound to behave.

Returns:
A Clutter::Alpha object, or 0 if no alpha object has been bound to this behaviour.
Since: 0.2.

Glib::RefPtr<const Alpha> Clutter::Behaviour::get_alpha (  )  const

Retrieves the Clutter::Alpha object bound to behave.

Returns:
A Clutter::Alpha object, or 0 if no alpha object has been bound to this behaviour.
Since: 0.2.

void Clutter::Behaviour::set_alpha ( const Glib::RefPtr< Alpha > &  alpha  ) 

Binds alpha to a Clutter::Behaviour.

The Clutter::Alpha object is what makes a behaviour work: for each tick of the timeline used by Clutter::Alpha a new value of the alpha parameter is computed by the alpha function; the value should be used by the Clutter::Behaviour to update one or more properties of the actors to which the behaviour applies.

Since: 0.2

Parameters:
alpha A Clutter::Alpha or 0 to unset a previously set alpha.

void Clutter::Behaviour::actors_foreach ( const SlotForEach slot  ) 

Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > Clutter::Behaviour::signal_applied (  ) 

Prototype:
void on_my_applied(const Glib::RefPtr<Actor>& actor)

Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > Clutter::Behaviour::signal_removed (  ) 

Prototype:
void on_my_removed(const Glib::RefPtr<Actor>& actor)

virtual void Clutter::Behaviour::alpha_notify_vfunc ( guint32  alpha_value  )  [protected, virtual]

virtual void Clutter::Behaviour::on_applied ( const Glib::RefPtr< Actor > &  actor  )  [protected, virtual]

virtual void Clutter::Behaviour::on_removed ( const Glib::RefPtr< Actor > &  actor  )  [protected, virtual]


Friends And Related Function Documentation

Glib::RefPtr< Clutter::Behaviour > wrap ( ClutterBehaviour *  object,
bool  take_copy = false 
) [related]

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

Parameters:
object The C instance.
take_copy False 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:

Generated on Fri Jun 6 02:16:48 2008 for cluttermm by  doxygen 1.5.5