Hi;

On Sun, 2007-08-05 at 09:13 +0100, Emmanuele Bassi wrote:
> On Sat, 2007-08-04 at 18:05 -0400, Pierre-Luc Beaudoin wrote:
> > Hi,
> > 
> > I began porting Sofa to Clutter 0.4.  Unfortunately it didn't work
> > right off the box.  I suspect clutter_actor_show_all() has a different
> > behavior between 0.2 and 0.4.  

Right I think there was some confusing in adding actor_show_all as it
behaved differently to the original group_show_all (i.e. recursing). We
then sorted that so both non recursed - sorry for confusion.

> I have my actors grouped in 3 levels:
> > 
> > MenuList -> Menu -> Label 
> > 
> > In 0.2, I only had to clutter_actor_show_all() on MenuList to have all
> > the menu show up.  Now in 0.4, after a good search ;), I found out I
> > have to do a clutter_actor_show_all() on each menu.   
> 
> in 0.2, clutter_actor_show_all() was recursive on every actor; in 0.3 it
> was changed not to be recursive on ClutterGroup actors because you'll
> get every single actor shown at the same time -- which may or may not be
> what you want; for instance, you might add a "spinner" texture to your
> group but decide for yourself whether to hide it or not.
> 
> you can override this behaviour, though: instead of directly using a
> ClutterGroup, you can subclass it and override the ClutterActor
> methods ::show_all() and ::hide_all() to be recursive; in Python it
> means you have to provide a do_show_all() and a do_hide_all() methods in
> your class, something like:
> 

Yes. In what you describe above you probably want the Menu as its own
actor subclass (composting a number of sub actors) and then overiding
show_all (or just show) to do exactly what you want.

> > It might be a performance improvement, but I preferred the previous
> > behavior... what do you think?
> 
> we are nearing 0.4, so further API churning would delay the release; my
> personal take on this is:
> 
>   * make clutter_actor_show_all() and clutter_actor_hide_all()
>     recursive on every container - except for the stage;
>   * add a CLUTTER_ACTOR_NO_SHOW_ALL flag to be set on actors
>     we absolutely don't want to show even when we call
>     clutter_actor_show_all();
> 
> this would solve the issue with the expected behaviour of a show_all()
> method; for more complex behaviour, subclassing and overriding are
> always an option.
> 

I dunno, either way has its advantages and disadvantages. Id rather
stick with what we have now and make sure its clearly documented. 

   -- Matthew

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

Reply via email to