On 15-Apr-2002 Andre Poenitz wrote:

>> I try it with other words a math inset in the middle of a row (which say
>> starts at x position 200) will have as x position in the call to edit AND
>> insetButtonPress 0 if I press BEFORE the first character INSIDE the inset.
> 
> Does this mean, mathed can be ignorant to any outside positioning? I.e. I
> can assume all parameters send to mathed methods are 'normalized', i.e.
> assume an origin of the inset in (0,0)? This would be nice...

Yes and as much as I know this has been so since a long time!

> Ok, then all the xo_/yo_ handling in mathed is Wrong, since it stores
> absolute values everywhere, not relative to the inset's origin.
> 
> This is not exactly my doing and maybe was not even possible to do
> otherwise until this recent change of yours that allowed me to remove this
> awful hack for cursor positioning...

I don't know about that you have to see it. Where do you get the absolute
postions from? Anyway you need absolute position only for drawing but then
you get the x and baseline there so that should be no problem!

> But the question is: How important is it to get this right? I probably
> would have to touch a dozen math insets to switch from absolute positions
> to relative...

Well if you want to have the cursor on the right x spot when doing a
cursor up/down (I'm fixing this at this moment and therefore I've seen
that mathed does it wrong and InsetText did is also wrong!) then you
should fix it. If you don't care that the cursor goes to the end of the
next/previous row on a cursor up/down and can handle all the requests
coming from the user because of this strange behaviour then let it be ;)

Anyway it's just 1 function to fix in which you return the normalized values
to the outside world. Why would you have to fix this in a lot of functions?

A well there is the edit call too but that should be really easy to fix.

           Jug
--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen Vigna        E-Mail:  [EMAIL PROTECTED]
Italienallee 13/N       Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen           Web:     http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Aliquid melius quam pessimum optimum non est.

Reply via email to