wxRuby Documentation Home

Wx::RichTextEvent

This is the event class for RichTextCtrl notifications.

Event table macros

To process a rich text event, use these event handler macros to direct input to a member function that takes a RichTextEvent argument.

evt_richtext_character(id) { | event | ... } Process a EVT_COMMAND_RICHTEXT_CHARACTER event, generated when the user presses a character key. Valid event functions: GetFlags, GetPosition, GetCharacter.
evt_richtext_delete(id) { | event | ... } Process a EVT_COMMAND_RICHTEXT_DELETE event, generated when the user presses the backspace or delete key. Valid event functions: GetFlags, GetPosition.
evt_richtext_return(id) { | event | ... } Process a EVT_COMMAND_RICHTEXT_RETURN event, generated when the user presses the return key. Valid event functions: GetFlags, GetPosition.
evt_richtext_style_changed(id) { | event | ... } Process a EVT_COMMAND_RICHTEXT_STYLE_CHANGED event, generated when styling has been applied to the control. Valid event functions: GetPosition, GetRange.
evt_richtext_stylesheet_changed(id) { | event | ... } Process a EVT_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.
evt_richtext_stylesheet_replacing(id) { | event | ... } Process a EVT_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.
evt_richtext_stylesheet_replaced(id) { | event | ... } Process a EVT_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.
evt_richtext_content_inserted(id) { | event | ... } Process a EVT_COMMAND_RICHTEXT_CONTENT_INSERTED event, generated when content has been inserted into the control. Valid event functions: GetPosition, GetRange.
evt_richtext_content_deleted(id) { | event | ... } Process a EVT_COMMAND_RICHTEXT_CONTENT_DELETED event, generated when content has been deleted from the control. Valid event functions: GetPosition, GetRange.
evt_richtext_buffer_reset(id) { | event | ... } Process a EVT_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.

Derived from

NotifyEvent

Data structures

Methods

RichTextEvent.new

RichTextEvent.new(RichTextEvent event)
RichTextEvent.new(EventType commandType = EVT_NULL, 
                  Integer winid = 0)

Constructors.

RichTextEvent#clone

Event clone()

Clones the event.

RichTextEvent#get_character

Char get_character()

Returns the character pressed, within a EVT_COMMAND_RICHTEXT_CHARACTER event.

RichTextEvent#get_flags

Integer get_flags()

Returns flags indicating modifier keys pressed. Possible values are RICHTEXT_CTRL_DOWN, RICHTEXT_SHIFT_DOWN, and RICHTEXT_ALT_DOWN.

RichTextEvent#get_new_style_sheet

RichTextStyleSheet get_new_style_sheet()

Returns the new style sheet. Can be used in a EVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING or EVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED event handler.

RichTextEvent#get_old_style_sheet

RichTextStyleSheet get_old_style_sheet()

Returns the old style sheet. Can be used in a EVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING or EVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED event handler.

RichTextEvent#get_position

Integer get_position()

Returns the buffer position at which the event occured.

RichTextEvent#get_range

Range get_range()

Gets the range for the current operation.

RichTextEvent#set_character

set_character(Char ch)

Sets the character variable.

RichTextEvent#set_flags

set_flags(Integer flags)

Sets flags indicating modifier keys pressed. Possible values are RICHTEXT_CTRL_DOWN, RICHTEXT_SHIFT_DOWN, and RICHTEXT_ALT_DOWN.

RichTextEvent#set_new_style_sheet

set_new_style_sheet(RichTextStyleSheet sheet)

Sets the new style sheet variable.

RichTextEvent#set_old_style_sheet

set_old_style_sheet(RichTextStyleSheet sheet)

Sets the old style sheet variable.

RichTextEvent#set_position

set_position(Integer pos)

Sets the buffer position variable.

RichTextEvent#set_range

set_range(Range range)

Sets the range variable.

[This page automatically generated from the Textile source at Wed Sep 09 02:21:22 +0100 2009]