> Asger> We have an inset that can contain a list of paragraphs.  This
> 
> Why not us the LaTeX terminology and call it a InsetParbox? A \parbox
> is exactly what you describe, if I understood correctly. For example,
> does your InsetFlow live in a rectangle? 

In broad terms, yes it does live in a rectangle.
However, it might not have all of the rectangle for itself.

I have an evil plan to use these InsetParboxes to allow more
sophisticated geometry:  For instance, footnotes will either
derive from InsetParbox, or contain one, and then draw itself
intelligently inside ordinary text.

So, we would have things like this on the screen:

--
This is a demonstration[foot] of the new display structure.
--

In this situation, the foot note is collapsed.  When we expand
it, I want the display to be something like:

--
This is a demonstration[foot|and what a demonstration
it is.  Hopefully, it will demonstrate that a Parbox
need not be rectangular.] of the new display structure.
--

As you can see, the geometry of this Parbox is a little
more complex than a rectangle:  It's three rectangles
on top of each others.

The advantage of these three rectangles is not only
that we can do the footnotes like above, but also that we
naturally can handle things like hanging indents, and
similar stuff this way.

But if you still think it's ok to call it Parbox, let's do that.

> Do you mean that ParagraphParams will be shared and use reference
> couting like LStrings?

Yes, that's one feasible implementation.  The point is that
we want to share the identical instances.

> So this InsetText is the one which can have a non-rectangular shape,
> right? 

Yes, the InsetText is the special one.  Notice that even though
the Parbox can have the strange shape of three rectangles on
top of each others, the InsetText is more demanding:  It has to
coorporate with other InsetTexts to compete for the screen estate.
Consider block alignment:  Here, many InsetTexts have to stretch
their glue in order for things to work out.

I imagine the InsetParbox to be simpler:  It is given some
concrete geometry that is fixed, and then has to deal with
that in some appropriate way.  It is thus a slave of the
parenting environment, while the InsetText is both a slave
and a master at once.

The Paragraph class is the one that does the main logic
of flowing the text on the screen:  It asks the InsetTexts
what they would like to have, and then distributes the
areas accordingly.  In this process, it will also sometimes
ask some InsetParboxes to draw themselves in a given
area.

> I think I'll wait until you have spent 10+ hours writing the document
> before explaining why I know this design is fundamentally flawed ;-P

I thought so ;-)

Greets,

Asger

Reply via email to