Search documentation of wx

# View Source wxStyledTextEvent (wx v2.4.2)

Functions for wxStyledTextEvent class

The type of events sent from `wxStyledTextCtrl`.

This class is derived (and can use functions) from: `wxCommandEvent` `wxEvent`

wxWidgets docs: wxStyledTextEvent

## Events

Use `wxEvtHandler:connect/3` with `wxStyledTextEventType` to subscribe to events of this type.

# Summary

## Types

wxStyledText()
wxStyledTextEvent()
wxStyledTextEventType()

## Functions

getAlt(This)

Returns true if the Alt key is pressed.

getControl(This)

Returns true if the Control key is pressed.

getDragAllowMove(This)
getDragResult(This)

Returns drag result for this event.

getDragText(This)

Deprecated: Use `wxCommandEvent:getString/1` instead.

getFoldLevelNow(This)

Returns the current fold level for the line.

getFoldLevelPrev(This)

Returns previous fold level for the line.

getKey(This)

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

getLength(This)

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

getLine(This)

Returns zero-based line number for this event.

getLinesAdded(This)

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

getListType(This)

Returns the list type for this event.

getLParam(This)

Returns the value of the LParam field for this event.

getMargin(This)

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

getMessage(This)

Returns a message number while a macro is being recorded.

getModificationType(This)

Returns the modification type for this event.

getModifiers(This)

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

getPosition(This)

Returns the zero-based text position associated this event.

getShift(This)

Returns true if the Shift key is pressed.

getText(This)

Deprecated: Use `wxCommandEvent:getString/1` instead.

getWParam(This)

Returns value of the WParam field for this event.

getX(This)

Returns the X coordinate of the mouse for this event.

getY(This)

Returns the Y coordinate of the mouse for this event.

# Types

Link to this type

# wxStyledText()

View Source

    -type wxStyledText() ::
              #wxStyledText{type :: wxStyledTextEvent:wxStyledTextEventType(),
                            position :: integer(),
                            key :: integer(),
                            modifiers :: integer(),
                            modificationType :: integer(),
                            text :: unicode:chardata(),
                            length :: integer(),
                            linesAdded :: integer(),
                            line :: integer(),
                            foldLevelNow :: integer(),
                            foldLevelPrev :: integer(),
                            margin :: integer(),
                            message :: integer(),
                            wParam :: integer(),
                            lParam :: integer(),
                            listType :: integer(),
                            x :: integer(),
                            y :: integer(),
                            dragText :: unicode:chardata(),
                            dragAllowMove :: boolean(),
                            dragResult :: wx:wx_enum()}.

Link to this type

# wxStyledTextEvent()

View Source

    -type wxStyledTextEvent() :: wx:wx_object().

Link to this type

# wxStyledTextEventType()

View Source

    -type wxStyledTextEventType() ::
              stc_autocomp_cancelled | stc_autocomp_char_deleted | stc_autocomp_selection |
              stc_calltip_click | stc_change | stc_charadded | stc_do_drop | stc_doubleclick |
              stc_drag_over | stc_dwellend | stc_dwellstart | stc_hotspot_click | stc_hotspot_dclick |
              stc_hotspot_release_click | stc_indicator_click | stc_indicator_release | stc_macrorecord |
              stc_marginclick | stc_modified | stc_needshown | stc_painted | stc_romodifyattempt |
              stc_savepointleft | stc_savepointreached | stc_start_drag | stc_styleneeded | stc_updateui |
              stc_userlistselection | stc_zoom.

# Functions

Link to this function

# getAlt(This)

View Source

    -spec getAlt(This) -> boolean() when This :: wxStyledTextEvent().

Returns true if the Alt key is pressed.

This method is valid for the following event types:

Link to this function

# getControl(This)

View Source

    -spec getControl(This) -> boolean() when This :: wxStyledTextEvent().

Returns true if the Control key is pressed.

This method is valid for the following event types:

Link to this function

# getDragAllowMove(This)

View Source

    -spec getDragAllowMove(This) -> boolean() when This :: wxStyledTextEvent().

Link to this function

# getDragResult(This)

View Source

    -spec getDragResult(This) -> wx:wx_enum() when This :: wxStyledTextEvent().

Returns drag result for this event.

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

Link to this function

# getDragText(This)

View Source

    -spec getDragText(This) -> unicode:charlist() when This :: wxStyledTextEvent().

Deprecated: Use `wxCommandEvent:getString/1` instead.

Link to this function

# getFoldLevelNow(This)

View Source

    -spec getFoldLevelNow(This) -> integer() when This :: wxStyledTextEvent().

Returns the current fold level for the line.

This method is valid for `wxEVT_STC_MODIFIED` events when the result of `getModificationType/1` includes ?wxSTC_MOD_CHANGEFOLD.

Link to this function

# getFoldLevelPrev(This)

View Source

    -spec getFoldLevelPrev(This) -> integer() when This :: wxStyledTextEvent().

Returns previous fold level for the line.

This method is valid for `wxEVT_STC_MODIFIED` events when the result of `getModificationType/1` includes ?wxSTC_MOD_CHANGEFOLD.

Link to this function

# getKey(This)

View Source

    -spec getKey(This) -> integer() when This :: wxStyledTextEvent().

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

This method is valid for the following event types:

Link to this function

# getLength(This)

View Source

    -spec getLength(This) -> integer() when This :: wxStyledTextEvent().

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

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

Link to this function

# getLine(This)

View Source

    -spec getLine(This) -> integer() when This :: wxStyledTextEvent().

Returns zero-based line number for this event.

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

Link to this function

# getLinesAdded(This)

View Source

    -spec getLinesAdded(This) -> integer() when This :: wxStyledTextEvent().

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/1` includes ?wxSTC_MOD_INSERTTEXT or ?wxSTC_MOD_DELETETEXT.

Link to this function

# getListType(This)

View Source

    -spec getListType(This) -> integer() when This :: wxStyledTextEvent().

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/3` 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.

Link to this function

# getLParam(This)

View Source

    -spec getLParam(This) -> integer() when This :: wxStyledTextEvent().

Returns the value of the LParam field for this event.

This method is valid for `wxEVT_STC_MACRORECORD` events.

Link to this function

# getMargin(This)

View Source

    -spec getMargin(This) -> integer() when This :: wxStyledTextEvent().

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.

Link to this function

# getMessage(This)

View Source

    -spec getMessage(This) -> integer() when This :: wxStyledTextEvent().

Returns a message number while a macro is being recorded.

Many of the `wxStyledTextCtrl` methods such as `wxStyledTextCtrl:insertText/3` and `wxStyledTextCtrl:paste/1` 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.

Link to this function

# getModificationType(This)

View Source

    -spec getModificationType(This) -> integer() when This :: wxStyledTextEvent().

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:

This method is valid for `wxEVT_STC_MODIFIED` events.

Link to this function

# getModifiers(This)

View Source

    -spec getModifiers(This) -> integer() when This :: wxStyledTextEvent().

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:

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:

Link to this function

# getPosition(This)

View Source

    -spec getPosition(This) -> integer() when This :: wxStyledTextEvent().

Returns the zero-based text position associated this event.

This method is valid for the following event types:

Link to this function

# getShift(This)

View Source

    -spec getShift(This) -> boolean() when This :: wxStyledTextEvent().

Returns true if the Shift key is pressed.

This method is valid for the following event types:

Link to this function

# getText(This)

View Source

    -spec getText(This) -> unicode:charlist() when This :: wxStyledTextEvent().

Deprecated: Use `wxCommandEvent:getString/1` instead.

Link to this function

# getWParam(This)

View Source

    -spec getWParam(This) -> integer() when This :: wxStyledTextEvent().

Returns value of the WParam field for this event.

This method is valid for `wxEVT_STC_MACRORECORD` events.

Link to this function

# getX(This)

View Source

    -spec getX(This) -> integer() when This :: wxStyledTextEvent().

Returns the X coordinate of the mouse for this event.

This method is valid for the following event types:

Link to this function

# getY(This)

View Source

    -spec getY(This) -> integer() when This :: wxStyledTextEvent().

Returns the Y coordinate of the mouse for this event.

This method is valid for the following event types: