Geometry Management

Chipp Walters chipp at
Mon Apr 5 22:39:27 EDT 2004

Hi Monte,

Layout Manager in fact does use a custom prop set. And, you of course 
can edit the propset. Also, you can edit the resizeStack script as well 
(which references the properties).

The idea is to make Layout Manager a 'script helper' which isn't too 
complicated, but does the basic stuff well. And, it will work cross 
platform, which is something I don't think GM does that well -- meaning 
GM can't set different resize attributes for different platforms.



Monte Goulding wrote:

> Hi Chipp

> I still think that custom property based geometry management is the way to
> go because if it's done right you can edit those properties via script.
> There's a few two flaws in the Rev implementation that can be overcome by
> simplifying things:
>  - the custom property set is too complicated to edit directly via script or
> via opening up the property set and hand editing if you need to
>  - it doesn't handle relayering well if you are resizing or moving some
> objects relative to others (things like grouping objects become a nightmare)
> Both of these can be overcome with a simpler model and one that is aided by
> the way the engine loops over controls. When I tackled the issue I decided
> the simplest way to do things was to resize/position everything relative to
> it's owner. So to create a resizable panel all one needed to do was group
> objects and create a button that altered the geometry properties of the
> panel then call resizeStack.
> If I had my time again I'd now use the merge function at the core of my
> geometry manager. Each object would have a custom property (could be a set
> to handle platforms) that would contain a metge string like this:
> [[item 1 of tOwnerRect+5,item 2 of tOwnerRect+5,item 3 of tOwnerRect-5,item
> 4 of tOwnerRect-5]]
> Then all you need to do is get the rect of the owner and do the merge and
> set the rect of the object. Simple.
> To make things nice you could have a setProp handler that translated a
> string like:
> 5,5,-5,-5 into the merge string. Or just let people set the whole thing
> because then they could do what they wanted:
> [[item 1 of tOwnerRect+5,item 2 of tOwnerRect+5,the top of btn "x"-5,the
> left of btn "y"-5]]
> Let's say you want an object to be positioned relative to the bottom left of
> it's owner you just do that like this:
> [[item 3 of tOwnerRect-25,item 4 of tOwnerRect-45,item 3 of
> tOwnerRect-5,item 4 of tOwnerRect-5]]
> Anyway... these later ideas are mostly theory as I didn't implement mine
> this way. It's probably worth an investigation though.
> Cheers
> Monte
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the Use-livecode mailing list