On Wed, Nov 22, 2006 at 01:20:56PM +0100, Georg Baum wrote:
> Abdelrazak Younes wrote:
> 
> > Why is it that we use LCursor::goUpDown() to go down within a formula?
> > Logically, we should know where we are within the formula and we should
> > be able to descend inside the formula using that information.
> 
> How would that work? The only position information that is available are
> screen coordinates. Only the logical structure is known in mathed, e.g. in
> $\frac{1}{2}$ we have three insets, frac, 1 and 2, and 1 and 2 are the
> first and second cell of frac, respectively. In normal fracs 2 is below 1,
> but if you have a nicefrac, 2 is right of 1. Of course we could extend the
> insets to know this information,

The inset already helps heavily in the up/down navigation with the
implementation of idxUp and idxDown.

> but that would essentially be a duplicate
> of the metrics calculation. Therefore it is not a bad idea IMO that screen
> coordinates are used for navigating formulas.

The problem is there is no clear cut. Pure coordinate based navigation
is as bad as pure structure based. We had already both, and people were
(rightfully) unhappy with either. The optimum is somewhere in between,
with all consequences for the claerness of the code.

I think up/down navgation in mathed consumed more than half of 
all the time spent in the whole mathed development.

Andre'

Reply via email to