wxWidgets: wxStyledTextEvent Class Reference

| Version: 3.1.5

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxStyledTextEvent Class Reference
Class List by Category » Events | Class List by Category » Scintilla Text Editor

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.5-4.x86_64/src/wxWidgets-3.1.5/interface/wx/stc/stc.h>`

Inheritance diagram for wxStyledTextEvent:
[legend]

## Detailed Description

The type of events sent from wxStyledTextCtrl.

## Events using this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxStyledTextEvent& event)

Event macros:

- EVT_STC_AUTOCOMP_CANCELLED(id, fn):
  Process a `wxEVT_STC_AUTOCOMP_CANCELLED` event.
- EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn):
  Process a `wxEVT_STC_AUTOCOMP_CHAR_DELETED` event.
- EVT_STC_AUTOCOMP_COMPLETED(id, fn):
  Process a `wxEVT_STC_AUTOCOMP_COMPLETED` event.
  Since
    3.1.1
- EVT_STC_AUTOCOMP_SELECTION(id, fn):
  Process a `wxEVT_STC_AUTOCOMP_SELECTION` event.
- EVT_STC_AUTOCOMP_SELECTION_CHANGE(id, fn):
  Process a `wxEVT_STC_AUTOCOMP_SELECTION_CHANGE` event.
  Since
    3.1.3
- EVT_STC_CALLTIP_CLICK(id, fn):
  Process a `wxEVT_STC_CALLTIP_CLICK` event.
- EVT_STC_CHANGE(id, fn):
  Process a `wxEVT_STC_CHANGE` event.
- EVT_STC_CHARADDED(id, fn):
  Process a `wxEVT_STC_CHARADDED` event.
- EVT_STC_CLIPBOARD_COPY(id, fn):
  Process a `wxEVT_STC_CLIPBOARD_COPY` event.
  Since
    3.1.0
- EVT_STC_CLIPBOARD_PASTE(id, fn):
  Process a `wxEVT_STC_CLIPBOARD_PASTE` event.
  Since
    3.1.0
- EVT_STC_DO_DROP(id, fn):
  Process a `wxEVT_STC_DO_DROP` event.
- EVT_STC_DOUBLECLICK(id, fn):
  Process a `wxEVT_STC_DOUBLECLICK` event.
- EVT_STC_DRAG_OVER(id, fn):
  Process a `wxEVT_STC_DRAG_OVER` event.
- EVT_STC_DWELLEND(id, fn):
  Process a `wxEVT_STC_DWELLEND` event.
- EVT_STC_DWELLSTART(id, fn):
  Process a `wxEVT_STC_DWELLSTART` event.
- EVT_STC_HOTSPOT_CLICK(id, fn):
  Process a `wxEVT_STC_HOTSPOT_CLICK` event.
- EVT_STC_HOTSPOT_DCLICK(id, fn):
  Process a `wxEVT_STC_HOTSPOT_DCLICK` event.
- EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn):
  Process a `wxEVT_STC_HOTSPOT_RELEASE_CLICK` event.
- EVT_STC_INDICATOR_CLICK(id, fn):
  Process a `wxEVT_STC_INDICATOR_CLICK` event.
- EVT_STC_INDICATOR_RELEASE(id, fn):
  Process a `wxEVT_STC_INDICATOR_RELEASE` event.
- EVT_STC_MACRORECORD(id, fn):
  Process a `wxEVT_STC_MACRORECORD` event.
- EVT_STC_MARGIN_RIGHT_CLICK(id, fn):
  Process a `wxEVT_STC_MARGIN_RIGHT_CLICK` event.
  Since
    3.1.1
- EVT_STC_MARGINCLICK(id, fn):
  Process a `wxEVT_STC_MARGINCLICK` event.
- EVT_STC_MODIFIED(id, fn):
  Process a `wxEVT_STC_MODIFIED` event.
- EVT_STC_NEEDSHOWN(id, fn):
  Process a `wxEVT_STC_NEEDSHOWN` event.
- EVT_STC_PAINTED(id, fn):
  Process a `wxEVT_STC_PAINTED` event.
- EVT_STC_ROMODIFYATTEMPT(id, fn):
  Process a `wxEVT_STC_ROMODIFYATTEMPT` event.
- EVT_STC_SAVEPOINTLEFT(id, fn):
  Process a `wxEVT_STC_SAVEPOINTLEFT` event.
- EVT_STC_SAVEPOINTREACHED(id, fn):
  Process a `wxEVT_STC_SAVEPOINTREACHED` event.
- EVT_STC_START_DRAG(id, fn):
  Process a `wxEVT_STC_START_DRAG` event.
- EVT_STC_STYLENEEDED(id, fn):
  Process a `wxEVT_STC_STYLENEEDED` event.
- EVT_STC_UPDATEUI(id, fn):
  Process a `wxEVT_STC_UPDATEUI` event.
- EVT_STC_USERLISTSELECTION(id, fn):
  Process a `wxEVT_STC_USERLISTSELECTION` event.
- EVT_STC_ZOOM(id, fn):
  Process a `wxEVT_STC_ZOOM` event.
  Most of the Scintilla notifications are mapped to a similarly named wxStyledTextEvent. However a few of the notifications would only offer information available in other wxWidgets event types, and in those cases a corresponding wxStyledTextEvent is not defined. Currently, the `wxEVT_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 `wxEVT_SET_FOCUS` event is used instead of the `SCN_FOCUSIN` notification. And the `wxEVT_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).

`wxEVT_STC_AUTOCOMP_CANCELLED`

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

`wxEVT_STC_AUTOCOMP_CHAR_DELETED`

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

`wxEVT_STC_AUTOCOMP_COMPLETED`

- Generated after an autocompletion list has closed and inserted its text into the control.
- Valid event functions: GetKey, GetPosition, GetString, GetListCompletionMethod.

`wxEVT_STC_AUTOCOMP_SELECTION`

- Generated when an entry has been selected in an autocompletion list but before the text has been inserted.
- To prevent the insertion, call wxStyledTextCtrl::AutoCompCancel in the event handler.
- Valid event functions: GetKey, GetPosition, GetString, GetListCompletionMethod.

`wxEVT_STC_AUTOCOMP_SELECTION_CHANGE`

- Generated when items are highlighted in an autocompletion or user list.
- GetPosition will return the position at which the list is being shown.
- For a user list, GetListType will return the list type. The list type is a value input in to the wxStyledTextCtrl::UserListShow method when a user list is created.
- For an autocompletion list, GetListType will always return zero.
- Valid event functions: GetListType, GetPosition, GetString.

`wxEVT_STC_CALLTIP_CLICK`

- Generated when a calltip has been clicked.
- GetPosition 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: GetPosition.

`wxEVT_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 `wxEVT_STC_MODIFIED` instead.
- Valid event functions: none.

`wxEVT_STC_CHARADDED`

- Generated when a character has been added to the control.
- Valid event functions: GetKey.

`wxEVT_STC_CLIPBOARD_COPY`

- Generated when text is being cut or copied to the clipboard.
- Use wxStyledTextEvent::SetString() to modify the text that will be placed on the clipboard.
- Valid event functions: GetString, SetString.

`wxEVT_STC_CLIPBOARD_PASTE`

- Generated when text is being pasted from the clipboard.
- Use wxStyledTextEvent::SetString() to modify the text that will be inserted into the control.
- Valid event functions: GetPosition, GetString, SetString.

`wxEVT_STC_DO_DROP`

- Generated when text is being dropped into the control.
- Details of the drag may be altered by changing the respective fields of the event.
- Valid event functions: GetDragResult, SetDragResult, GetPosition, SetPosition, GetString, SetString, GetX, GetY.

`wxEVT_STC_DOUBLECLICK`

- Generated when the control has been double-clicked.
- Valid event functions: GetLine, GetModifiers, GetPosition, GetAlt, GetControl, GetShift.

`wxEVT_STC_DRAG_OVER`

- Generated repeatedly as text is being dragged inside the control.
- Valid event functions: GetDragResult, SetDragResult, GetPosition, GetX, GetY.

`wxEVT_STC_DWELLEND`

- Generated when the mouse has been moved after a `wxEVT_STC_DWELLSTART` event.
- Valid event functions: GetPosition, GetX, GetY.

`wxEVT_STC_DWELLSTART`

- Generated when the mouse has remained still for a certain amount of time.
- The amount of time can be specified with wxStyledTextCtrl::SetMouseDwellTime.
- Valid event functions: GetPosition, GetX, GetY.

`wxEVT_STC_HOTSPOT_CLICK`

- Generated when a hotspot has been clicked.
- Valid event functions: GetModifiers, GetPosition, GetAlt, GetControl, GetShift.

`wxEVT_STC_HOTSPOT_DCLICK`

- Generated when a hotspot has been double-clicked.
- Valid event functions: GetModifiers, GetPosition, GetAlt, GetControl, GetShift.

`wxEVT_STC_HOTSPOT_RELEASE_CLICK`

- Generated when a click-over hotspot has been released.
- Valid event functions: GetModifiers, GetPosition, GetAlt, GetControl, GetShift.

`wxEVT_STC_INDICATOR_CLICK`

- Generated when an indicator has been clicked.
- Valid event functions: GetModifiers, GetPosition, GetAlt, GetControl, GetShift.

`wxEVT_STC_INDICATOR_RELEASE`

- Generated when a click over an indicator has been released.
- Valid event functions: GetModifiers, GetPosition, GetAlt, GetControl, GetShift.

`wxEVT_STC_MACRORECORD`

- Generated while macro recording is in progress.
- Valid event functions: GetMessage, GetLParam, GetWParam.

`wxEVT_STC_MARGIN_RIGHT_CLICK`

- Generated when one of the margins is clicked with the right mouse button.
- This event is only generated if SetMarginSensitive has been called for one or more of the margins.
- Valid event functions: GetMargin, GetModifiers, GetPosition, GetAlt, GetControl, GetShift.

`wxEVT_STC_MARGINCLICK`

- Generated when one of the margins is clicked.
- This event is only generated if SetMarginSensitive has been called for one or more of the margins.
- Valid event functions: GetMargin, GetModifiers, GetPosition, GetAlt, GetControl, GetShift.

`wxEVT_STC_MODIFIED`

- Generated when the contents of the control have changed or are about to change.
- You should not attempt to make any changes to the control inside a handler for this event.
- Valid event functions: GetAnnotationsLinesAdded, GetFoldLevelNow, GetFoldLevelPrev, GetLength, GetLine, GetLinesAdded, GetModificationType, GetPosition, GetString, GetToken.

`wxEVT_STC_NEEDSHOWN`

- Generated when certain lines should be made visible by scrolling the text in the control.
- Valid event functions: GetLength, GetPosition.

`wxEVT_STC_PAINTED`

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

`wxEVT_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.

`wxEVT_STC_SAVEPOINTREACHED`

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

`wxEVT_STC_SAVEPOINTLEFT`

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

`wxEVT_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: GetDragFlags, SetDragFlags, GetPosition, GetString, SetString.

`wxEVT_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 wxSTC_LEX_CONTAINER.
- Valid event functions: GetPosition.

`wxEVT_STC_UPDATEUI`

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

`wxEVT_STC_USERLISTSELECTION`

- Generated when a selection has been made from a user list.
- Valid event functions: GetListType, GetPosition, GetString, GetKey, GetListCompletionMethod.

`wxEVT_STC_ZOOM`

- Generated when the zoom factor of the control has been changed either by the user or a call to wxStyledTextCtrl::ZoomIn/ZoomOut.
- Valid event functions: none.

##

Library: wxSTC

<>< =''>:</>&;&;< =''>\ , \ </></>

## Public Member Functions
| wxStyledTextEvent (wxEventType commandType=0, int id=0)
| Constructor.
| wxStyledTextEvent (const wxStyledTextEvent &event)
| Copy constructor.
| ~wxStyledTextEvent ()
| Destructor.
bool | GetAlt () const
| Returns true if the Alt key is pressed.
int | GetAnnotationsLinesAdded () const
| Returns the number of lines that have been added to or removed from an annotation.
bool | GetControl () const
| Returns true if the Control key is pressed.
int | GetDragFlags ()
| Returns flags for the drag operation associated with this event.
wxDragResult | GetDragResult ()
| Returns drag result for this event.
wxString | GetDragText ()
int | GetFoldLevelNow () const
| Returns the current fold level for the line.
int | GetFoldLevelPrev () const
| Returns previous fold level for the line.
int | GetKey () const
| Returns the key code of the key that generated this event.
int | GetLength () const
| Returns the length (number of characters) of this event.
int | GetLine () const
| Returns zero-based line number for this event.
int | GetLinesAdded () const
| Returns the number of lines added or deleted with this event.
int | GetListCompletionMethod () const
| Returns a value describing the action that closed the list.
int | GetListType () const
| Returns the list type for this event.
int | GetLParam () const
| Returns the value of the LParam field for this event.
int | GetMargin () const
| Returns the zero-based index of the margin that generated this event.
int | GetMessage () const
| Returns a message number while a macro is being recorded.
int | GetModificationType () const
| Returns the modification type for this event.
int | GetModifiers () const
| Returns the modifiers of the key press or mouse click for this event.
int | GetPosition () const
| Returns the zero-based text position associated this event.
bool | GetShift () const
| Returns true if the Shift key is pressed.
wxString | GetText () const
int | GetToken () const
| Returns the token value for this event.
int | GetUpdated () const
| Returns the value of the updated field for this event.
int | GetWParam () const
| Returns value of the WParam field for this event.
int | GetX () const
| Returns the X coordinate of the mouse for this event.
int | GetY () const
| Returns the Y coordinate of the mouse for this event.
void | SetAnnotationLinesAdded (int val)
| Sets the annotation lines added value for this event.
void | SetDragFlags (int flags)
| Sets the drag flags for this event.
void | SetDragResult (wxDragResult val)
| Sets the drag result for this event.
void | SetDragText (const wxString &val)
| Sets the drag text for this event.
void | SetFoldLevelNow (int val)
| Sets the current fold level for this event.
void | SetFoldLevelPrev (int val)
| Sets the previous fold level for this event.
void | SetKey (int k)
| Sets the key code for this event.
void | SetLength (int len)
| Sets the length value for this event.
void | SetLine (int val)
| Sets line number for this event.
void | SetLinesAdded (int num)
| Sets the number of lines added for this event.
void | SetListCompletionMethod (int val)
| Sets the list completion method for this event.
void | SetListType (int val)
| Sets the list type for this event.
void | SetLParam (int val)
| Sets value of the LParam field for this event.
void | SetMargin (int val)
| Sets margin number for this event.
void | SetMessage (int val)
| Sets message number for this event.
void | SetModificationType (int t)
| Sets the modification type for this event.
void | SetModifiers (int m)
| Sets the value of the modifiers field for this event.
void | SetPosition (int pos)
| Sets file position for this event.
void | SetText (const wxString &t)
| Sets the text for this event.
void | SetToken (int val)
| Sets the token for this event.
void | SetUpdated (int val)
| Sets the value of the updated field for this event.
void | SetWParam (int val)
| Sets the value of the WParam field for this event.
void | SetX (int val)
| Sets the X value for this event.
void | SetY (int val)
| Sets the Y value for this event.
Public Member Functions inherited from wxCommandEvent
| wxCommandEvent (wxEventType commandEventType=wxEVT_NULL, int id=0)
| Constructor.
void * | GetClientData () const
| Returns client data pointer for a listbox or choice selection event (not valid for a deselection).
wxClientData * | GetClientObject () const
| Returns client object pointer for a listbox or choice selection event (not valid for a deselection).
long | GetExtraLong () const
| Returns extra information dependent on the event objects type.
int | GetInt () const
| Returns the integer identifier corresponding to a listbox, choice or radiobox selection (only if the event was a selection, not a deselection), or a boolean value representing the value of a checkbox.
int | GetSelection () const
| Returns item index for a listbox or choice selection event (not valid for a deselection).
wxString | GetString () const
| Returns item string for a listbox or choice selection event.
bool | IsChecked () const
| This method can be used with checkbox and menu events: for the checkboxes, the method returns true for a selection event and false for a deselection one.
bool | IsSelection () const
| For a listbox or similar event, returns true if it is a selection, false if it is a deselection.
void | SetClientData (void *clientData)
| Sets the client data for this event.
void | SetClientObject (wxClientData *clientObject)
| Sets the client object for this event.
void | SetExtraLong (long extraLong)
| Sets the m_extraLong member.
void | SetInt (int intCommand)
| Sets the m_commandInt member.
void | SetString (const wxString &string)
| Sets the m_commandString member.
Public Member Functions inherited from wxEvent
| wxEvent (int id=0, wxEventType eventType=wxEVT_NULL)
| Constructor.
virtual wxEvent * | Clone () const =0
| Returns a copy of the event.
wxObject * | GetEventObject () const
| Returns the object (usually a window) associated with the event, if any.
wxEventType | GetEventType () const
| Returns the identifier of the given event type, such as `wxEVT_BUTTON`.
virtual wxEventCategory | GetEventCategory () const
| Returns a generic category for this event.
int | GetId () const
| Returns the identifier associated with this event, such as a button command id.
wxObject * | GetEventUserData () const
| Return the user data associated with a dynamically connected event handler.
bool | GetSkipped () const
| Returns true if the event handler should be skipped, false otherwise.
long | GetTimestamp () const
| Gets the timestamp for the event.
bool | IsCommandEvent () const
| Returns true if the event is or is derived from wxCommandEvent else it returns false.
void | ResumePropagation (int propagationLevel)
| Sets the propagation level to the given value (for example returned from an earlier call to wxEvent::StopPropagation).
void | SetEventObject (wxObject *object)
| Sets the originating object.
void | SetEventType (wxEventType type)
| Sets the event type.
void | SetId (int id)
| Sets the identifier associated with this event, such as a button command id.
void | SetTimestamp (long timeStamp=0)
| Sets the timestamp for the event.
bool | ShouldPropagate () const
| Test if this event should be propagated or not, i.e. if the propagation level is currently greater than 0.
void | Skip (bool skip=true)
| This method can be used inside an event handler to control whether further event handlers bound to this event will be called after the current one returns.
int | StopPropagation ()
| Stop the event from propagating to its parent window.
Public Member Functions inherited from wxObject
| wxObject ()
| Default ctor; initializes to NULL the internal reference data.
| wxObject (const wxObject &other)
| Copy ctor.
virtual | ~wxObject ()
| Destructor.
virtual wxClassInfo * | GetClassInfo () const
| This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar).
wxObjectRefData * | GetRefData () const
| Returns the wxObject::m_refData pointer, i.e. the data referenced by this object.
bool | IsKindOf (const wxClassInfo *info) const
| Determines whether this class is a subclass of (or the same class as) the given class.
bool | IsSameAs (const wxObject &obj) const
| Returns true if this object has the same data pointer as obj.
void | Ref (const wxObject &clone)
| Makes this object refer to the data in clone.
void | SetRefData (wxObjectRefData *data)
| Sets the wxObject::m_refData pointer.
void | UnRef ()
| Decrements the reference count in the associated data, and if it is zero, deletes the data.
void | UnShare ()
| This is the same of AllocExclusive() but this method is public.
void | operator delete (void *buf)
| The delete operator is defined for debugging versions of the library only, when the identifier `__WXDEBUG__` is defined.
void * | operator new (size_t size, const wxString &filename=NULL, int lineNum=0)
| The new operator is defined for debugging versions of the library only, when the identifier `__WXDEBUG__` is defined.

## Additional Inherited Members
Protected Member Functions inherited from wxObject
void | AllocExclusive ()
| Ensure that this object's data is not shared with any other object.
virtual wxObjectRefData * | CreateRefData () const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it.
virtual wxObjectRefData * | CloneRefData (const wxObjectRefData *data) const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data.
Protected Attributes inherited from wxEvent
int | m_propagationLevel
| Indicates how many levels the event can propagate.
Protected Attributes inherited from wxObject
wxObjectRefData * | m_refData
| Pointer to an object which is the object's reference-counted data.

## Constructor & Destructor Documentation

## ◆ wxStyledTextEvent() [1/2]

wxStyledTextEvent::wxStyledTextEvent | ( | wxEventType | commandType = 0,
|  | int | id = 0 )

Constructor.

## ◆ wxStyledTextEvent() [2/2]

wxStyledTextEvent::wxStyledTextEvent | ( | const wxStyledTextEvent & | event | ) |

Copy constructor.

## ◆ ~wxStyledTextEvent()

wxStyledTextEvent::~wxStyledTextEvent | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ GetAlt()

bool wxStyledTextEvent::GetAlt | ( |  | ) | const

Returns true if the Alt key is pressed.

This method is valid for the following event types:

- `wxEVT_STC_DOUBLECLICK`
- `wxEVT_STC_MARGINCLICK`
- `wxEVT_STC_HOTSPOT_CLICK`
- `wxEVT_STC_HOTSPOT_DCLICK`
- `wxEVT_STC_HOTSPOT_RELEASE_CLICK`
- `wxEVT_STC_INDICATOR_CLICK`
- `wxEVT_STC_INDICATOR_RELEASE`
- `wxEVT_STC_MARGIN_RIGHT_CLICK`

## ◆ GetAnnotationsLinesAdded()

int wxStyledTextEvent::GetAnnotationsLinesAdded | ( |  | ) | const

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

This method is valid for `wxEVT_STC_MODIFIED` events when the result of GetModificationType() includes wxSTC_MOD_CHANGEANNOTATION.

## ◆ GetControl()

bool wxStyledTextEvent::GetControl | ( |  | ) | const

Returns true if the Control key is pressed.

This method is valid for the following event types:

- `wxEVT_STC_DOUBLECLICK`
- `wxEVT_STC_MARGINCLICK`
- `wxEVT_STC_HOTSPOT_CLICK`
- `wxEVT_STC_HOTSPOT_DCLICK`
- `wxEVT_STC_HOTSPOT_RELEASE_CLICK`
- `wxEVT_STC_INDICATOR_CLICK`
- `wxEVT_STC_INDICATOR_RELEASE`
- `wxEVT_STC_MARGIN_RIGHT_CLICK`

## ◆ GetDragFlags()

int wxStyledTextEvent::GetDragFlags | ( |  | ) |

Returns flags for the drag operation associated with this event.

This method is valid for `wxEVT_STC_START_DRAG` events.

## ◆ GetDragResult()

wxDragResult wxStyledTextEvent::GetDragResult | ( |  | ) |

Returns drag result for this event.

This method is valid for `wxEVT_STC_DRAG_OVER` and `wxEVT_STC_DO_DROP` events.

## ◆ GetDragText()

wxString wxStyledTextEvent::GetDragText | ( |  | ) |

Deprecated
  Use GetString() instead.

## ◆ GetFoldLevelNow()

int wxStyledTextEvent::GetFoldLevelNow | ( |  | ) | const

Returns the current fold level for the line.

This method is valid for `wxEVT_STC_MODIFIED` events when the result of GetModificationType() includes wxSTC_MOD_CHANGEFOLD.

## ◆ GetFoldLevelPrev()

int wxStyledTextEvent::GetFoldLevelPrev | ( |  | ) | const

Returns previous fold level for the line.

This method is valid for `wxEVT_STC_MODIFIED` events when the result of GetModificationType() includes wxSTC_MOD_CHANGEFOLD.

## ◆ GetKey()

int wxStyledTextEvent::GetKey | ( |  | ) | const

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

This method is valid for the following event types:

- `wxEVT_STC_CHARADDED`
- `wxEVT_STC_USERLISTSELECTION`
- `wxEVT_STC_AUTOCOMP_SELECTION`
- `wxEVT_STC_AUTOCOMP_COMPLETED`

## ◆ GetLength()

int wxStyledTextEvent::GetLength | ( |  | ) | const

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

This method is valid for `wxEVT_STC_MODIFIED` and `wxEVT_STC_NEEDSHOWN` events.

## ◆ GetLine()

int wxStyledTextEvent::GetLine | ( |  | ) | const

Returns zero-based line number for this event.

This method is valid for `wxEVT_STC_DOUBLECLICK` and `wxEVT_STC_MODIFIED` events.

## ◆ GetLinesAdded()

int wxStyledTextEvent::GetLinesAdded | ( |  | ) | const

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

This method is valid for `wxEVT_STC_MODIFIED` events when the result of GetModificationType() includes wxSTC_MOD_INSERTTEXT or wxSTC_MOD_DELETETEXT.

## ◆ GetListCompletionMethod()

int wxStyledTextEvent::GetListCompletionMethod | ( |  | ) | const

Returns a value describing the action that closed the list.

The returned value will be one of the following constants:

wxSTC_AC_FILLUP | A fillup character caused the completion.
wxSTC_AC_DOUBLECLICK | A double-click caused the completion.
wxSTC_AC_TAB | The tab key caused the completion.
wxSTC_AC_NEWLINE | The enter key caused the completion.
wxSTC_AC_COMMAND | The wxStyledTextCtrl::AutoCompComplete method was called.

This method is valid for `wxEVT_STC_USERLISTSELECTION`, `wxEVT_STC_AUTOCOMP_SELECTION`, and `wxEVT_STC_AUTOCOMP_COMPLETED` events.

Since
  3.1.1

## ◆ GetListType()

int wxStyledTextEvent::GetListType | ( |  | ) | const

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 `wxEVT_STC_AUTOCOMP_SELECTION_CHANGE` and `wxEVT_STC_USERLISTSELECTION` events.

## ◆ GetLParam()

int wxStyledTextEvent::GetLParam | ( |  | ) | const

Returns the value of the LParam field for this event.

This method is valid for `wxEVT_STC_MACRORECORD` events.

## ◆ GetMargin()

int wxStyledTextEvent::GetMargin | ( |  | ) | const

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

This method is valid for `wxEVT_STC_MARGINCLICK` and `wxEVT_STC_MARGIN_RIGHT_CLICK` events.

## ◆ GetMessage()

int wxStyledTextEvent::GetMessage | ( |  | ) | const

Returns a message number while a macro is being recorded.

Many of the wxStyledTextCtrl 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 `wxEVT_STC_MACRORECORD` events.

## ◆ GetModificationType()

int wxStyledTextEvent::GetModificationType | ( |  | ) | const

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 `wxEVT_STC_MODIFIED` events.

## ◆ GetModifiers()

int wxStyledTextEvent::GetModifiers | ( |  | ) | const

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:

- `wxEVT_STC_DOUBLECLICK`
- `wxEVT_STC_MARGINCLICK`
- `wxEVT_STC_HOTSPOT_CLICK`
- `wxEVT_STC_HOTSPOT_DCLICK`
- `wxEVT_STC_HOTSPOT_RELEASE_CLICK`
- `wxEVT_STC_INDICATOR_CLICK`
- `wxEVT_STC_INDICATOR_RELEASE`
- `wxEVT_STC_MARGIN_RIGHT_CLICK`

## ◆ GetPosition()

int wxStyledTextEvent::GetPosition | ( |  | ) | const

Returns the zero-based text position associated this event.

This method is valid for the following event types:

- `wxEVT_STC_STYLENEEDED`
- `wxEVT_STC_DOUBLECLICK`
- `wxEVT_STC_MODIFIED`
- `wxEVT_STC_MARGINCLICK`
- `wxEVT_STC_NEEDSHOWN`
- `wxEVT_STC_USERLISTSELECTION`
- `wxEVT_STC_DWELLSTART`
- `wxEVT_STC_DWELLEND`
- `wxEVT_STC_HOTSPOT_CLICK`
- `wxEVT_STC_HOTSPOT_DCLICK`
- `wxEVT_STC_HOTSPOT_RELEASE_CLICK`
- `wxEVT_STC_INDICATOR_CLICK`
- `wxEVT_STC_INDICATOR_RELEASE`
- `wxEVT_STC_CALLTIP_CLICK`
- `wxEVT_STC_AUTOCOMP_SELECTION`
- `wxEVT_STC_AUTOCOMP_SELECTION_CHANGE`
- `wxEVT_STC_AUTOCOMP_COMPLETED`
- `wxEVT_STC_MARGIN_RIGHT_CLICK`

## ◆ GetShift()

bool wxStyledTextEvent::GetShift | ( |  | ) | const

Returns true if the Shift key is pressed.

This method is valid for the following event types:

- `wxEVT_STC_DOUBLECLICK`
- `wxEVT_STC_MARGINCLICK`
- `wxEVT_STC_HOTSPOT_CLICK`
- `wxEVT_STC_HOTSPOT_DCLICK`
- `wxEVT_STC_HOTSPOT_RELEASE_CLICK`
- `wxEVT_STC_INDICATOR_CLICK`
- `wxEVT_STC_INDICATOR_RELEASE`
- `wxEVT_STC_MARGIN_RIGHT_CLICK`

## ◆ GetText()

wxString wxStyledTextEvent::GetText | ( |  | ) | const

Deprecated
  Use GetString() instead.

## ◆ GetToken()

int wxStyledTextEvent::GetToken | ( |  | ) | const

Returns the token value for this event.

The token is an integer value that can be set with a call to the wxStyledTextCtrl::AddUndoAction method.

This method is valid for `wxEVT_STC_MODIFIED` events when the result of GetModificationType() includes wxSTC_MOD_CONTAINER.

## ◆ GetUpdated()

int wxStyledTextEvent::GetUpdated | ( |  | ) | const

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 `wxEVT_STC_UPDATEUI` events.

## ◆ GetWParam()

int wxStyledTextEvent::GetWParam | ( |  | ) | const

Returns value of the WParam field for this event.

This method is valid for `wxEVT_STC_MACRORECORD` events.

## ◆ GetX()

int wxStyledTextEvent::GetX | ( |  | ) | const

Returns the X coordinate of the mouse for this event.

This method is valid for the following event types:

- `wxEVT_STC_DWELLSTART`
- `wxEVT_STC_DWELLEND`
- `wxEVT_STC_START_DRAG`
- `wxEVT_STC_DRAG_OVER`
- `wxEVT_STC_DO_DROP`

## ◆ GetY()

int wxStyledTextEvent::GetY | ( |  | ) | const

Returns the Y coordinate of the mouse for this event.

This method is valid for the following event types:

- `wxEVT_STC_DWELLSTART`
- `wxEVT_STC_DWELLEND`
- `wxEVT_STC_START_DRAG`
- `wxEVT_STC_DRAG_OVER`
- `wxEVT_STC_DO_DROP`

## ◆ SetAnnotationLinesAdded()

void wxStyledTextEvent::SetAnnotationLinesAdded | ( | int | val | ) |

Sets the annotation lines added value for this event.

## ◆ SetDragFlags()

void wxStyledTextEvent::SetDragFlags | ( | int | flags | ) |

Sets the drag flags for this event.

## ◆ SetDragResult()

void wxStyledTextEvent::SetDragResult | ( | wxDragResult | val | ) |

Sets the drag result for this event.

## ◆ SetDragText()

void wxStyledTextEvent::SetDragText | ( | const wxString & | val | ) |

Sets the drag text for this event.

Deprecated

## ◆ SetFoldLevelNow()

void wxStyledTextEvent::SetFoldLevelNow | ( | int | val | ) |

Sets the current fold level for this event.

## ◆ SetFoldLevelPrev()

void wxStyledTextEvent::SetFoldLevelPrev | ( | int | val | ) |

Sets the previous fold level for this event.

## ◆ SetKey()

void wxStyledTextEvent::SetKey | ( | int | k | ) |

Sets the key code for this event.

## ◆ SetLength()

void wxStyledTextEvent::SetLength | ( | int | len | ) |

Sets the length value for this event.

## ◆ SetLine()

void wxStyledTextEvent::SetLine | ( | int | val | ) |

Sets line number for this event.

## ◆ SetLinesAdded()

void wxStyledTextEvent::SetLinesAdded | ( | int | num | ) |

Sets the number of lines added for this event.

## ◆ SetListCompletionMethod()

void wxStyledTextEvent::SetListCompletionMethod | ( | int | val | ) |

Sets the list completion method for this event.

Since
  3.1.1

## ◆ SetListType()

void wxStyledTextEvent::SetListType | ( | int | val | ) |

Sets the list type for this event.

## ◆ SetLParam()

void wxStyledTextEvent::SetLParam | ( | int | val | ) |

Sets value of the LParam field for this event.

## ◆ SetMargin()

void wxStyledTextEvent::SetMargin | ( | int | val | ) |

Sets margin number for this event.

## ◆ SetMessage()

void wxStyledTextEvent::SetMessage | ( | int | val | ) |

Sets message number for this event.

## ◆ SetModificationType()

void wxStyledTextEvent::SetModificationType | ( | int | t | ) |

Sets the modification type for this event.

## ◆ SetModifiers()

void wxStyledTextEvent::SetModifiers | ( | int | m | ) |

Sets the value of the modifiers field for this event.

## ◆ SetPosition()

void wxStyledTextEvent::SetPosition | ( | int | pos | ) |

Sets file position for this event.

## ◆ SetText()

void wxStyledTextEvent::SetText | ( | const wxString & | t | ) |

Sets the text for this event.

Deprecated

## ◆ SetToken()

void wxStyledTextEvent::SetToken | ( | int | val | ) |

Sets the token for this event.

## ◆ SetUpdated()

void wxStyledTextEvent::SetUpdated | ( | int | val | ) |

Sets the value of the updated field for this event.

## ◆ SetWParam()

void wxStyledTextEvent::SetWParam | ( | int | val | ) |

Sets the value of the WParam field for this event.

## ◆ SetX()

void wxStyledTextEvent::SetX | ( | int | val | ) |

Sets the X value for this event.

## ◆ SetY()

void wxStyledTextEvent::SetY | ( | int | val | ) |

Sets the Y value for this event.