>> Asger K Alstrup Nielsen writes:
AKAN> Since I suggest that different font should be in different
AKAN> insets, the context of an inset can be very small. I
I think so too.
[As a side note, perhaps glue (space between words) should be a special
kind of insets too? If not where to store the glue?]
AKAN> personally considered to just present each paragraph as one
AKAN> string with an iterator like the other one, but the added
AKAN> complexity of exposing the entire document as one string is
AKAN> very small. Basically, Kevin presented the code that is
AKAN> needed.
Somehow I missed that code.
AKAN> Notice that the cost of this kind of iterator is very small:
AKAN> We just need to hold an BufferIterator inside it. Thus, the
Is the idea that we should have:
BufferIterator that uses the ParagraphIterator that uses various
InsetIterators? So that the BufferIterator need no know anything about
a paragraph, except that a buffer consists of a list of them?
AKAN> As mentioned, I imagine that a paragraph will be made up from
AKAN> a bunch of small insets. So we need some means to collapse all
AKAN> these small insets into one string, and when we have this
AKAN> iterator, the step to do the full document is hopefully not
AKAN> large.
AKAN> Also, having this interface will make search-replace trivial:
AKAN> We can simply use the STL find, and the STL replace.
I am pretty convinced.
BUT before crreating the iterators we need the new buffer structure. A
first go in that would be to change the current paragraph list to be a
stl list. That is not a quick task.
Lgb