extern WXDLLIMPEXP_RICHTEXT const wxChar wxRichTextLineBreakChar;
/*!
- * File types
+ * File types in wxRichText context.
*/
enum wxRichTextFileType
{
/*!
* 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
virtual int GetParagraphLength(long paragraphNumber) const;
/// Get the number of paragraphs
- virtual int GetParagraphCount() const { return GetChildCount(); }
+ virtual int GetParagraphCount() const { return static_cast<int>(GetChildCount()); }
/// Get the number of visible lines
virtual int GetLineCount() const;
// Implementation
/// Apply paragraph styles such as centering to the wrapped lines
- virtual void ApplyParagraphStyle(const wxTextAttr& attr, const wxRect& rect);
+ virtual void ApplyParagraphStyle(const wxTextAttr& attr, const wxRect& rect, wxDC& dc);
/// Insert text at the given position
virtual bool InsertText(long pos, const wxString& text);
public:
// ctor doesn't copy the pointer, so it shouldn't go away while this object
// is alive
- wxRichTextBufferDataObject(wxRichTextBuffer* richTextBuffer = (wxRichTextBuffer*) NULL);
+ wxRichTextBufferDataObject(wxRichTextBuffer* richTextBuffer = NULL);
virtual ~wxRichTextBufferDataObject();
// after a call to this function, the buffer is owned by the caller and it