+ virtual wxSize DoGetBestSize() const ;
+
+ virtual void DoSetValue(const wxString& value, int flags = 0);
+
+ virtual void DoThaw();
+
+
+// Data members
+private:
+#if wxRICHTEXT_BUFFERED_PAINTING
+ /// Buffer bitmap
+ wxBitmap m_bufferBitmap;
+#endif
+
+ /// Text buffer
+ wxRichTextBuffer m_buffer;
+
+ wxMenu* m_contextMenu;
+
+ /// Caret position (1 less than the character position, so -1 is the
+ /// first caret position).
+ long m_caretPosition;
+
+ /// Caret position when the default formatting has been changed. As
+ /// soon as this position changes, we no longer reflect the default style
+ /// in the UI.
+ long m_caretPositionForDefaultStyle;
+
+ /// Selection range in character positions. -2, -2 means no selection.
+ wxRichTextSelection m_selection;
+
+ wxRichTextCtrlSelectionState m_selectionState;
+
+ /// Anchor so we know how to extend the selection
+ /// It's a caret position since it's between two characters.
+ long m_selectionAnchor;
+
+ /// Anchor object if selecting multiple container objects, such as grid cells.
+ wxRichTextObject* m_selectionAnchorObject;
+
+ /// Are we editable?
+ bool m_editable;
+
+ /// Are we showing the caret position at the start of a line
+ /// instead of at the end of the previous one?
+ bool m_caretAtLineStart;
+
+ /// Are we dragging a selection?
+ bool m_dragging;
+
+ /// Start position for drag
+ wxPoint m_dragStart;
+
+ /// Do we need full layout in idle?
+ bool m_fullLayoutRequired;
+ wxLongLong m_fullLayoutTime;
+ long m_fullLayoutSavedPosition;
+
+ /// Threshold for doing delayed layout
+ long m_delayedLayoutThreshold;
+
+ /// Cursors
+ wxCursor m_textCursor;
+ wxCursor m_urlCursor;
+
+ static wxArrayString sm_availableFontNames;
+
+ wxRichTextContextMenuPropertiesInfo m_contextMenuPropertiesInfo;
+
+ /// The object that currently has the editing focus
+ wxRichTextParagraphLayoutBox* m_focusObject;
+};
+
+/**
+ @class wxRichTextEvent
+
+ This is the event class for wxRichTextCtrl notifications.
+
+ @beginEventTable{wxRichTextEvent}
+ @event{EVT_RICHTEXT_LEFT_CLICK(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_LEFT_CLICK event, generated when the user
+ releases the left mouse button over an object.
+ @event{EVT_RICHTEXT_RIGHT_CLICK(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK event, generated when the user
+ releases the right mouse button over an object.
+ @event{EVT_RICHTEXT_MIDDLE_CLICK(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK event, generated when the user
+ releases the middle mouse button over an object.
+ @event{EVT_RICHTEXT_LEFT_DCLICK(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_DLEFT_CLICK event, generated when the user
+ double-clicks an object.
+ @event{EVT_RICHTEXT_RETURN(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_RETURN event, generated when the user
+ presses the return key. Valid event functions: GetFlags, GetPosition.
+ @event{EVT_RICHTEXT_CHARACTER(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_CHARACTER event, generated when the user
+ presses a character key. Valid event functions: GetFlags, GetPosition, GetCharacter.
+ @event{EVT_RICHTEXT_DELETE(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_DELETE event, generated when the user
+ presses the backspace or delete key. Valid event functions: GetFlags, GetPosition.
+ @event{EVT_RICHTEXT_RETURN(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_RETURN event, generated when the user
+ presses the return key. Valid event functions: GetFlags, GetPosition.
+ @event{EVT_RICHTEXT_STYLE_CHANGED(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED event, generated when
+ styling has been applied to the control. Valid event functions: GetPosition, GetRange.
+ @event{EVT_RICHTEXT_STYLESHEET_CHANGED(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING event, generated
+ when the control's stylesheet has changed, for example the user added,
+ edited or deleted a style. Valid event functions: GetRange, GetPosition.
+ @event{EVT_RICHTEXT_STYLESHEET_REPLACING(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING event, generated
+ when the control's stylesheet is about to be replaced, for example when
+ a file is loaded into the control.
+ Valid event functions: Veto, GetOldStyleSheet, GetNewStyleSheet.
+ @event{EVT_RICHTEXT_STYLESHEET_REPLACED(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED event, generated
+ when the control's stylesheet has been replaced, for example when a file
+ is loaded into the control.
+ Valid event functions: GetOldStyleSheet, GetNewStyleSheet.
+ @event{EVT_RICHTEXT_CONTENT_INSERTED(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED event, generated when
+ content has been inserted into the control.
+ Valid event functions: GetPosition, GetRange.
+ @event{EVT_RICHTEXT_CONTENT_DELETED(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED event, generated when
+ content has been deleted from the control.
+ Valid event functions: GetPosition, GetRange.
+ @event{EVT_RICHTEXT_BUFFER_RESET(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_BUFFER_RESET event, generated when the
+ buffer has been reset by deleting all content.
+ You can use this to set a default style for the first new paragraph.
+ @event{EVT_RICHTEXT_SELECTION_CHANGED(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED event, generated when the
+ selection range has changed.
+ @event{EVT_RICHTEXT_FOCUS_OBJECT_CHANGED(id, func)}
+ Process a @c wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED event, generated when the
+ current focus object has changed.
+ @endEventTable
+
+ @library{wxrichtext}
+ @category{events,richtext}
+*/
+
+class WXDLLIMPEXP_RICHTEXT wxRichTextEvent : public wxNotifyEvent
+{
+public:
+ /**
+ Constructor.
+
+ @param commandType
+ The type of the event.
+ @param id
+ Window identifier. The value @c wxID_ANY indicates a default value.
+ */
+ wxRichTextEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
+ : wxNotifyEvent(commandType, winid),
+ m_flags(0), m_position(-1), m_oldStyleSheet(NULL), m_newStyleSheet(NULL),
+ m_char((wxChar) 0), m_container(NULL), m_oldContainer(NULL)
+ { }