bounding boxes

Robin Becker <[email protected]> Sat, 28 Sep 2002 12:48:07 +0100
Newsgroups gmane.comp.python.anygui.devel
Message-ID <[email protected]>
I thought I'd ask a couple of questions in this knowledgeable list
concerning Megawidget architectures. 

Assume I have a tree of widgets which can be reduced for discussion to

   C0
P /       ie a parent widget with two children
  \
   C1

Assume parents contain their children for the purpose of calculation of
size (ie bounding box). 

so minx(P) = min(minx(C0),minx(C1)), maxx(P) =  min(maxx(C0),maxx(C1))
   minx(P) = min(miny(C0),miny(C1)), maxy(P) =  min(maxy(C0),maxy(C1))


Questions
Is there a way to position the children relative to the bounding box of
the parent or each other? 

Can we say something like C1.SE + (dx,dy) = P.N? This seems to explode
recursively unless P.N excludes C1.

Is there such a thing as a bounding box algebra using the above ideas?
Or should this be done by some kind of constraint programming?
-- 
Robin Becker


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf