+#if wxUSE_DRAG_AND_DROP
+class WXDLLIMPEXP_RICHTEXT wxRichTextDropSource : public wxDropSource
+{
+public:
+ wxRichTextDropSource(wxDataObject& data, wxRichTextCtrl* tc)
+ : wxDropSource(data, tc), m_rtc(tc) {}
+
+protected:
+ bool GiveFeedback(wxDragResult effect);
+
+ wxRichTextCtrl* m_rtc;
+};
+
+class WXDLLIMPEXP_RICHTEXT wxRichTextDropTarget : public wxDropTarget
+{
+public:
+ wxRichTextDropTarget(wxRichTextCtrl* tc)
+ : wxDropTarget(new wxRichTextBufferDataObject(new wxRichTextBuffer)), m_rtc(tc) {}
+
+ virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def)
+ {
+ if ( !GetData() )
+ return wxDragNone;
+ m_rtc->OnDrop(x, y, def, m_dataObject);
+ return def;
+ }
+
+protected:
+ wxRichTextCtrl* m_rtc;
+};
+#endif // wxUSE_DRAG_AND_DROP
+
+/**
+ @class wxRichTextEvent
+
+ This is the event class for wxRichTextCtrl notifications.
+
+ @beginEventTable{wxRichTextEvent}
+ @event{EVT_RICHTEXT_LEFT_CLICK(id, func)}
+ Process a @c wxEVT_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_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_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_RICHTEXT_LEFT_DCLICK event, generated when the user
+ double-clicks an object.
+ @event{EVT_RICHTEXT_RETURN(id, func)}
+ Process a @c wxEVT_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_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_RICHTEXT_DELETE event, generated when the user
+ presses the backspace or delete key. Valid event functions: GetFlags, GetPosition.
+ @event{EVT_RICHTEXT_STYLE_CHANGED(id, func)}
+ Process a @c wxEVT_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_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_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_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_PROPERTIES_CHANGED(id, func)}
+ Process a @c wxEVT_RICHTEXT_PROPERTIES_CHANGED event, generated when
+ properties have been applied to the control. Valid event functions: GetPosition, GetRange.
+ @event{EVT_RICHTEXT_CONTENT_INSERTED(id, func)}
+ Process a @c wxEVT_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_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_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_RICHTEXT_SELECTION_CHANGED event, generated when the
+ selection range has changed.
+ @event{EVT_RICHTEXT_FOCUS_OBJECT_CHANGED(id, func)}
+ Process a @c wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED event, generated when the
+ current focus object has changed.
+ @endEventTable
+
+ @library{wxrichtext}
+ @category{events,richtext}
+*/