Re: fl_BlockLayout::findPointCoords


Subject: Re: fl_BlockLayout::findPointCoords
From: Mike Nordell (tamlin@algonet.se)
Date: Sat May 20 2000 - 16:10:51 CDT


Jesper Skov asked:

> So the returned x&y coords are for the IP (where to draw the cursor),
> and the returned Run is used for what?

AFAIK, "no" and "IP". x&y is the coords for the insertion point (i.e. the
fp_Run that the IP "belongs" to at the moment), not the visible "caret"
(the possibly blinking cursor).
I _think_ the reason for this IMO odd behaviour is historical (I think IP
is, until my Cursor class is committed, partly expressed in x&y). If I've
understood it right...

> But there's also the implied assumption about a
> JUSTAFTER-Run is always followed by a INSIDE-Run - but that could just
> be a bug, of course.

I think that's a correct assumption. If the IP is JUSTAFTER the current
run, it probably *has* to be INSIDE the next run. I think that the
usability (and semantics) of JUSTAFTER could be discussed though, since
IMO a run should only know if a point is either inside or outside its
area, anything else feels to me like fuzzy logic.

> Mike> I attach my (apparently working, at least at my site) version of
> Mike> fl_BlockLayout::findPointCoords for comparison.
>
> If you try to try type '1234' + 2xleft + control-return + left you'll
> see the assertion trigger since the second loop is still broken in
> your version.

Now I get it. I missed the last "left" when I tested it. A fix I did
right now is to change the second loop which only checks
  if (nextRun) [nextRun->lookupProperties(); and so on]
to
  if (nextRun && nextRun->canContainPoint())

Probably a short term fix though...

/Mike - please reply to the mailinglist only



This archive was generated by hypermail 2b25 : Sat May 20 2000 - 15:09:54 CDT