Re: [Fresco-devel] Text styles/cloning graphics

Nathaniel Smith <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
On Thu, Oct 03, 2002 at 09:50:16PM +0200, Tobias Hunger wrote:
[snip]
> How about making that possible with a clone() method on the Graphics? That 
> might be useful for other things as well, don't you think? Or is the whole 
> decorator approach wrong?

I think this has the wrong semantics.  Say you have a hyperlink, and
it gets split over two lines.  The clone() approach says that you
break the button into two buttons, and insert each of them into the
control graph.  And then when the user tabs through their hyperlinks,
the two halves of the link act like two separate links -- you have to
hit tab twice to get by.  They also show focus (eg, with a little
outline thingie) separately, handle mouse-over and mouse-down's
separately, etc.  This is all wrong.

And I don't even want to think about what happens to keyboard focus
during re-layout.

Has anyone else ever implemented text layout with hyperlinks in a
scene graph architecture?  How do the Swing guys do this, for
instance?  (I know their overall text editor/viewer framework is some
crazy hairy beasty, but I've never managed to wrap my head around
it enough to figure out what they were doing internally...)

At some deep level, what you really want is a way to have a decorator
that covers a non-contiguous chunk of screen space; the problem (well,
_a_ problem) with text layout is that text is logically a linear
subgraph of its container:
                     TextBox
         /      /        |       \      \
    words ->  words -> words -> words -> words 
but the on-screen representation isn't isomorphic to the graph
structure, because you have these line breaks cluttering up the place.

Since the isomorphism between layout and logical graph structure is
kinda the heart of a scene graph architecture, maybe we should
brainstorm what sort of magic we would need at the
traversal/layout/drawing/picking level to let us use the above scene
graph directly.  Any ideas?

Wondering how much of a fit Stefan will have at that last suggestion,
-- Nathaniel

-- 
"But in Middle-earth, the distinct accusative case disappeared from
the speech of the Noldor (such things happen when you are busy
fighting Orcs, Balrogs, and Dragons)."

This email may be read aloud.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.