From f632e27b3f2fbd010982cb1fbba353887635f71a Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Fri, 10 Oct 2008 19:13:50 +0000 Subject: [PATCH] group hit-test flags into an enum (like I did in docs); this makes easier to document them, but is also logically the best thing since wxRichTextBuffer::HitTest is documented to return only _one_ of those flags. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/richtext/richtextbuffer.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index 2249f4bdfc..c32bfc8329 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -91,7 +91,7 @@ extern WXDLLIMPEXP_RICHTEXT const wxChar wxRichTextLineBreakChar; /*! - * File types + * File types in wxRichText context. */ enum wxRichTextFileType { @@ -145,17 +145,23 @@ class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextBuffer; /*! * Flags returned from hit-testing */ +enum wxRichTextHitTestFlags +{ + // The point was not on this object + wxRICHTEXT_HITTEST_NONE = 0x01, + + // The point was before the position returned from HitTest + wxRICHTEXT_HITTEST_BEFORE = 0x02, + + // The point was after the position returned from HitTest + wxRICHTEXT_HITTEST_AFTER = 0x04, -// The point was not on this object -#define wxRICHTEXT_HITTEST_NONE 0x01 -// The point was before the position returned from HitTest -#define wxRICHTEXT_HITTEST_BEFORE 0x02 -// The point was after the position returned from HitTest -#define wxRICHTEXT_HITTEST_AFTER 0x04 -// The point was on the position returned from HitTest -#define wxRICHTEXT_HITTEST_ON 0x08 -// The point was on space outside content -#define wxRICHTEXT_HITTEST_OUTSIDE 0x10 + // The point was on the position returned from HitTest + wxRICHTEXT_HITTEST_ON = 0x08, + + // The point was on space outside content + wxRICHTEXT_HITTEST_OUTSIDE = 0x10 +}; /*! * Flags for GetRangeSize -- 2.45.2