Hi,

I moved things to http://bugzilla.o-hand.com/show_bug.cgi?id=815
and have my work-in-progress patch on there.

Relating your points to the work in progress:

On Sat, Feb 23, 2008 at 12:19 PM, Matthew Allum <[EMAIL PROTECTED]> wrote:
>
>   - Things should still work well/easy in fixed env - ideally base actors
>  should not have to implement any layout specific allocation methods
>  (beyond query/request as now). If they dont layout cant fall back to
>  clipping, or simply resizing or something.

If an actor wants to require library users to set width and height (or
arrange for them to be set by layout), the actor just paints inside
whatever allocation it gets. I believe with my current patch none of
get_width_request, get_height_request, allocate, or get_paint_box
would need to be implemented, the default implementations are all
fine.

>From a library user perspective, if you want to be all-fixed basically
you just set the size and position of everything, and those sizes and
positions are used because the size overrides the size request, and
the position forces the Fixed layout algorithm to be used.

>   - ClutterGroup is just a container - it does no automatic layout. This
>  is deliberate and I think should stay like this (with other Container
>  subclasses implementing layouts).

I would rephrase this and say that ClutterGroup implements the "Fixed"
layout algorithm, which is to give all children the position they have
set, or if no position is set to give them 0,0; and to give all
children their natural width and height.

I am considering a "layout-manager" property on ClutterGroup. The
effect of setting a layout manager would be that children with
position_set=FALSE would be passed to the layout manager for request
and allocation. Children where set_position() had been called, on the
other hand, would not be affected by the layout manager and would be
passed to the default "Fixed" layout algorithm.

The nice thing about this is that a ClutterBox can be a ClutterGroup
subclass that sets a layout manager, and you can put fixed children
into ClutterBox if it's convenient. i.e. all containers can support
set_position().

>   - Need to keep things like animation, children being positioned in 3D
>  space etc in mind and handled.

Right, I don't know yet what all the issues here will be, but I don't
anticipate anything major.

>  Also its worth noting now in trunk clutter group size querying is fixed
>  to correctly take into account child transforms now.

I think the way I've done it, this is now in get_paint_box? I may be confused.

The whole layout cycle is pre-transform; I'm hoping to move transforms
(scale, anchor point, rotate) to only affect painting.

This way you can animate the request if you want your animation to
change the layout, and animate the transform if you want your
animation to only affect one actor transiently. I believe both are
useful.

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

Reply via email to