On Mon, 2008-02-25 at 15:10 +0100, Murray Cumming wrote: > On Sat, 2008-02-23 at 13:48 +0100, Murray Cumming wrote: > > On Fri, 2008-02-22 at 16:41 +0100, Murray Cumming wrote: > > > Is there any plan to add an equivalent for the old ClutterBox, > > > ClutterVBox and ClutterHBox containers? > > > http://clutter-project.org/docs/clutter-ClutterBox.html > > > > And may I this old code as the basis for a custom container example in > > the tutorial? I'd like the examples to be public domain licenced. > > I'm going ahead with this in the hope that it will be OK.
that code was partly broken, even though it showed the process. the code in tidy is more correct and, in general, should be regarded as a reference implementation. > Clutter*Box in 0.4 implements the child positioning by implementing the > ClutterLayout interface. > http://svn.o-hand.com/view/clutter/branches/clutter-0-4/clutter/clutter-hbox.c?rev=1328&view=markup > > That has been removed in Clutter 0.6. yes, even though I'd rather move part of the layout work Havoc has been working on inside Tidy. > TidyFrame seems like the simplest example so far for the new way of > doing things with Clutter 0.6. It seems to position its child during the > ClutterActor::request_coords() implementation. > http://svn.o-hand.com/view/tidy/trunk/tidy/tidy-frame.c?rev=105&view=markup it repositions its children when adding it (in the override for the ClutterContainer::add virtual function) and when being requested a new bounding box. > Is this the generally recommended way to do things with 0.6, or am I not > seeing some more explicit mechanism? there is no more explicit mechanism: you want a layout to recompute the position of its children when actually adding the children and when being asked to resize itself. this did not change between 0.4 and 0.6. > Is there a 0.4->0.6 porting document somewhere that covers this already? the API churning wasn't that big to require a porting document: we mostly added or removed functionality, and what was possible before it's still possible without using the new functionality. ciao, Emmanuele. -- Emmanuele Bassi, OpenedHand Ltd. Unit R, Homesdale Business Centre 216-218 Homesdale Rd., Bromley - BR12QZ http://www.o-hand.com -- To unsubscribe send a mail to [EMAIL PROTECTED]
