Class: Wx::STC::StyledTextEvent

Inherits:
CommandEvent show all
Defined in:
lib/wx/doc/gen/stc/styled_text_event.rb

Overview

The type of events sent from StyledTextCtrl.

Events using this class

The following event-handler methods redirect the events to member method or handler blocks for StyledTextEvent events. Event handler methods:

Most of the Scintilla notifications are mapped to a similarly named StyledTextEvent. However a few of the notifications would only offer information available in other wxWidgets event types, and in those cases a corresponding StyledTextEvent is not defined. Currently, the EVT_KEY_DOWN event is used instead of the SCN_KEY notification. The regular wxWidgets drag and drop functionality can be used instead of the SCN_URIDROPPED notification. The EVT_SET_FOCUS event is used instead of the SCN_FOCUSIN notification. And the EVT_KILL_FOCUS event is used instead of the SCN_FOCUSOUT notification.

Event Types

The following is a brief description of when the control generates these events and a list of which methods provide relevant information. Additional details can be found in the Scintilla documentation (http://www.scintilla.org/ScintillaDoc.html\#Notifications). EVT_STC_AUTOCOMP_CANCELLED

  • Generated when an autocompletion list has been canceled.
  • Valid event functions: none.

EVT_STC_AUTOCOMP_CHAR_DELETED

  • Generated when a character has been deleted from an autocompletion list.
  • Valid event functions: none.

EVT_STC_AUTOCOMP_COMPLETED

EVT_STC_AUTOCOMP_SELECTION

EVT_STC_AUTOCOMP_SELECTION_CHANGE

EVT_STC_CALLTIP_CLICK

  • Generated when a calltip has been clicked.
  • #get_position will return 1 if the up arrow has been clicked, 2 if the down arrow has been clicked, and 0 for all other clicks.
  • Valid event functions: #get_position.

EVT_STC_CHANGE

  • Generated when the text of the document has changed.
  • This an older style event and should probably not be used in new code. Use EVT_STC_MODIFIED instead.
  • Valid event functions: none.

EVT_STC_CHARADDED

  • Generated when a character has been added to the control.
  • Valid event functions: #get_key.

EVT_STC_CLIPBOARD_COPY

  • Generated when text is being cut or copied to the clipboard.
  • Use #set_string to modify the text that will be placed on the clipboard.
  • Valid event functions: GetString, Wx::SetString.

EVT_STC_CLIPBOARD_PASTE

  • Generated when text is being pasted from the clipboard.
  • Use #set_string to modify the text that will be inserted into the control.
  • Valid event functions: #get_position, GetString, Wx::SetString.

EVT_STC_DO_DROP

EVT_STC_DOUBLECLICK

EVT_STC_DRAG_OVER

EVT_STC_DWELLEND

EVT_STC_DWELLSTART

EVT_STC_HOTSPOT_CLICK

EVT_STC_HOTSPOT_DCLICK

EVT_STC_HOTSPOT_RELEASE_CLICK

EVT_STC_INDICATOR_CLICK

EVT_STC_INDICATOR_RELEASE

EVT_STC_MACRORECORD

EVT_STC_MARGIN_RIGHT_CLICK

EVT_STC_MARGINCLICK

EVT_STC_MODIFIED

EVT_STC_NEEDSHOWN

  • Generated when certain lines should be made visible by scrolling the text in the control.
  • Valid event functions: #get_length, #get_position.

EVT_STC_PAINTED

  • Generated when the control has been refreshed.
  • Valid event functions: none.

EVT_STC_ROMODIFYATTEMPT

  • Generated when an attempt has been made to change the control's text after it has been set read-only.
  • Valid event functions: none.

EVT_STC_SAVEPOINTREACHED

  • Generated when the undo history has been made empty.
  • Valid event functions: none.

EVT_STC_SAVEPOINTLEFT

  • Generated when the undo history is no longer empty.
  • Valid event functions: none.

EVT_STC_START_DRAG

  • Generated when text is being dragged from the control.
  • Details of the drag may be altered by changing the respective fields of the event; in particular, set an empty string to prohibit the drag entirely.
  • Valid event functions: #get_drag_flags, #set_drag_flags, #get_position, GetString, Wx::SetString.

EVT_STC_STYLENEEDED

  • Generated when the control has determined that style bytes should be set for a portion of the document.
  • These events are only sent if the lexer is set to STC_LEX_CONTAINER.
  • Valid event functions: #get_position.

EVT_STC_UPDATEUI

  • Generated when the text, style, cursor position, selection, or scrolling of the control has changed.
  • Valid event functions: #get_updated.

EVT_STC_USERLISTSELECTION

EVT_STC_ZOOM

  • Generated when the zoom factor of the control has been changed either by the user or a call to Wx::STC::StyledTextCtrl#zoom_in/ZoomOut.
  • Valid event functions: none.

Category: Events, Scintilla Text Editor

Requires:

  • USE_STC

Instance Method Summary collapse

Methods inherited from CommandEvent

#client_data, #client_data=, #get_client_data, #get_client_object, #get_int, #get_selection, #get_string, #is_checked, #is_selection, #set_client_data, #set_client_object, #set_extra_long, #set_int, #set_string

Methods inherited from Event

#clone, #get_event_category, #get_event_object, #get_event_type, #get_id, #get_skipped, #get_timestamp, #is_command_event, #resume_propagation, #set_event_object, #set_event_type, #set_id, #set_timestamp, #should_propagate, #skip, #stop_propagation

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(commandType = 0, id = 0) ⇒ Wx::STC::StyledTextEvent #initialize(event) ⇒ Wx::STC::StyledTextEvent

Returns a new instance of StyledTextEvent.

Overloads:



8315
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8315

def initialize(*args) end

Instance Method Details

#get_altBoolean Also known as: alt

Returns:

  • (Boolean)


8330
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8330

def get_alt; end

#get_annotations_lines_addedInteger Also known as: annotations_lines_added

Returns the number of lines that have been added to or removed from an annotation.

This method is valid for EVT_STC_MODIFIED events when the result of #get_modification_type includes Wx::STC::STC_MOD_CHANGEANNOTATION.

Returns:

  • (Integer)


8337
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8337

def get_annotations_lines_added; end

#get_controlBoolean Also known as: control

Returns:

  • (Boolean)


8353
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8353

def get_control; end

#get_drag_flagsInteger Also known as: drag_flags

Returns flags for the drag operation associated with this event.

This method is valid for EVT_STC_START_DRAG events.

Returns:

  • (Integer)


8360
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8360

def get_drag_flags; end

#get_drag_resultWx::DragResult Also known as: drag_result

Returns drag result for this event.

This method is valid for EVT_STC_DRAG_OVER and EVT_STC_DO_DROP events.

Returns:



8367
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8367

def get_drag_result; end

#get_fold_level_nowInteger Also known as: fold_level_now

Returns the current fold level for the line.

This method is valid for EVT_STC_MODIFIED events when the result of #get_modification_type includes Wx::STC::STC_MOD_CHANGEFOLD.

Returns:

  • (Integer)


8374
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8374

def get_fold_level_now; end

#get_fold_level_prevInteger Also known as: fold_level_prev

Returns previous fold level for the line.

This method is valid for EVT_STC_MODIFIED events when the result of #get_modification_type includes Wx::STC::STC_MOD_CHANGEFOLD.

Returns:

  • (Integer)


8381
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8381

def get_fold_level_prev; end

#get_keyInteger Also known as: key

Returns the key code of the key that generated this event.

This method is valid for the following event types:

Returns:

  • (Integer)


8393
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8393

def get_key; end

#get_l_paramInteger Also known as: l_param

Returns the value of the LParam field for this event.

This method is valid for EVT_STC_MACRORECORD events.

Returns:

  • (Integer)


8453
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8453

def get_l_param; end

#get_lengthInteger Also known as: length

Returns the length (number of characters) of this event.

This method is valid for EVT_STC_MODIFIED and EVT_STC_NEEDSHOWN events.

Returns:

  • (Integer)


8400
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8400

def get_length; end

#get_lineInteger Also known as: line

Returns zero-based line number for this event.

This method is valid for EVT_STC_DOUBLECLICK and EVT_STC_MODIFIED events.

Returns:

  • (Integer)


8407
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8407

def get_line; end

#get_lines_addedInteger Also known as: lines_added

Returns the number of lines added or deleted with this event.

This method is valid for EVT_STC_MODIFIED events when the result of #get_modification_type includes wxSTC_MOD_INSERTTEXT or Wx::STC::STC_MOD_DELETETEXT.

Returns:

  • (Integer)


8414
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8414

def get_lines_added; end

#get_list_completion_methodInteger Also known as: list_completion_method

Returns a value describing the action that closed the list.

The returned value will be one of the following constants:

Wx::STC::STC_AC_FILLUP A fillup character caused the completion.

Wx::STC::STC_AC_DOUBLECLICK A double-click caused the completion.

Wx::STC::STC_AC_TAB The tab key caused the completion.

Wx::STC::STC_AC_NEWLINE The enter key caused the completion.

Wx::STC::STC_AC_COMMAND The Wx::STC::StyledTextCtrl#auto_comp_complete method was called.

This method is valid for EVT_STC_USERLISTSELECTION, EVT_STC_AUTOCOMP_SELECTION, and EVT_STC_AUTOCOMP_COMPLETED events.

Returns:

  • (Integer)


8438
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8438

def get_list_completion_method; end

#get_list_typeInteger Also known as: list_type

Returns the list type for this event.

The list type is an integer passed to a list when it is created with the wxStyledTextCtrl::UserListShow method and can be used to distinguish lists if more than one is used. This method is valid for EVT_STC_AUTOCOMP_SELECTION_CHANGE and EVT_STC_USERLISTSELECTION events.

Returns:

  • (Integer)


8446
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8446

def get_list_type; end

#get_marginInteger Also known as: margin

Returns the zero-based index of the margin that generated this event.

This method is valid for EVT_STC_MARGINCLICK and EVT_STC_MARGIN_RIGHT_CLICK events.

Returns:

  • (Integer)


8460
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8460

def get_margin; end

#get_messageInteger Also known as: message

Returns a message number while a macro is being recorded.

Many of the Wx::STC::StyledTextCtrl methods such as InsertText and Paste have an event number associated with them. This method returns that number while a macro is being recorded so that the macro can be played back later. This method is valid for EVT_STC_MACRORECORD events.

Returns:

  • (Integer)


8468
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8468

def get_message; end

#get_modification_typeInteger Also known as: modification_type

Returns the modification type for this event.

The modification type is a bit list that describes the change that generated this event. It may contain one or more of the following values:

  • wxSTC_MOD_INSERTTEXT
  • wxSTC_MOD_DELETETEXT
  • wxSTC_MOD_CHANGESTYLE
  • wxSTC_MOD_CHANGEFOLD
  • wxSTC_PERFORMED_USER
  • wxSTC_PERFORMED_UNDO
  • wxSTC_PERFORMED_REDO
  • wxSTC_MULTISTEPUNDOREDO
  • wxSTC_LASTSTEPINUNDOREDO
  • wxSTC_MOD_CHANGEMARKER
  • wxSTC_MOD_BEFOREINSERT
  • wxSTC_MOD_BEFOREDELETE
  • wxSTC_MULTILINEUNDOREDO
  • wxSTC_STARTACTION
  • wxSTC_MOD_CHANGEINDICATOR
  • wxSTC_MOD_CHANGELINESTATE
  • wxSTC_MOD_CHANGEMARGIN
  • wxSTC_MOD_CHANGEANNOTATION
  • wxSTC_MOD_CONTAINER
  • wxSTC_MOD_LEXERSTATE
  • wxSTC_MOD_INSERTCHECK
  • wxSTC_MOD_CHANGETABSTOPS

This method is valid for EVT_STC_MODIFIED events.

Returns:

  • (Integer)


8500
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8500

def get_modification_type; end

#get_modifiersInteger Also known as: modifiers

Returns the modifiers of the key press or mouse click for this event.

The returned value is a bit list that may contain one or more of the following values:

  • wxSTC_KEYMOD_SHIFT
  • wxSTC_KEYMOD_CTRL
  • wxSTC_KEYMOD_ALT
  • wxSTC_KEYMOD_SUPER
  • wxSTC_KEYMOD_META

In addition, the value can be checked for equality with wxSTC_KEYMOD_NORM to test if no modifiers are present. This method is valid for the following event types:

Returns:

  • (Integer)


8525
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8525

def get_modifiers; end

#get_positionInteger Also known as: position

Returns:

  • (Integer)


8551
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8551

def get_position; end

#get_shiftBoolean Also known as: shift

Returns:

  • (Boolean)


8567
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8567

def get_shift; end

#get_tokenInteger Also known as: token

Returns the token value for this event.

The token is an integer value that can be set with a call to the Wx::STC::StyledTextCtrl#add_undo_action method. This method is valid for EVT_STC_MODIFIED events when the result of #get_modification_type includes Wx::STC::STC_MOD_CONTAINER.

Returns:

  • (Integer)


8575
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8575

def get_token; end

#get_updatedInteger Also known as: updated

Returns the value of the updated field for this event.

The value of this field is a bit list that describes the change that generated this event. It may contain one or more of the following values:

  • wxSTC_UPDATE_CONTENT
  • wxSTC_UPDATE_SELECTION
  • wxSTC_UPDATE_V_SCROLL
  • wxSTC_UPDATE_H_SCROLL

This method is valid for EVT_STC_UPDATEUI events.

Returns:

  • (Integer)


8589
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8589

def get_updated; end

#get_w_paramInteger Also known as: w_param

Returns value of the WParam field for this event.

This method is valid for EVT_STC_MACRORECORD events.

Returns:

  • (Integer)


8596
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8596

def get_w_param; end

#get_xInteger Also known as: x

Returns the X coordinate of the mouse for this event.

This method is valid for the following event types:

Returns:

  • (Integer)


8609
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8609

def get_x; end

#get_yInteger Also known as: y

Returns the Y coordinate of the mouse for this event.

This method is valid for the following event types:

Returns:

  • (Integer)


8622
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8622

def get_y; end

#set_annotation_lines_added(val) ⇒ void Also known as: annotation_lines_added=

This method returns an undefined value.

Sets the annotation lines added value for this event.

Parameters:

  • val (Integer)


8628
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8628

def set_annotation_lines_added(val) end

#set_drag_flags(flags) ⇒ void Also known as: drag_flags=

This method returns an undefined value.

Sets the drag flags for this event.

Parameters:

  • flags (Integer)


8634
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8634

def set_drag_flags(flags) end

#set_drag_result(val) ⇒ void Also known as: drag_result=

This method returns an undefined value.

Sets the drag result for this event.

Parameters:



8640
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8640

def set_drag_result(val) end

#set_fold_level_now(val) ⇒ void Also known as: fold_level_now=

This method returns an undefined value.

Sets the current fold level for this event.

Parameters:

  • val (Integer)


8646
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8646

def set_fold_level_now(val) end

#set_fold_level_prev(val) ⇒ void Also known as: fold_level_prev=

This method returns an undefined value.

Sets the previous fold level for this event.

Parameters:

  • val (Integer)


8652
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8652

def set_fold_level_prev(val) end

#set_key(k) ⇒ void Also known as: key=

This method returns an undefined value.

Sets the key code for this event.

Parameters:

  • k (Integer)


8658
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8658

def set_key(k) end

#set_l_param(val) ⇒ void Also known as: l_param=

This method returns an undefined value.

Sets value of the LParam field for this event.

Parameters:

  • val (Integer)


8694
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8694

def set_l_param(val) end

#set_length(len) ⇒ void Also known as: length=

This method returns an undefined value.

Sets the length value for this event.

Parameters:

  • len (Integer)


8664
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8664

def set_length(len) end

#set_line(val) ⇒ void Also known as: line=

This method returns an undefined value.

Sets line number for this event.

Parameters:

  • val (Integer)


8670
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8670

def set_line(val) end

#set_lines_added(num) ⇒ void Also known as: lines_added=

This method returns an undefined value.

Sets the number of lines added for this event.

Parameters:

  • num (Integer)


8676
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8676

def set_lines_added(num) end

#set_list_completion_method(val) ⇒ void Also known as: list_completion_method=

This method returns an undefined value.

Sets the list completion method for this event.

Parameters:

  • val (Integer)


8682
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8682

def set_list_completion_method(val) end

#set_list_type(val) ⇒ void Also known as: list_type=

This method returns an undefined value.

Sets the list type for this event.

Parameters:

  • val (Integer)


8688
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8688

def set_list_type(val) end

#set_margin(val) ⇒ void Also known as: margin=

This method returns an undefined value.

Sets margin number for this event.

Parameters:

  • val (Integer)


8700
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8700

def set_margin(val) end

#set_message(val) ⇒ void Also known as: message=

This method returns an undefined value.

Sets message number for this event.

Parameters:

  • val (Integer)


8706
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8706

def set_message(val) end

#set_modification_type(t) ⇒ void Also known as: modification_type=

This method returns an undefined value.

Sets the modification type for this event.

Parameters:

  • t (Integer)


8712
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8712

def set_modification_type(t) end

#set_modifiers(m) ⇒ void Also known as: modifiers=

This method returns an undefined value.

Sets the value of the modifiers field for this event.

Parameters:

  • m (Integer)


8718
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8718

def set_modifiers(m) end

#set_position(pos) ⇒ void Also known as: position=

This method returns an undefined value.

Sets file position for this event.

Parameters:

  • pos (Integer)


8724
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8724

def set_position(pos) end

#set_token(val) ⇒ void Also known as: token=

This method returns an undefined value.

Sets the token for this event.

Parameters:

  • val (Integer)


8730
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8730

def set_token(val) end

#set_updated(val) ⇒ void Also known as: updated=

This method returns an undefined value.

Sets the value of the updated field for this event.

Parameters:

  • val (Integer)


8736
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8736

def set_updated(val) end

#set_w_param(val) ⇒ void Also known as: w_param=

This method returns an undefined value.

Sets the value of the WParam field for this event.

Parameters:

  • val (Integer)


8742
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8742

def set_w_param(val) end

#set_x(val) ⇒ void Also known as: x=

This method returns an undefined value.

Sets the X value for this event.

Parameters:

  • val (Integer)


8748
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8748

def set_x(val) end

#set_y(val) ⇒ void Also known as: y=

This method returns an undefined value.

Sets the Y value for this event.

Parameters:

  • val (Integer)


8754
# File 'lib/wx/doc/gen/stc/styled_text_event.rb', line 8754

def set_y(val) end