On Mar 8, 2007, at 18:29, Vincent Hennebert wrote:
thanks for your inputs. That strengthens a bit the picture I have in
mind. I'm wondering if the following makes any sense:
We would have a list of page-level Knuth elements; some of those
elements would be wrapper around line-level Knuth elements. Almost
element would contain a Position pointing to the LayoutManager that
generated the element. Special elements created to achieve various
effects (say, text-centering), would contain null Positions.
The breaking algorithm would break the list of Knuth elements into
chunks representing lines/pages. From that we would iterate over the
non-null Positions, and for each one call
position.getLM().addArea(position). That is, the position would notify
its LM that its corresponding areas must be added.
For page-level elements wrapping line-level elements, we would also
iterate over the wrapped inline Positions.
Now, does that picture represent the current code?
For the largest part, yes, I think so.
The only difference is the addArea() part, which currently goes top-
down. It is not the Position that notifies its LM that the areas must
be added, but the LM that iterates over the Positions and adds their