In general I think it is to be expected to get this sort of information from 
the actor itself because this makes 
the actor "self-contained" - it knows what alters its original definition 
(width, height, x, y, color/texture) 

We already have :
for geometry(is_scaled(), is_rotated(), etc),
for appearance (get_clip(), get_shader(), etc),
for hierarchy(get_parent(), etc)

... and there should be 
for behavior - does an actor plays a role? - (get/set_behavior(s)(), etc)

MihailNaydenov

----- Original Message ----
From: Emmanuele Bassi <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, October 14, 2008 6:53:25 PM
Subject: Re: [clutter] Actor reference to its behaviors?

On Tue, 2008-10-14 at 08:37 -0700, ere wer wrote:
.> Right now there seams to be no way to tell if an actor`s , lets say 
position, is controlled by a behavior or not! 

>clutter_behaviour_is_applied().

>> There is an option to test if a beh. controls an actor, but not the reverse 
>> - is an actor is controlled by a beh., and which.

>it would add cyclic references - which is perfectly fine, but needs to
>be carefully added to avoid leaks.


>> A concrete example of where this is needed - if I copy an actor in the 
>> clipboard and I want to paste it at a particular place I have to know its 
>> >behaviors (mainly those that alter its position) in order to modify them to 
>> achieve the desired effect (like setting BehaviorEllipse.set_center instead 
>> >of  Actor.set_position() )

>this seems like a contrieved example which could be solved by your own
>framework.

>ciao,
>Emmanuele.
    
-- 
>Emmanuele Bassi, Intel Open Source Technology Center



----- Original Message ----
From: ere wer <[EMAIL PROTECTED]>
To: clutter <[email protected]>
Sent: Tuesday, October 14, 2008 6:37:00 PM
Subject: [clutter] Actor reference to its behaviors?

>Right now there seams to be no way to tell if an actor`s , lets say position, 
>is controlled by a behavior or not! 
>There is an option to test if a beh. controls an actor, but not the reverse - 
>is an actor is controlled by a beh., and which.

>Vary much like containers, were we can test if a container has a particular 
>actor, but we also have the reverse - Actor.get_parent() to get the >container 
>that holds the actor. Also there is Actor.unparant() and reparent() to manage 
>the actors "subscription" to a particular group from within the >actor.

>Similar functions are needed for behavior - Actor.get_behaviors() and/or 
>Actor.apply_behavior(s) and Actor.remove_behavior(s)

>I know its a bit more complex than groups because, an actor can belong to 
>multiple behaviors... but still it feels natural to have this functionality

>A concrete example of where this is needed - if I copy an actor in the 
>clipboard and I want to paste it at a particular place I have to know its 
>>behaviors (mainly those that alter its position) in order to modify them to 
>achieve the desired effect (like setting BehaviorEllipse.set_center instead 
>>of  Actor.set_position() )


>10x
>MihailNaydenov


      
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to