#include </home/zeitlin/src/wx/github/interface/wx/richtext/richtextctrl.h>
This is the event class for wxRichTextCtrl notifications.
The following event handler macros redirect the events to member function handlers 'func' with prototypes like:
Event macros:
wxEVT_COMMAND_RICHTEXT_LEFT_CLICK
event, generated when the user releases the left mouse button over an object. wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK
event, generated when the user releases the right mouse button over an object. wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK
event, generated when the user releases the middle mouse button over an object. wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK
event, generated when the user double-clicks an object. wxEVT_COMMAND_RICHTEXT_RETURN
event, generated when the user presses the return key. Valid event functions: GetFlags, GetPosition. wxEVT_COMMAND_RICHTEXT_CHARACTER
event, generated when the user presses a character key. Valid event functions: GetFlags, GetPosition, GetCharacter. wxEVT_COMMAND_RICHTEXT_DELETE
event, generated when the user presses the backspace or delete key. Valid event functions: GetFlags, GetPosition. wxEVT_COMMAND_RICHTEXT_RETURN
event, generated when the user presses the return key. Valid event functions: GetFlags, GetPosition. wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED
event, generated when styling has been applied to the control. Valid event functions: GetPosition, GetRange. 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. 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. 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. wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED
event, generated when properties have been applied to the control. Valid event functions: GetPosition, GetRange. wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED
event, generated when content has been inserted into the control. Valid event functions: GetPosition, GetRange. wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED
event, generated when content has been deleted from the control. Valid event functions: GetPosition, GetRange. 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. wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED
event, generated when the selection range has changed. wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED
event, generated when the current focus object has changed. Public Member Functions | |
wxRichTextEvent (wxEventType commandType=wxEVT_NULL, int winid=0) | |
Constructor. | |
wxRichTextEvent (const wxRichTextEvent &event) | |
Copy constructor. | |
long | GetPosition () const |
Returns the buffer position at which the event occurred. | |
void | SetPosition (long pos) |
Sets the buffer position variable. | |
int | GetFlags () const |
Returns flags indicating modifier keys pressed. | |
void | SetFlags (int flags) |
Sets flags indicating modifier keys pressed. | |
wxRichTextStyleSheet * | GetOldStyleSheet () const |
Returns the old style sheet. | |
void | SetOldStyleSheet (wxRichTextStyleSheet *sheet) |
Sets the old style sheet variable. | |
wxRichTextStyleSheet * | GetNewStyleSheet () const |
Returns the new style sheet. | |
void | SetNewStyleSheet (wxRichTextStyleSheet *sheet) |
Sets the new style sheet variable. | |
const wxRichTextRange & | GetRange () const |
Gets the range for the current operation. | |
void | SetRange (const wxRichTextRange &range) |
Sets the range variable. | |
wxChar | GetCharacter () const |
Returns the character pressed, within a wxEVT_COMMAND_RICHTEXT_CHARACTER event. | |
void | SetCharacter (wxChar ch) |
Sets the character variable. | |
wxRichTextParagraphLayoutBox * | GetContainer () const |
Returns the container for which the event is relevant. | |
void | SetContainer (wxRichTextParagraphLayoutBox *container) |
Sets the container for which the event is relevant. | |
wxRichTextParagraphLayoutBox * | GetOldContainer () const |
Returns the old container, for a focus change event. | |
void | SetOldContainer (wxRichTextParagraphLayoutBox *container) |
Sets the old container, for a focus change event. | |
virtual wxEvent * | Clone () const |
イベントのコピーを返却します。 | |
Protected Attributes | |
int | m_flags |
long | m_position |
wxRichTextStyleSheet * | m_oldStyleSheet |
wxRichTextStyleSheet * | m_newStyleSheet |
wxRichTextRange | m_range |
wxChar | m_char |
wxRichTextParagraphLayoutBox * | m_container |
wxRichTextParagraphLayoutBox * | m_oldContainer |
wxRichTextEvent::wxRichTextEvent | ( | wxEventType | commandType = wxEVT_NULL , |
int | winid = 0 |
||
) | [inline] |
Constructor.
commandType | The type of the event. |
id | Window identifier. The value wxID_ANY indicates a default value. |
wxRichTextEvent::wxRichTextEvent | ( | const wxRichTextEvent & | event | ) | [inline] |
Copy constructor.
virtual wxEvent* wxRichTextEvent::Clone | ( | ) | const [inline, virtual] |
イベントのコピーを返却します。
Any event that is posted to the wxWidgets event system for later action (via wxEvtHandler::AddPendingEvent, wxEvtHandler::QueueEvent or wxPostEvent()) must implement this method.
All wxWidgets events fully implement this method, but any derived events implemented by the user should also implement this method just in case they (or some event derived from them) are ever posted.
All wxWidgets events implement a copy constructor, so the easiest way of implementing the Clone function is to implement a copy constructor for a new event (call it MyEvent) and then define the Clone function like this:
Implements wxEvent.
wxChar wxRichTextEvent::GetCharacter | ( | ) | const [inline] |
Returns the character pressed, within a wxEVT_COMMAND_RICHTEXT_CHARACTER
event.
wxRichTextParagraphLayoutBox* wxRichTextEvent::GetContainer | ( | ) | const [inline] |
Returns the container for which the event is relevant.
int wxRichTextEvent::GetFlags | ( | ) | const [inline] |
Returns flags indicating modifier keys pressed.
Possible values are wxRICHTEXT_CTRL_DOWN
, wxRICHTEXT_SHIFT_DOWN
, and wxRICHTEXT_ALT_DOWN
.
wxRichTextStyleSheet* wxRichTextEvent::GetNewStyleSheet | ( | ) | const [inline] |
Returns the new style sheet.
Can be used in a wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING
or wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED
event handler.
wxRichTextParagraphLayoutBox* wxRichTextEvent::GetOldContainer | ( | ) | const [inline] |
Returns the old container, for a focus change event.
wxRichTextStyleSheet* wxRichTextEvent::GetOldStyleSheet | ( | ) | const [inline] |
Returns the old style sheet.
Can be used in a wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING
or wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED
event handler.
long wxRichTextEvent::GetPosition | ( | ) | const [inline] |
Returns the buffer position at which the event occurred.
const wxRichTextRange& wxRichTextEvent::GetRange | ( | ) | const [inline] |
Gets the range for the current operation.
void wxRichTextEvent::SetCharacter | ( | wxChar | ch | ) | [inline] |
Sets the character variable.
void wxRichTextEvent::SetContainer | ( | wxRichTextParagraphLayoutBox * | container | ) | [inline] |
Sets the container for which the event is relevant.
void wxRichTextEvent::SetFlags | ( | int | flags | ) | [inline] |
Sets flags indicating modifier keys pressed.
Possible values are wxRICHTEXT_CTRL_DOWN
, wxRICHTEXT_SHIFT_DOWN
, and wxRICHTEXT_ALT_DOWN
.
void wxRichTextEvent::SetNewStyleSheet | ( | wxRichTextStyleSheet * | sheet | ) | [inline] |
Sets the new style sheet variable.
void wxRichTextEvent::SetOldContainer | ( | wxRichTextParagraphLayoutBox * | container | ) | [inline] |
Sets the old container, for a focus change event.
void wxRichTextEvent::SetOldStyleSheet | ( | wxRichTextStyleSheet * | sheet | ) | [inline] |
Sets the old style sheet variable.
void wxRichTextEvent::SetPosition | ( | long | pos | ) | [inline] |
Sets the buffer position variable.
void wxRichTextEvent::SetRange | ( | const wxRichTextRange & | range | ) | [inline] |
Sets the range variable.
wxChar wxRichTextEvent::m_char [protected] |
wxRichTextParagraphLayoutBox* wxRichTextEvent::m_container [protected] |
int wxRichTextEvent::m_flags [protected] |
wxRichTextStyleSheet* wxRichTextEvent::m_newStyleSheet [protected] |
wxRichTextStyleSheet* wxRichTextEvent::m_oldStyleSheet [protected] |
long wxRichTextEvent::m_position [protected] |
wxRichTextRange wxRichTextEvent::m_range [protected] |