On Tue, 4 Dec 2001, Juergen Vigna wrote: > On 04-Dec-2001 Allan Rae wrote: > > > Then we should only need to use the same two cursors to do anything. > > The second one only needed for selections. > > We don't the stuff is a bit more complicated when updates and redraws > are involved. But I would say if you know all of it why don't you start > coding and so you can proove us that you're right. I would surely be > happy about that!
I guess from this you are referring to the need to know which parts of the document are visible -- that is, which _rows_ are visible. Do we need a cursor for that? Maybe I'm just being pedantic but while we could use the Cursor class needed to make selections to mark the limits of visible rows they aren't user-visible or user-interactive cursors. Anyway, it seems we might need perhaps 5 cursors in total. The two user-visible I mentioned originally, the two for marking visible boundaries and another for iterating through the visible area for updating. These are document global (stored in BufferView or should it be LyXText?) and passed down the inset hierarchy as needed. There shouldn't really be any need for an inset to maintain its own cursor -- there will certainly need to be an iterator added to the cursor stack when an inset-in-an-inset is encountered but that is the document-global cursor. So does this sound more complete or do you see a need yet another cursor somewhere? Allan. (ARRae)