Re: packing engine now independent of numcols

Adam Megacz <[email protected]> Wed, 07 Apr 2004 01:04:40 -0700
Newsgroups gmane.comp.java.xwt.core
Organization XWT
Message-ID <[email protected]>
For those of you wondering "why?!", you can now get the core to do
paragraph-text-reflow for you by putting each word (or line-breakable
portion of a word) in a box, setting each box's colspan to its pixel
width, setting all rowspans to 1, and setting the parent's cols to its
pixel width.

You can also control vertical text alignment using the align property.

I'm still pondering how to control horizontal text alignment.
Lemmethinkaboutit.

 - a


Adam Megacz <[email protected]> writes:
> This is a first.  The packing/constraining engine is now totally
> independent of the number of columns and depends only on the number of
> boxes.  The pre-simplex renderer could never do this.
>
> The following template renders just as fast as if you divide all the
> col/colspan's by 1,000:
>
>   <ui:box fill="blue" id="blue"                       cols="5000">
>       <ui:box width="10" id="a" fill="gray"           colspan="1000"/>
>       <ui:box height="10" fill="white" maxwidth="100" colspan="1000"/>
>       <ui:box height="10" fill="black" minwidth="100" colspan="2000"/>
>       <ui:box width="10" id="b" fill="gray"           colspan="1000"/>
>   </ui:box>
>
>   - 
>
> -- 
> "It's lucky," he added, after a pause, "that there are such a lot of
> islands in the world.  I almost envy you, Mr. Watson."
>
>                                                    -- Mustapha Mond
>
> _______________________________________________
> core mailing list
> [email protected]
> http://lists.xwt.org/listinfo/core
>

-- 
"It's lucky," he added, after a pause, "that there are such a lot of
islands in the world.  I almost envy you, Mr. Watson."

                                                   -- Mustapha Mond