> [How should we handle nested headings? Andr=E9 suggested that the level
> of headings should be represented by the position in the tree. I think
> it was a mistake that he only sent it this proposal to me personally, so
> here is my reply.]
Erm... yes..
> This is problematic if Paragraphs are to become Insets.
> Insets should be self-contained.
Agreed.
> Instead, we should choose the simpler representation, and using advanced
> iterators, expose this simple representation in other forms, if the need
> be.
The simpler representation probably *is* the tree ;-)
> We can achieve the exact same benefits in a simpler way: Have one kind
> of HeadingInset that keeps a counter to indicate the nesting level.
No, e.g. moving up a whole branch a level requires this way the update
of all effected counters whereas this is probably only O(1) in the "pure tree"
representation. Of course I think this is not more a performance issue
than the 'tree traversal thingy' ;-)
> > - There won't be a hard-coded limit on the number of levels.
>
> We will allow more nesting with a HeadingInset with a counter, than with
> position in a tree: We can only nest to the number of different
> pointers to Insets we have, and this is typically smaller than the range
> of an integer.
??? I don't understand. A tree is defacto unlimited in size.
The number of pointers is almost always limited the same way as integers
are.
> [This is also solved with a HeadingInset with a number.]^3
> A HeadingInset with a counter is much easier to promote/demote than a
> tree positioning based HeadingInset: We do not have to change anything
> in the typology of the data structure. Just a counter inside the inset.
Ok ;-)
> Also, having using the topology to denote the level of a Heading is
> dangerous: What if we cut the heading to the clipboard? How will we
> handle the level then? Do we need to insert a bunch of blank nested
> headings for this?
No, of course not. It gets automagically promoted/demoted to the
appropriate level at the place of insertion. You just pluck a branch off
the tree and put it back at another position. The relative structure
within the branch remains the same - even while being in the clipboard.
> I say this complicated.
It makes some thing more difficult and some things easier...
I agree that HeadingInsets with numbers are not that bad at all.
Regard,
Andre'
--
Andre' Poenitz, TU Chemnitz, Fakultaet fuer Mathematik
[EMAIL PROTECTED] ... +49 3727 58 1381