From 59a2c47ed03ac40ec5a612cb74667dc70900dff5 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 16 Jan 2015 09:48:30 +1100 Subject: When the mouse is on the line between margin and text changed to treat as within text. Helps on PLAT_CURSES. --- include/Platform.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/Platform.h b/include/Platform.h index 4bba252f2..c4a1a0b40 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -144,6 +144,11 @@ public: return (pt.x >= left) && (pt.x <= right) && (pt.y >= top) && (pt.y <= bottom); } + bool ContainsWholePixel(Point pt) const { + // Does the rectangle contain all of the pixel to left/below the point + return (pt.x >= left) && ((pt.x+1) <= right) && + (pt.y >= top) && ((pt.y+1) <= bottom); + } bool Contains(PRectangle rc) const { return (rc.left >= left) && (rc.right <= right) && (rc.top >= top) && (rc.bottom <= bottom); -- cgit v1.2.3