On Wed, Feb 11, 2004 at 10:27:22AM +0100, Alfredo Braunstein wrote: > Andre Poenitz wrote: > > > Which ones of the edits? The x,y version? > > yes. > > > Well, I assume we really could just drop this 'temporary cursor' thing. > > because its function is already covered by the cursor().current() stuff?
Hm... no. We need the 'current' stuff also for non-mouse events. I.e. we should be (i.e. 'stay') able to toggle the numbering of a math equation from within a nested \frac in this equation and not force the user to go to the 'top level' in this equation to toggle the numbering. 'current' solves this nicely. With 'temporary cursor thing' I mean the dispatch of mouse events: We build up a temporary cursor and dispatch-to-tip there. The building is done in the editXY calls. This is a bit to heavy for what we actually need: dispatch to innermost 'fitting'. So the standard editXY() could look like DispatchResult editXY(....) { InsetBase * inset = insetHit(x, y); if (inset && inset->editXY() == DISPATCHED) return DISPATCHED; // ouer own handler return DISPATCHED or whatever.. } On second thoughts... we need the 'build up a cursor from coordinates' in a few other places (e.g. coordinate-based LFUN_UP/DOWN handling) anyway, so changing the system would not remove a lot of code. But handling of mouse events would be simpler, so maybe this is worhtwhile nevertheless. Andre'