From 349377f2a1f612b39c0f0e8dc6bf17c1154e4e56 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 10 Aug 2001 02:01:20 +0000 Subject: Added PositionFromLocationClose which returns the position in the document of a pixel location in the window but returns INVALID_POSITION if the location is outside the text area or not near text. Improvements to mouse dwell to make it only trigger when the mouse is up, use PositionFromLocationClose to calculate the position parameter, and send a dwell end if the user types. --- src/Editor.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Editor.h') diff --git a/src/Editor.h b/src/Editor.h index 5fdbbfae7..7b2c0e0a9 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -182,9 +182,10 @@ protected: // ScintillaBase subclass needs access to much of Editor int LinesOnScreen(); int LinesToScroll(); int MaxScrollPos(); - Point LocationFromPosition(unsigned int pos); - int XFromPosition(unsigned int pos); + Point LocationFromPosition(int pos); + int XFromPosition(int pos); int PositionFromLocation(Point pt); + int PositionFromLocationClose(Point pt); int PositionFromLineX(int line, int x); int LineFromLocation(Point pt); void SetTopLine(int topLineNew); @@ -308,6 +309,7 @@ protected: // ScintillaBase subclass needs access to much of Editor bool PointInSelection(Point pt); bool PointInSelMargin(Point pt); void LineSelection(int lineCurrent_, int lineAnchor_); + void DwellEnd(); virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); void ButtonMove(Point pt); void ButtonUp(Point pt, unsigned int curTime, bool ctrl); -- cgit v1.2.3