[REBOL] upcomming tool [glayout]
From: maximo:meteorstudios at: 2-Mar-2004 10:21
just tought I'd let you all in on glayout.
Its an integration of the core functionality of the second-generation glass layout engine
RIGHT INTO VID :-)
this will let you build uis based on the nested row/column layout mechanism. everything
resizes when the window is resized, and it will even prevent the window from resizing
to larger than it needs. horizontal and vertical are treated independently, but every
feature added is always available in both, as I have built the engine over a coordinate(x/y)
here is an example source code:
slim/open 'glayout 0.9
win: glayout [
there is no limit to nesting depth and all items have seperate default and minimum sizes.
the basic layout differentiation is that some vid elements benefit from stretching and
some dont. whenever a ui is stretched ABOVE the default size, then elastic faces get
that extra space based on their elastic weight.
The thing I worked on hard is to allow shriking to be smart.
When there is LESS than the default size, it shrinks all faces down to their minimum
and always leaves the rest of the shrinking to other faces which still have shrinking
space. Only once all non-elastic faces are to their minimum do the elastic faces start
shrinking. this is to keep any space hungry faces as large as possible all the time.
trying to shrink the window below its minumum size actualy resizes it to its minimum
size (eventually, scrollers will be added).
I'll be releasing this on rebol.org as a slim module, when I've finished updating the
rebol.org package downloader (which uses it), sometime this week(-end?).