wxStyledTextCtrl(3erl)

๐Ÿ“ฆ
version 25.3.2.8 ยท 5 versions
, in ubuntu noble

๐ŸŒธ NAME

wxStyledTextCtrl โ€” welcome to the Erlang manual page for this absolute icon, wxStyledTextCtrl(3erl). It's the Erlang Module Definition for Functions for the wxStyledTextCtrl class, bestie. ๐Ÿซถ


โœจ DESCRIPTION

Okay so wxStyledTextCtrl is a wxWidgets implementation of the Scintilla source code editing component. ๐Ÿ’…

Scintilla doesn't just do standard text-editing stuff โ€” it also has features that are especially useful when you're editing and debugging source code. We're talking syntax styling, error indicators, code completion, and call tips. It's giving editor-with-a-brain. ๐Ÿง โœจ

The selection margin can have markers like the ones debuggers use to show breakpoints and the current line. Styling choices are more open than with lots of editors, so you can use proportional fonts, bold and italics, multiple foreground and background colours, and multiple fonts. Highkey versatile. ๐ŸŒˆ

wxStyledTextCtrl is a 1 to 1 mapping of the "raw" scintilla interface. The docs for that live on the Scintilla website (http://www.scintilla.org/). No cap.

Please see wxStyledTextEvent for the documentation of all event types you can use with wxStyledTextCtrl. That's where the event lore lives. ๐Ÿฆ‹

Index of the member groups

Links for quick access to the various categories of wxStyledTextCtrl functions:

See: wxStyledTextEvent

This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler

wxWidgets docs: wxStyledTextCtrl


๐Ÿงฌ DATA TYPES

wxStyledTextCtrl() = wx:wx_object()

๐Ÿ’… EXPORTS

Now the main event: every exported function in this part, in order, with all the type tea. โ˜•

new() -> wxStyledTextCtrl()

Default ctor. The no-args start of it all.

new(Parent) -> wxStyledTextCtrl()

Types:

Parent = wxWindow:wxWindow()

new(Parent, Options :: [Option]) -> wxStyledTextCtrl()

Types:

Parent = wxWindow:wxWindow()
Option =
    {id, integer()} |
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()}

Ctor. This is the one with parent and options.

destroy(This :: wxStyledTextCtrl()) -> ok

Destructor. Time to clean up. ๐Ÿงน

create(This, Parent) -> boolean()

Types:

This = wxStyledTextCtrl()
Parent = wxWindow:wxWindow()

create(This, Parent, Options :: [Option]) -> boolean()

Types:

This = wxStyledTextCtrl()
Parent = wxWindow:wxWindow()
Option =
    {id, integer()} |
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()}

Create the UI elements for a STC that was created with the default ctor. This is the 2-phase create situation, iykyk. โœจ

addText(This, Text) -> ok

Types:

This = wxStyledTextCtrl()
Text = unicode:chardata()

Adds text to the document at the current position. Just drops it right where you're at. ๐Ÿ’–

insertText(This, Pos, Text) -> ok

Types:

This = wxStyledTextCtrl()
Pos = integer()
Text = unicode:chardata()

Inserts a string at a position. Specifically at Pos. ๐ŸŽ€

clearAll(This) -> ok

Types:

This = wxStyledTextCtrl()

Deletes all text in the document. Full reset energy.

clearDocumentStyle(This) -> ok

Types:

This = wxStyledTextCtrl()

Sets all style bytes to 0 and removes all folding information. Style reset plus folding cleanup. ๐Ÿงผ

getLength(This) -> integer()

Types:

This = wxStyledTextCtrl()

Returns the number of bytes in the document. Bytes, not vibes. ๐Ÿ’€

getCharAt(This, Pos) -> integer()

Types:

This = wxStyledTextCtrl()
Pos = integer()

Returns the character byte at the position.

getCurrentPos(This) -> integer()

Types:

This = wxStyledTextCtrl()

Returns the position of the caret. Where's the caret? Right here, bestie. ๐Ÿ“

getAnchor(This) -> integer()

Types:

This = wxStyledTextCtrl()

Returns the position of the opposite end of the selection to the caret. That's the anchor. ๐Ÿซถ

getStyleAt(This, Pos) -> integer()

Types:

This = wxStyledTextCtrl()
Pos = integer()

Returns the style byte at the position.

redo(This) -> ok

Types:

This = wxStyledTextCtrl()

Redoes the next action on the undo history. Redo era. ๐Ÿ”ฅ

setUndoCollection(This, CollectUndo) -> ok

Types:

This = wxStyledTextCtrl()
CollectUndo = boolean()

Choose between collecting actions into the undo history and discarding them. You're picking the undo-collection policy. โœ…

selectAll(This) -> ok

Types:

This = wxStyledTextCtrl()

Selects all the text in the document. Ctrl+A behavior, but as a function. ๐Ÿ‘‘

setSavePoint(This) -> ok

Types:

This = wxStyledTextCtrl()

Remembers the current position in the undo history as the position at which the document was saved. It's the save-point marker. ๐Ÿ’พ

canRedo(This) -> boolean()

Types:

This = wxStyledTextCtrl()

Are there any redoable actions in the undo history? Returns a boolean. ๐Ÿ”

markerLineFromHandle(This, MarkerHandle) -> integer()

Types:

This = wxStyledTextCtrl()
MarkerHandle = integer()

Retrieves the line number at which a particular marker is located. Find that marker's line. ๐Ÿ”Ž

markerDeleteHandle(This, MarkerHandle) -> ok

Types:

This = wxStyledTextCtrl()
MarkerHandle = integer()

Deletes a marker. Bye, marker. ๐Ÿ‘‹

getUndoCollection(This) -> boolean()

Types:

This = wxStyledTextCtrl()

Is undo history being collected? Yes/no, bestie.

getViewWhiteSpace(This) -> integer()

Types:

This = wxStyledTextCtrl()

Are white space characters currently visible? Returns one of the wxSTC_WS_* constants. ๐Ÿ‘€

setViewWhiteSpace(This, ViewWS) -> ok

Types:

This = wxStyledTextCtrl()
ViewWS = integer()

Makes white space characters invisible, always visible, or visible outside indentation. The input should be one of the ?wxSTC_WS_* constants. โœจ

positionFromPoint(This, Pt) -> integer()

Types:

This = wxStyledTextCtrl()
Pt = {X :: integer(), Y :: integer()}

Finds the position from a point within the window. Window point in, text position out. ๐ŸŽฏ

positionFromPointClose(This, X, Y) -> integer()

Types:

This = wxStyledTextCtrl()
X = Y = integer()

Finds the position from a point within the window, but returns wxSTC_INVALID_POSITION if it's not close to text. Close only, no cap. ๐Ÿšซ

gotoLine(This, Line) -> ok

Types:

This = wxStyledTextCtrl()
Line = integer()

Sets the caret to the start of a line and ensures it is visible. Jump to line, make it show up. ๐Ÿฆ‹

gotoPos(This, Caret) -> ok

Types:

This = wxStyledTextCtrl()
Caret = integer()

Sets the caret to a position and ensures it is visible. Scroll-to-caret behavior. ๐Ÿ“œ

setAnchor(This, Anchor) -> ok

Types:

This = wxStyledTextCtrl()
Anchor = integer()

Sets the selection anchor to a position. The anchor is the opposite end of the selection from the caret. Selection anchoring, periodt. โš“

getCurLine(This) -> Result

Types:

Result = {Res :: unicode:charlist(), LinePos :: integer()}
This = wxStyledTextCtrl()

Retrieves the text of the line containing the caret. linePos can optionally be passed in to receive the index of the caret on the line. ๐Ÿ“

getEndStyled(This) -> integer()

Types:

This = wxStyledTextCtrl()

Retrieves the position of the last correctly styled character. The styling frontier. โœจ

convertEOLs(This, EolMode) -> ok

Types:

This = wxStyledTextCtrl()
EolMode = integer()

Converts all line endings in the document to one mode.

getEOLMode(This) -> integer()

Types:

This = wxStyledTextCtrl()

Retrieves the current end of line mode โ€” one of wxSTC_EOL_CRLF, wxSTC_EOL_CR, or wxSTC_EOL_LF. Pick your line-ending poison. ๐Ÿ’…

setEOLMode(This, EolMode) -> ok

Types:

This = wxStyledTextCtrl()
EolMode = integer()

Sets the current end of line mode. The input should be one of the ?wxSTC_EOL_* constants. ๐ŸŒธ

startStyling(This, Start) -> ok

Types:

This = wxStyledTextCtrl()
Start = integer()

Sets the current styling position to Start. Styling cursor, placed. ๐Ÿ–Œ๏ธ

setStyling(This, Length, Style) -> ok

Types:

This = wxStyledTextCtrl()
Length = Style = integer()

Changes style from the current styling position for Length characters to Style, then moves the current styling position to after this newly styled segment. Styling in motion. ๐Ÿ’ซ

getBufferedDraw(This) -> boolean()

Types:

This = wxStyledTextCtrl()

Is drawing done first into a buffer or direct to the screen? Buffer check. ๐Ÿ–ผ๏ธ

setBufferedDraw(This, Buffered) -> ok

Types:

This = wxStyledTextCtrl()
Buffered = boolean()

If drawing is buffered, then each line of text is drawn into a bitmap buffer before it's drawn to the screen to avoid flicker. Anti-flicker tech, no cap. โœจ

setTabWidth(This, TabWidth) -> ok

Types:

This = wxStyledTextCtrl()
TabWidth = integer()

Changes the visible size of a tab to be a multiple of the width of a space character. Tab width math. โž—

getTabWidth(This) -> integer()

Types:

This = wxStyledTextCtrl()

Retrieves the visible size of a tab. ๐Ÿ“

setCodePage(This, CodePage) -> ok

Types:

This = wxStyledTextCtrl()
CodePage = integer()

Sets the code page used to interpret the bytes of the document as characters. Byte-to-character translation setting. ๐Ÿ”ค

markerDefine(This, MarkerNumber, MarkerSymbol) -> ok

Types:

This = wxStyledTextCtrl()
MarkerNumber = MarkerSymbol = integer()

This clause takes the marker number and marker symbol. No extra options here. ๐ŸŽ€

markerDefine(This, MarkerNumber, MarkerSymbol, Options :: [Option]) -> ok

Types:

This = wxStyledTextCtrl()
MarkerNumber = MarkerSymbol = integer()
Option =
    {foreground, wx:wx_colour()} | {background,
wx:wx_colour()}

Sets the symbol used for a particular marker number, and optionally the fore and background colours. The second argument should be one of the ?wxSTC_MARK_* constants. Marker customisation, slay. ๐ŸŽจ

markerSetForeground(This, MarkerNumber, Fore) -> ok

Types:

This = wxStyledTextCtrl()
MarkerNumber = integer()
Fore = wx:wx_colour()

Sets the foreground colour used for a particular marker number. Foreground era. ๐ŸŒˆ

markerSetBackground(This, MarkerNumber, Back) -> ok

Types:

This = wxStyledTextCtrl()
MarkerNumber = integer()
Back = wx:wx_colour()

Sets the background colour used for a particular marker number. That's the little stripe of colour behind your marker in the margin, bestie โ€” purely aesthetic, but the aesthetic matters ๐Ÿ’…


markerAdd(This, Line, MarkerNumber) -> integer()

Types:

This = wxStyledTextCtrl()
Line = MarkerNumber = integer()

Adds a marker to a line, and hands you back an ID that you can use later to find or delete that marker ๐Ÿ‘‘ Keep that integer somewhere safe, it's your receipt.

markerDelete(This, Line, MarkerNumber) -> ok

Types:

This = wxStyledTextCtrl()
Line = MarkerNumber = integer()

Deletes a marker from a line. Bye bestie ๐Ÿซถ

markerDeleteAll(This, MarkerNumber) -> ok

Types:

This = wxStyledTextCtrl()
MarkerNumber = integer()

Nukes every marker with that particular number from all the lines. It's giving mass unfollow, no cap ๐Ÿ’€

markerGet(This, Line) -> integer()

Types:

This = wxStyledTextCtrl()
Line = integer()

Gives you a bit mask of all the markers set on a line. Bit mask, so do the math with bitwise ops โ€” don't just eyeball it ๐Ÿ™ˆ

markerNext(This, LineStart, MarkerMask) -> integer()

Types:

This = wxStyledTextCtrl()
LineStart = MarkerMask = integer()

Finds the next line at or after LineStart that includes a marker in MarkerMask.

Returns -1 when there are no more lines. Literally the "no results found" of line searches ๐Ÿ˜ญ

markerPrevious(This, LineStart, MarkerMask) -> integer()

Types:

This = wxStyledTextCtrl()
LineStart = MarkerMask = integer()

Finds the previous line before LineStart that includes a marker in MarkerMask. Same energy as markerNext, just walking backwards ๐Ÿฆ‹

markerDefineBitmap(This, MarkerNumber, Bmp) -> ok

Types:

This = wxStyledTextCtrl()
MarkerNumber = integer()
Bmp = wxBitmap:wxBitmap()

Defines a marker using a wxBitmap โ€” so your marker can be an actual little picture instead of just a shape. Main character marker energy ๐Ÿ‘‘

markerAddSet(This, Line, MarkerSet) -> ok

Types:

This = wxStyledTextCtrl()
Line = MarkerSet = integer()

Adds a whole set of markers to a line in one go. Group chat, but make it markers โœจ

markerSetAlpha(This, MarkerNumber, Alpha) -> ok

Types:

This = wxStyledTextCtrl()
MarkerNumber = Alpha = integer()

Sets the alpha used for a marker that gets drawn in the text area โ€” not the margin. Read that again, because it's a whole different draw surface, iykyk ๐ŸŒธ


setMarginType(This, Margin, MarginType) -> ok

Types:

This = wxStyledTextCtrl()
Margin = MarginType = integer()

Sets a margin to be either numeric or symbolic.

The second argument should be one of the ?wxSTC_MARGIN_* constants.

getMarginType(This, Margin) -> integer()

Types:

This = wxStyledTextCtrl()
Margin = integer()

Retrieves the type of a margin. The return value will be one of the ?wxSTC_MARGIN_* constants โ€” vibe check says check against those, not raw numbers ๐Ÿ’œ

setMarginWidth(This, Margin, PixelWidth) -> ok

Types:

This = wxStyledTextCtrl()
Margin = PixelWidth = integer()

Sets the width of a margin, expressed in pixels. Pixels, bestie, not vibes ๐Ÿ“

getMarginWidth(This, Margin) -> integer()

Types:

This = wxStyledTextCtrl()
Margin = integer()

Retrieves the width of a margin in pixels.

setMarginMask(This, Margin, Mask) -> ok

Types:

This = wxStyledTextCtrl()
Margin = Mask = integer()

Sets a mask that determines which markers actually get displayed in a margin. It's a filter, basically, but make it bitwise ๐ŸŽ€

getMarginMask(This, Margin) -> integer()

Types:

This = wxStyledTextCtrl()
Margin = integer()

Retrieves the marker mask of a margin โœ“

setMarginSensitive(This, Margin, Sensitive) -> ok

Types:

This = wxStyledTextCtrl()
Margin = integer()
Sensitive = boolean()

Makes a margin sensitive or insensitive to mouse clicks. Yes, sensitive โ€” like the margin has feelings ๐Ÿ˜ญ๐Ÿซถ

getMarginSensitive(This, Margin) -> boolean()

Types:

This = wxStyledTextCtrl()
Margin = integer()

Retrieves the mouse click sensitivity of a margin. true = it feels the clicks, false = it's in its no-contact era.


styleClearAll(This) -> ok

Types:

This = wxStyledTextCtrl()

Clears all the styles and makes them equivalent to the global default style. Factory reset but only for the aesthetics ๐Ÿงš

styleSetForeground(This, Style, Fore) -> ok

Types:

This = wxStyledTextCtrl()
Style = integer()
Fore = wx:wx_colour()

Sets the foreground colour of a style. Yes queen, paint the letters ๐Ÿ’…

styleSetBackground(This, Style, Back) -> ok

Types:

This = wxStyledTextCtrl()
Style = integer()
Back = wx:wx_colour()

Sets the background colour of a style. The canvas behind the icon โœจ

styleSetBold(This, Style, Bold) -> ok

Types:

This = wxStyledTextCtrl()
Style = integer()
Bold = boolean()

Sets a style to be bold or not. Bold is a personality trait, argue with the wall ๐Ÿ”ฅ

styleSetItalic(This, Style, Italic) -> ok

Types:

This = wxStyledTextCtrl()
Style = integer()
Italic = boolean()

Sets a style to be italic or not.

styleSetSize(This, Style, SizePoints) -> ok

Types:

This = wxStyledTextCtrl()
Style = SizePoints = integer()

Sets the size of the characters of a style โ€” in points, hence the very cute SizePoints ๐ŸŽ€

styleSetFaceName(This, Style, FontName) -> ok

Types:

This = wxStyledTextCtrl()
Style = integer()
FontName = unicode:chardata()

Sets the font of a style. Yes, FontName is unicode:chardata() โ€” Unicode all the way, we love an international icon ๐ŸŒˆ

styleSetEOLFilled(This, Style, EolFilled) -> ok

Types:

This = wxStyledTextCtrl()
Style = integer()
EolFilled = boolean()

Sets a style to have its end of line filled, or not. EOL highlight at the end of the line = the little sparkle at the end of a sentence ๐ŸŒธ

styleResetDefault(This) -> ok

Types:

This = wxStyledTextCtrl()

Resets the default style back to its state at startup. Iconic rewind button behaviour.

styleSetUnderline(This, Style, Underline) -> ok

Types:

This = wxStyledTextCtrl()
Style = integer()
Underline = boolean()

Sets a style to be underlined or not.

styleSetCase(This, Style, CaseVisible) -> ok

Types:

This = wxStyledTextCtrl()
Style = CaseVisible = integer()

Sets a style to be mixed case, or to force upper or lower case.

The second argument should be one of the ?wxSTC_CASE_* constants.

styleSetHotSpot(This, Style, Hotspot) -> ok

Types:

This = wxStyledTextCtrl()
Style = integer()
Hotspot = boolean()

Sets a style to be a hotspot or not. Hotspot is a whole mood ๐Ÿ”ฅ

setSelForeground(This, UseSetting, Fore) -> ok

Types:

This = wxStyledTextCtrl()
UseSetting = boolean()
Fore = wx:wx_colour()

Sets the foreground colour of the main and additional selections โ€” and also tells it whether to actually use this setting. So it's colour + consent, both in one call ๐Ÿ™ˆ

setSelBackground(This, UseSetting, Back) -> ok

Types:

This = wxStyledTextCtrl()
UseSetting = boolean()
Back = wx:wx_colour()

Sets the background colour of the main and additional selections, and whether to use this setting.

getSelAlpha(This) -> integer()

Types:

This = wxStyledTextCtrl()

Gets the alpha of the selection. Translucent selection = highkey ethereal โœจ

setSelAlpha(This, Alpha) -> ok

Types:

This = wxStyledTextCtrl()
Alpha = integer()

Sets the alpha of the selection.

setCaretForeground(This, Fore) -> ok

Types:

This = wxStyledTextCtrl()
Fore = wx:wx_colour()

Sets the foreground colour of the caret. The caret is the main character of your editor, so dress it accordingly ๐Ÿ‘‘


cmdKeyAssign(This, Key, Modifiers, Cmd) -> ok

Types:

This = wxStyledTextCtrl()
Key = Modifiers = Cmd = integer()

When the key+modifier combination keyDefinition is pressed, performs sciCommand.

The second argument should be a bit list containing one or more of the ?wxSTC_KEYMOD_* constants and the third argument should be one of the ?wxSTC_CMD_* constants.

cmdKeyClear(This, Key, Modifiers) -> ok

Types:

This = wxStyledTextCtrl()
Key = Modifiers = integer()

When the key+modifier combination keyDefinition is pressed โ€” does nothing. Literally nothing. The assignment said no ๐Ÿ’€

The second argument should be a bit list containing one or more of the ?wxSTC_KEYMOD_* constants.

cmdKeyClearAll(This) -> ok

Types:

This = wxStyledTextCtrl()

Drop all key mappings. Full keymap cleanse, very cleansing era ๐Ÿงš

setStyleBytes(This, Length) -> integer()

Types:

This = wxStyledTextCtrl()
Length = integer()

Sets the styles for a segment of the document โ€” takes a Length and gives you back an integer.

styleSetVisible(This, Style, Visible) -> ok

Types:

This = wxStyledTextCtrl()
Style = integer()
Visible = boolean()

Sets a style to be visible or not. Ghost mode for styles ๐Ÿ‘ป

getCaretPeriod(This) -> integer()

Types:

This = wxStyledTextCtrl()

Gets the time in milliseconds that the caret is on and off.

setCaretPeriod(This, PeriodMilliseconds) -> ok

Types:

This = wxStyledTextCtrl()
PeriodMilliseconds = integer()

Gets the time in milliseconds that the caret is on and off. (Yes, the docs say "Get" up there for a setter โ€” we are simply reporting the lore as-is, no edits, bestie ๐Ÿ˜ญ)

0 = steady on. No blinking, just presence โœจ

setWordChars(This, Characters) -> ok

Types:

This = wxStyledTextCtrl()
Characters = unicode:chardata()

Sets the set of characters that make up words, used when moving or selecting by word. Unicode chardata, so your word-boundary game can be multilingual ๐ŸŒ

First sets defaults like SetCharsDefault.

beginUndoAction(This) -> ok

Types:

This = wxStyledTextCtrl()

Starts a sequence of actions that gets undone and redone as a single unit. Very "we are one collective now" of you ๐Ÿซถ

May be nested.

endUndoAction(This) -> ok

Types:

This = wxStyledTextCtrl()

Ends a sequence of actions that is undone and redone as a unit. Close the group chat, everyone ๐Ÿ‘‘


indicatorSetStyle(This, Indicator, IndicatorStyle) -> ok

Types:

This = wxStyledTextCtrl()
Indicator = IndicatorStyle = integer()

Sets an indicator to plain, squiggle or TT.

The second argument should be one of the ?wxSTC_INDIC_* constants.

indicatorGetStyle(This, Indicator) -> integer()

Types:

This = wxStyledTextCtrl()
Indicator = integer()

Retrieves the style of an indicator. The return value will be one of the ?wxSTC_INDIC_* constants โ€” squiggle check incoming ๐ŸŒ€

indicatorSetForeground(This, Indicator, Fore) -> ok

Types:

indicatorSetForeground(This, Indicator, Fore) -> ok

This = wxStyledTextCtrl()
Indicator = integer()
Fore = wx:wx_colour()

Sets the foreground colour of an indicator. You know, the squiggly/underline-y decoration thing. Give it a colour, it slays. ๐Ÿ’…


indicatorGetForeground(This, Indicator) -> wx:wx_colour4()

This = wxStyledTextCtrl()
Indicator = integer()

Reads back the foreground colour of an indicator โ€” like, what colour is it rn. Returns a wx:wx_colour4(). ๐ŸŽจ


setWhitespaceForeground(This, UseSetting, Fore) -> ok

This = wxStyledTextCtrl()
UseSetting = boolean()
Fore = wx:wx_colour()

Sets the foreground colour of all the whitespace, plus whether we're even using this setting at all (UseSetting). Two-for-one, we love efficiency. โœจ


setWhitespaceBackground(This, UseSetting, Back) -> ok

This = wxStyledTextCtrl()
UseSetting = boolean()
Back = wx:wx_colour()

Same deal but for the background colour of all whitespace, and again a UseSetting boolean to say whether this setting is active. ๐Ÿซถ


getStyleBits(This) -> integer()

This = wxStyledTextCtrl()

Tells you how many bits live in the style bytes that hold the lexical state.

โš ๏ธ Deprecated. Yes bestie, it's deprecated โ€” the docs literally flag it. Still documented here tho, so you know what it does. ๐Ÿ’€

setLineState(This, Line, State) -> ok

This = wxStyledTextCtrl()
Line = State = integer()

Stores extra styling info for each line โ€” Line and State are both integer()s. It's like a little vibe note attached to a line. ๐Ÿ”ฅ


getLineState(This, Line) -> integer()

This = wxStyledTextCtrl()
Line = integer()

Grabs that extra styling info back for a given line. ๐ŸŽ€


getMaxLineState(This) -> integer()

This = wxStyledTextCtrl()

Returns the last line number that actually has any line state. The upper bound of the vibe zone, basically. โญ


getCaretLineVisible(This) -> boolean()

This = wxStyledTextCtrl()

Answers the question: is the background of the line with the caret in a different colour? true = yes, it's giving highlighted. false = nope. ๐Ÿ‘‘


setCaretLineVisible(This, Show) -> ok

This = wxStyledTextCtrl()
Show = boolean()

Makes the background of the caret's line show up in a different colour (or stops it doing that). Main character line energy. โœจ


getCaretLineBackground(This) -> wx:wx_colour4()

This = wxStyledTextCtrl()

Returns the colour of the background of the line containing the caret. ๐ŸŒˆ


setCaretLineBackground(This, Back) -> ok

This = wxStyledTextCtrl()
Back = wx:wx_colour()

Sets that caret-line background colour. Go off, pick something cute. ๐Ÿ’–


autoCompShow(This, LengthEntered, ItemList) -> ok

This = wxStyledTextCtrl()
LengthEntered = integer()
ItemList = unicode:chardata()

Pops up an auto-completion list. ๐Ÿช„ The LengthEntered param tells it how many characters before the caret get used as context โ€” i.e. the text it's matching against.


autoCompCancel(This) -> ok

This = wxStyledTextCtrl()

Yeets the auto-completion list off the screen. Gone. Not me cancelling the whole popup ๐Ÿ˜ญ


autoCompActive(This) -> boolean()

This = wxStyledTextCtrl()

Is there an auto-completion list visible rn? true/false, simple as. ๐Ÿฆ‹


autoCompPosStart(This) -> integer()

This = wxStyledTextCtrl()

Returns the caret position from back when the auto-completion list was first displayed. Receipts of where the box started. ๐Ÿงš


autoCompComplete(This) -> ok

This = wxStyledTextCtrl()

The user picked an item, so this removes the list and inserts the selection. Chef's kiss, job done. ๐Ÿ‘‘


autoCompStops(This, CharacterSet) -> ok

This = wxStyledTextCtrl()
CharacterSet = unicode:chardata()

Defines a set of characters that, when typed, cancel the auto-completion list. Type one of these and the box is like "ok bye". ๐Ÿ™ˆ


autoCompSetSeparator(This, SeparatorCharacter) -> ok

This = wxStyledTextCtrl()
SeparatorCharacter = integer()

Changes the separator character used when building an auto-completion list string.

Default is space โ€” but you can change it if your items happen to contain spaces. ๐Ÿ’…


autoCompGetSeparator(This) -> integer()

This = wxStyledTextCtrl()

Gets the current auto-completion list separator character. ๐ŸŽ€


autoCompSelect(This, Select) -> ok

This = wxStyledTextCtrl()
Select = unicode:chardata()

Selects the item in the auto-completion list that starts with the given string. Matchy matchy. โœจ


autoCompSetCancelAtStart(This, Cancel) -> ok

This = wxStyledTextCtrl()
Cancel = boolean()

Should the auto-completion list get cancelled if the user backspaces to a position before where the box was created? Your call, bestie. โฌ…๏ธ


autoCompGetCancelAtStart(This) -> boolean()

This = wxStyledTextCtrl()

Tells you if auto-completion gets cancelled by backspacing before the start. Spill the setting. ๐Ÿ”


autoCompSetFillUps(This, CharacterSet) -> ok

This = wxStyledTextCtrl()
CharacterSet = unicode:chardata()

Defines the characters that, when typed, make the autocompletion pick the currently selected item. Type a filler char โ†’ boom, chosen. ๐Ÿ”ฅ


autoCompSetChooseSingle(This, ChooseSingle) -> ok

This = wxStyledTextCtrl()
ChooseSingle = boolean()

If the auto-completion list only has one item, should it just auto-choose it? Set ChooseSingle to decide. No wasted clicks, obsessed. ๐Ÿ’–


autoCompGetChooseSingle(This) -> boolean()

This = wxStyledTextCtrl()

Reads back whether a single-item auto-completion list auto-chooses that item. โœ…


autoCompSetIgnoreCase(This, IgnoreCase) -> ok

This = wxStyledTextCtrl()
IgnoreCase = boolean()

Sets whether case matters when doing auto-completion searches. IgnoreCase = true means it doesn't. chill searching. ๐Ÿ˜Œ


autoCompGetIgnoreCase(This) -> boolean()

This = wxStyledTextCtrl()

Returns the current state of the ignore-case flag. ๐Ÿšฉ


userListShow(This, ListType, ItemList) -> ok

This = wxStyledTextCtrl()
ListType = integer()
ItemList = unicode:chardata()

Shows a list of strings, and sends you a notification when the user picks one. It's giving dropdown menu with follow-up gossip. ๐Ÿ“ฌ


autoCompSetAutoHide(This, AutoHide) -> ok

This = wxStyledTextCtrl()
AutoHide = boolean()

Sets whether autocompletion hides itself automatically when nothing matches anymore. No matches โ†’ it dips. ๐Ÿซฅ


autoCompGetAutoHide(This) -> boolean()

This = wxStyledTextCtrl()

Retrieves whether autocompletion auto-hides when nothing matches. ๐Ÿ•ต๏ธโ€โ™€๏ธ


autoCompSetDropRestOfWord(This, DropRestOfWord) -> ok

This = wxStyledTextCtrl()
DropRestOfWord = boolean()

Sets whether autocompletion deletes any word characters that come after the inserted text when you complete. Like, cleanup on aisle word. ๐Ÿงน


autoCompGetDropRestOfWord(This) -> boolean()

This = wxStyledTextCtrl()

Tells you whether autocompletion drops the rest of the word after inserting. โœ‚๏ธ


registerImage(This, Type, Bmp) -> ok

This = wxStyledTextCtrl()
Type = integer()
Bmp = wxBitmap:wxBitmap()

Registers an image so it can be used in autocompletion lists. Little icons in your dropdown? iconic. ๐Ÿ–ผ๏ธโœจ


clearRegisteredImages(This) -> ok

This = wxStyledTextCtrl()

Clears all the registered images. Total reset, no crumbs left. ๐Ÿงผ


autoCompGetTypeSeparator(This) -> integer()

This = wxStyledTextCtrl()

Returns the auto-completion list's type-separator character. ๐ŸŽฏ


autoCompSetTypeSeparator(This, SeparatorCharacter) -> ok

This = wxStyledTextCtrl()
SeparatorCharacter = integer()

Changes the type-separator character used when building an auto-completion list string.

Default is ?, but you can swap it out if your items contain ?. ๐Ÿ’…


autoCompSetMaxWidth(This, CharacterCount) -> ok

This = wxStyledTextCtrl()
CharacterCount = integer()

Sets the maximum width, in characters, of auto-completion lists and user lists.

Set it to 0 to autosize to fit the longest item โ€” and that's the default, bestie. ๐ŸŽš๏ธ


autoCompGetMaxWidth(This) -> integer()

This = wxStyledTextCtrl()

Gets the maximum width, in characters, of auto-completion and user lists. ๐Ÿ“


autoCompSetMaxHeight(This, RowCount) -> ok

This = wxStyledTextCtrl()
RowCount = integer()

Sets the maximum height, in rows, of auto-completion and user lists.

The default is 5 rows. Five little rows of possibility ๐Ÿฅน


autoCompGetMaxHeight(This) -> integer()

This = wxStyledTextCtrl()

Gets the maximum height, in rows, of auto-completion and user lists.

๐Ÿ“ Lowkey a docs moment: the original wording for this one literally says "Set the maximum heightโ€ฆ" even though it's the getter. We're keeping it 100% faithful, so here it is as written. ๐Ÿ™ˆ

setIndent(This, IndentSize) -> ok

This = wxStyledTextCtrl()
IndentSize = integer()

Sets how many spaces get used for one level of indentation. The eternal tabs-vs-spaces discourse starts here. ๐Ÿซ 


getIndent(This) -> integer()

This = wxStyledTextCtrl()

Returns the indentation size. ๐Ÿ“


setUseTabs(This, UseTabs) -> ok

This = wxStyledTextCtrl()
UseTabs = boolean()

Indentation only uses space characters if UseTabs is false; otherwise it uses a combination of tabs and spaces. Choose your fighter. โš”๏ธ


getUseTabs(This) -> boolean()

This = wxStyledTextCtrl()

Returns whether tabs will be used in indentation. ๐Ÿ—‚๏ธ


setLineIndentation(This, Line, Indentation) -> ok

This = wxStyledTextCtrl()
Line = Indentation = integer()

Changes a line's indentation to a given number of columns. Slide it over, bestie. โžก๏ธ


getLineIndentation(This, Line) -> integer()

This = wxStyledTextCtrl()
Line = integer()

Returns the number of columns a line is indented. ๐Ÿงฎ


getLineIndentPosition(This, Line) -> integer()

This = wxStyledTextCtrl()
Line = integer()

Returns the position right before the first non-indentation character on a line โ€” basically where the actual content kicks in. ๐ŸŽฌ


getColumn(This, Pos) -> integer()

This = wxStyledTextCtrl()
Pos = integer()

Returns the column number of a position, taking the tab width into account. Because a tab is not one column and we respect that. ๐Ÿ’œ

๐ŸŽ€ setUseHorizontalScrollBar(This, Visible) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Visible = boolean()

Show or hide the horizontal scroll bar. That lil bar at the bottom? You control its whole destiny now bestie โœจ


getUseHorizontalScrollBar(This) -> boolean()

Types:

  • This = wxStyledTextCtrl()

Is the horizontal scroll bar visible? Returns a boolean, she's either there or she's not ๐Ÿ’…


setIndentationGuides(This, IndentView) -> ok

Types:

  • This = wxStyledTextCtrl()
  • IndentView = integer()

Show or hide indentation guides. Those little vertical lines that show you how deep your nesting goes โ€” iconic for reading code ngl.

The input should be one of the ?wxSTC_IV_* constants. Don't just throw any random integer in there, she has a type ๐Ÿซถ


getIndentationGuides(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Are the indentation guides visible? The return value will be one of the ?wxSTC_IV_* constants. Vibe check on your guides ๐ŸŒธ


setHighlightGuide(This, Column) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Column = integer()

Set the highlighted indentation guide column. Pass 0 for no highlighted guide โ€” that's the "actually don't" option ๐Ÿ’€


getHighlightGuide(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Get the highlighted indentation guide column. Which one's the main character? ๐Ÿ‘‘


getLineEndPosition(This, Line) -> integer()

Types:

  • This = wxStyledTextCtrl()
  • Line = integer()

Get the position after the last visible characters on a line. Like the very edge of the line, past all the visible stuff ๐Ÿฆ‹


getCodePage(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Get the code page used to interpret the bytes of the document as characters. Encoding lore, fr fr ๐ŸŒˆ


getCaretForeground(This) -> wx:wx_colour4()

Types:

  • This = wxStyledTextCtrl()

Get the foreground colour of the caret. Yes the blinking cursor has a colour and yes she has a whole aesthetic ๐Ÿ’–


getReadOnly(This) -> boolean()

Types:

  • This = wxStyledTextCtrl()

In read-only mode? Returns a boolean โ€” is this thing locked or nah ๐Ÿ”’


setCurrentPos(This, Caret) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Caret = integer()

Sets the position of the caret. Put the cursor exactly where you want it, no cap โœจ


setSelectionStart(This, Anchor) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Anchor = integer()

Sets the position that starts the selection โ€” this becomes the anchor. Lowkey important terminology: the anchor is the start โš“


getSelectionStart(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Returns the position at the start of the selection. Where the highlight begins ๐ŸŽ€


setSelectionEnd(This, Caret) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Caret = integer()

Sets the position that ends the selection โ€” this becomes the caret. So the end of the highlight is also where your cursor sits, cute ๐ŸŒธ


getSelectionEnd(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Returns the position at the end of the selection. Where the highlight stops ๐Ÿฆ‹


setPrintMagnification(This, Magnification) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Magnification = integer()

Sets the print magnification added to the point size of each style for printing. So your printed doc can be bigger or smaller, your call ๐Ÿ’…


getPrintMagnification(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Returns the print magnification. The zoom level for when it hits paper ๐Ÿ–จ๏ธโœจ


setPrintColourMode(This, Mode) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Mode = integer()

Modify colours when printing for clearer printed text. Because your neon syntax highlighting doesn't always slay on paper ๐Ÿ˜ญ

The input should be one of the ?wxSTC_PRINT_* constants. Use the constants, bestie, don't freestyle ๐Ÿซถ


getPrintColourMode(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Returns the print colour mode. The return value will be one of the ?wxSTC_PRINT_* constants ๐ŸŒˆ


findText(This, MinPos, MaxPos, Text) -> integer()

Types:

  • This = wxStyledTextCtrl()
  • MinPos = MaxPos = integer()
  • Text = unicode:chardata()

findText(This, MinPos, MaxPos, Text, Options :: [Option]) -> integer()

Types:

  • This = wxStyledTextCtrl()
  • MinPos = MaxPos = integer()
  • Text = unicode:chardata()
  • Option = {flags, integer()}

Find some text in the document. The search queen ๐Ÿ‘‘

  • minPos โ€” the position (starting from zero, ok? zero-indexed, don't come at me) in the document at which to begin the search
  • maxPos โ€” the last position (starting from zero) in the document to which the search will be restricted
  • text โ€” the text to search for
  • flags โ€” (optional) the search flags. This should be a bit list containing one or more of the wxSTC_FIND_WHOLEWORD / wxSTC_FIND_* constants

Return: The position (starting from zero) in the document at which the text was found, or wxSTC_INVALID_POSITION if the search fails. So like, if you get wxSTC_INVALID_POSITION back, she's not there, sorry ๐Ÿ˜ญ

Remark: A backwards search can be performed by setting minPos to be greater than maxPos. Yeah, it's giving chaotic but it works โ€” flip the positions and she searches in reverse ๐Ÿ’€โœจ


formatRange(This, DoDraw, StartPos, EndPos, Draw, Target, RenderRect, PageRect) -> integer()

Types:

  • This = wxStyledTextCtrl()
  • DoDraw = boolean()
  • StartPos = EndPos = integer()
  • Draw = Target = wxDC:wxDC()
  • RenderRect = PageRect = {X :: integer(), Y :: integer(), W :: integer(), H :: integer()}

On Windows, will draw the document into a display context such as a printer. Very "sending it to the printer" of it ๐Ÿ–จ๏ธ๐Ÿ’…


getFirstVisibleLine(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Retrieve the display line at the top of the display. Which line is peeking out at the very top? ๐Ÿ‘€


getLine(This, Line) -> unicode:charlist()

Types:

  • This = wxStyledTextCtrl()
  • Line = integer()

Retrieve the contents of a line. Give her a line number, she gives you the text ๐ŸŽ€


getLineCount(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Returns the number of lines in the document.

There is always at least one. Always. Even an "empty" doc got one line, that's just how she is ๐Ÿฆ‹


setMarginLeft(This, PixelWidth) -> ok

Types:

  • This = wxStyledTextCtrl()
  • PixelWidth = integer()

Sets the size in pixels of the left margin. Pixel-precise, bestie โœจ


getMarginLeft(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Returns the size in pixels of the left margin ๐ŸŒธ


setMarginRight(This, PixelWidth) -> ok

Types:

  • This = wxStyledTextCtrl()
  • PixelWidth = integer()

Sets the size in pixels of the right margin. Symmetry queen ๐Ÿ’…


getMarginRight(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Returns the size in pixels of the right margin ๐Ÿซถ


getModify(This) -> boolean()

Types:

  • This = wxStyledTextCtrl()

Is the document different from when it was last saved? The "do I need to hit save or am I fine" check ๐Ÿ˜ญ


setSelection(This, From, To) -> ok

Types:

  • This = wxStyledTextCtrl()
  • From = To = integer()

Selects the text starting at the first position up to (but not including) the character at the last position. Half-open range, she's classy like that โœจ

If both parameters are equal to -1 all text in the control is selected. Whole thing. Select all energy ๐Ÿ‘‘

Notice that the insertion point will be moved to from by this function. Yeah, your cursor jumps to the start โ€” that's just the deal.

See: selectAll/1 ๐ŸŽ€


getSelectedText(This) -> unicode:charlist()

Types:

  • This = wxStyledTextCtrl()

Retrieve the selected text. Whatever's highlighted, right there ๐Ÿ’–


getTextRange(This, StartPos, EndPos) -> unicode:charlist()

Types:

  • This = wxStyledTextCtrl()
  • StartPos = EndPos = integer()

Retrieve a range of text. Give her two positions, get the chunk in between ๐Ÿฆ‹


hideSelection(This, Hide) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Hide = boolean()

Draw the selection in normal style or with selection highlighted. So you can literally make the selection invisible or make it pop ๐ŸŒˆ


lineFromPosition(This, Pos) -> integer()

Types:

  • This = wxStyledTextCtrl()
  • Pos = integer()

Retrieve the line containing a position. Position โ†’ line number, the translation service ๐Ÿงš


positionFromLine(This, Line) -> integer()

Types:

  • This = wxStyledTextCtrl()
  • Line = integer()

Retrieve the position at the start of a line. Line number โ†’ position, reverse translation ๐Ÿ’ซ


lineScroll(This, Columns, Lines) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Columns = Lines = integer()

Scroll horizontally and vertically. Move the view around, both directions, at once ๐Ÿ’…


ensureCaretVisible(This) -> ok

Types:

  • This = wxStyledTextCtrl()

Ensure the caret is visible. Scroll her into view if she's wandered off-screen, no cap ๐Ÿ‘€


replaceSelection(This, Text) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Text = unicode:chardata()

Replace the selected text with the argument text. Highlighted stuff goes poof, your text takes its place โœจ


setReadOnly(This, ReadOnly) -> ok

Types:

  • This = wxStyledTextCtrl()
  • ReadOnly = boolean()

Set to read only or read write. Lock her down or let her be edited ๐Ÿ”’


canPaste(This) -> boolean()

Types:

  • This = wxStyledTextCtrl()

Will a paste succeed? Vibes check before you commit to the Ctrl+V ๐Ÿ˜ญ


canUndo(This) -> boolean()

Types:

  • This = wxStyledTextCtrl()

Are there any undoable actions in the undo history? Is there anything to take back, or is the history clean? ๐Ÿซถ


emptyUndoBuffer(This) -> ok

Types:

  • This = wxStyledTextCtrl()

Delete the undo history. Gone. No takebacks. You can't undo the un-undoing ๐Ÿ’€


undo(This) -> ok

Types:

  • This = wxStyledTextCtrl()

Undo one action in the undo history. Take it back, bestie โ†ฉ๏ธโœจ


cut(This) -> ok

Types:

  • This = wxStyledTextCtrl()

Cut the selection to the clipboard. She's in the clipboard now, and also gone from here โœ‚๏ธ


copy(This) -> ok

Types:

  • This = wxStyledTextCtrl()

Copy the selection to the clipboard. Same but she stays put ๐Ÿ’–


paste(This) -> ok

Types:

  • This = wxStyledTextCtrl()

Paste the contents of the clipboard into the document, replacing the selection. Clipboard โ†’ document, old selection out ๐Ÿ“‹โœจ


clear(This) -> ok

Types:

  • This = wxStyledTextCtrl()

Clear the selection. Note: this is just the selection going away, not the text, don't panic ๐Ÿซถ


setText(This, Text) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Text = unicode:chardata()

Replace the contents of the document with the argument text. Whole doc, wiped and replaced. Main character move ๐Ÿ‘‘


getText(This) -> unicode:charlist()

Types:

  • This = wxStyledTextCtrl()

Retrieve all the text in the document. Every single character, the whole thing ๐ŸŒˆ


getTextLength(This) -> integer()

Types:

  • This = wxStyledTextCtrl()

Retrieve the number of characters in the document. How many characters are we talking? She'll tell you ๐Ÿ”ข


getOvertype(This) -> boolean()

Types:

  • This = wxStyledTextCtrl()

Returns true if overtype mode is active, otherwise false is returned. Overtype = you type over stuff instead of inserting, iykyk ๐Ÿ’…


setCaretWidth(This, PixelWidth) -> ok

Types:

Types:

This = wxStyledTextCtrl()
PixelWidth = integer()

okay so this one sets the width of the insert mode caret ๐Ÿ’… that's your blinking cursor, and yes bestie you can make it thick, it's a slay.


getCaretWidth(This) -> integer()

Types:

This = wxStyledTextCtrl()

Returns the width of the insert mode caret ๐ŸŒธ so you can check how chunky that cursor is living.


setTargetStart(This, Start) -> ok

Types:

This = wxStyledTextCtrl()
Start = integer()

Sets the position that starts the target โ€” and the whole point of the target is updating the document without affecting the scroll position ๐ŸŽ€ so the view stays exactly where it was, no jumping, no chaos.


getTargetStart(This) -> integer()

Types:

This = wxStyledTextCtrl()

Get the position that starts the target โœจ the beginning of your little target range, iykyk.


setTargetEnd(This, End) -> ok

Types:

This = wxStyledTextCtrl()
End = integer()

Sets the position that ends the target ๐Ÿฆ‹ again, it's the "update the doc without moving the scroll" machinery, we love her.


getTargetEnd(This) -> integer()

Types:

This = wxStyledTextCtrl()

Get the position that ends the target ๐Ÿ’– the far edge of the range.


replaceTarget(This, Text) -> integer()

Types:

This = wxStyledTextCtrl()
Text = unicode:chardata()

Replace the target text with the argument text ๐Ÿ”ฅ and here's the important bit: Text is counted so it can contain NULs, bestie. Returns the length of the replacement text ๐ŸŒŸ


searchInTarget(This, Text) -> integer()

Types:

This = wxStyledTextCtrl()
Text = unicode:chardata()

Search for a counted string in the target and set the target to the found range ๐Ÿ” Text is counted so it can contain NULs, fr fr. Returns length of range or -1 for failure โ€” and in that case the target is not moved ๐Ÿ˜ญ so it just stays put, no ghosting.


setSearchFlags(This, SearchFlags) -> ok

Types:

This = wxStyledTextCtrl()
SearchFlags = integer()

Set the search flags used by SearchInTarget ๐Ÿ’ซ the input should be a bit list containing one or more of the ?wxSTC_FIND_* constants ๐ŸŽฏ


getSearchFlags(This) -> integer()

Types:

This = wxStyledTextCtrl()

Get the search flags used by SearchInTarget ๐ŸŒˆ the return value will be a bit list containing one or more of the ?wxSTC_FIND_* constants ๐Ÿ’…


๐Ÿซง call tips (the little popup that explains stuff) ๐Ÿซง

callTipShow(This, Pos, Definition) -> ok

Types:

This = wxStyledTextCtrl()
Pos = integer()
Definition = unicode:chardata()

Show a call tip containing a definition near position Pos โœจ it's giving helpful little assistant energy.


callTipCancel(This) -> ok

Types:

This = wxStyledTextCtrl()

Remove the call tip from the screen ๐Ÿ™ˆ bye bestie.


callTipActive(This) -> boolean()

Types:

This = wxStyledTextCtrl()

Is there an active call tip? ๐Ÿ‘€ quick vibe check on the popup.


callTipPosAtStart(This) -> integer()

Types:

This = wxStyledTextCtrl()

Retrieve the position where the caret was before displaying the call tip ๐ŸŽ€ so you can remember where you were before the popup era started.

Since: 3.1.0 ๐Ÿ’œ

callTipSetHighlight(This, HighlightStart, HighlightEnd) -> ok

Types:

This = wxStyledTextCtrl()
HighlightStart = HighlightEnd = integer()

Highlight a segment of the definition ๐Ÿ–๏ธ because some parts of the signature are main character energy and deserve the glow-up.


callTipSetBackground(This, Back) -> ok

Types:

This = wxStyledTextCtrl()
Back = wx:wx_colour()

Set the background colour for the call tip ๐ŸŒธ aesthetics matter, always.


callTipSetForeground(This, Fore) -> ok

Types:

This = wxStyledTextCtrl()
Fore = wx:wx_colour()

Set the foreground colour for the call tip โœจ text colour, iconic.


callTipSetForegroundHighlight(This, Fore) -> ok

Types:

This = wxStyledTextCtrl()
Fore = wx:wx_colour()

Set the foreground colour for the highlighted part of the call tip ๐Ÿ’– specifically the highlighted bit, not the whole thing. we're being precise today.


callTipUseStyle(This, TabSize) -> ok

Types:

This = wxStyledTextCtrl()
TabSize = integer()

Enable use of wxSTC_STYLE_CALLTIP and set call tip tab size in pixels ๐Ÿ‘‘ so your tips can match your whole styling situation.


๐Ÿฆ‹ lines, wrapping, and the folding of things ๐Ÿฆ‹

visibleFromDocLine(This, DocLine) -> integer()

Types:

This = wxStyledTextCtrl()
DocLine = integer()

Find the display line of a document line taking hidden lines into account ๐ŸŒŸ because what you see is not what the document actually contains, plot twist.


docLineFromVisible(This, DisplayLine) -> integer()

Types:

This = wxStyledTextCtrl()
DisplayLine = integer()

Find the document line of a display line taking hidden lines into account ๐Ÿ” the reverse direction, we love a round trip.


wrapCount(This, DocLine) -> integer()

Types:

This = wxStyledTextCtrl()
DocLine = integer()

The number of display lines needed to wrap a document line ๐ŸŽ€ how many visual rows one logical line is eating.


setFoldLevel(This, Line, Level) -> ok

Types:

This = wxStyledTextCtrl()
Line = Level = integer()

Set the fold level of a line โœจ and heads up, this encodes an integer level along with flags indicating whether the line is a header and whether it is effectively white space ๐Ÿ‘€ so it's not just a plain number, it's a whole packed situation.


getFoldLevel(This, Line) -> integer()

Types:

This = wxStyledTextCtrl()
Line = integer()

Retrieve the fold level of a line ๐Ÿ’… same packed encoding, coming right back at you.


getLastChild(This, Line, Level) -> integer()

Types:

This = wxStyledTextCtrl()
Line = Level = integer()

Find the last child line of a header line ๐Ÿงš the final kid in that fold family.


getFoldParent(This, Line) -> integer()

Types:

This = wxStyledTextCtrl()
Line = integer()

Find the parent line of a child line ๐ŸŒธ who's your fold parent bestie.


showLines(This, LineStart, LineEnd) -> ok

Types:

This = wxStyledTextCtrl()
LineStart = LineEnd = integer()

Make a range of lines visible ๐Ÿ‘‘ un-hide them, let them breathe.


hideLines(This, LineStart, LineEnd) -> ok

Types:

This = wxStyledTextCtrl()
LineStart = LineEnd = integer()

Make a range of lines invisible ๐Ÿ™ˆ poof, gone from view.


getLineVisible(This, Line) -> boolean()

Types:

This = wxStyledTextCtrl()
Line = integer()

Is a line visible? ๐Ÿ‘€ simple as that.


setFoldExpanded(This, Line, Expanded) -> ok

Types:

This = wxStyledTextCtrl()
Line = integer()
Expanded = boolean()

Show the children of a header line ๐ŸŒˆ expand the fold, reveal the lore.


getFoldExpanded(This, Line) -> boolean()

Types:

This = wxStyledTextCtrl()
Line = integer()

Is a header line expanded? ๐ŸŽ€ true or false, no in between.


toggleFold(This, Line) -> ok

Types:

This = wxStyledTextCtrl()
Line = integer()

Switch a header line between expanded and contracted โœจ one click, whole vibe shift.


ensureVisible(This, Line) -> ok

Types:

This = wxStyledTextCtrl()
Line = integer()

Ensure a particular line is visible by expanding any header line hiding it ๐Ÿ”ฅ so it goes and un-hides whatever's in the way. very "make it work" of it.


setFoldFlags(This, Flags) -> ok

Types:

This = wxStyledTextCtrl()
Flags = integer()

Set some style options for folding ๐Ÿ’… and the second argument should be a bit list containing one or more of the ?wxSTC_FOLDFLAG_* constants ๐ŸŽฏ


ensureVisibleEnforcePolicy(This, Line) -> ok

Types:

This = wxStyledTextCtrl()
Line = integer()

Ensure a particular line is visible by expanding any header line hiding it ๐ŸŒŸ but use the currently set visibility policy to determine which range to display ๐Ÿซถ so it's the same idea as ensureVisible with rules attached.


setTabIndents(This, TabIndents) -> ok

Types:

This = wxStyledTextCtrl()
TabIndents = boolean()

Sets whether a tab pressed when caret is within indentation indents โŒจ๏ธ like, does Tab behave like indent while you're hanging out in the leading whitespace.


getTabIndents(This) -> boolean()

Types:

This = wxStyledTextCtrl()

Does a tab pressed when caret is within indentation indent? ๐Ÿค” yes/no, the eternal question, answered.


setBackSpaceUnIndents(This, BsUnIndents) -> ok

Types:

This = wxStyledTextCtrl()
BsUnIndents = boolean()

Sets whether a backspace pressed when caret is within indentation unindents ๐Ÿซง the symmetric bestie of the tab thing.


getBackSpaceUnIndents(This) -> boolean()

Types:

This = wxStyledTextCtrl()

Does a backspace pressed when caret is within indentation unindent? ๐Ÿ’ญ vibe check on your backspace behaviour.


setMouseDwellTime(This, PeriodMilliseconds) -> ok

Types:

This = wxStyledTextCtrl()
PeriodMilliseconds = integer()

Sets the time the mouse must sit still to generate a mouse dwell event ๐Ÿ–ฑ๏ธ the input should be a time in milliseconds or wxSTC_TIME_FOREVER โณ (yes, forever is an option, dramatic but valid).


getMouseDwellTime(This) -> integer()

Types:

This = wxStyledTextCtrl()

Retrieve the time the mouse must sit still to generate a mouse dwell event ๐Ÿญ the return value will be a time in milliseconds or wxSTC_TIME_FOREVER โœจ


wordStartPosition(This, Pos, OnlyWordCharacters) -> integer()

Types:

This = wxStyledTextCtrl()
Pos = integer()
OnlyWordCharacters = boolean()

Get position of start of word ๐ŸŽ€ where the word begins.


wordEndPosition(This, Pos, OnlyWordCharacters) -> integer()

Types:

This = wxStyledTextCtrl()
Pos = integer()
OnlyWordCharacters = boolean()

Get position of end of word ๐Ÿ’œ where it wraps up.


setWrapMode(This, WrapMode) -> ok

Types:

This = wxStyledTextCtrl()
WrapMode = integer()

Sets whether text is word wrapped ๐Ÿ“œ the input should be one of the ?wxSTC_WRAP_* constants ๐Ÿฆ‹


getWrapMode(This) -> integer()

Types:

This = wxStyledTextCtrl()

Retrieve whether text is word wrapped ๐Ÿ” the return value will be one of the ?wxSTC_WRAP_* constants ๐Ÿ’…


setWrapVisualFlags(This, WrapVisualFlags) -> ok

Types:

This = wxStyledTextCtrl()
WrapVisualFlags = integer()

Set the display mode of visual flags for wrapped lines ๐Ÿšฉ the input should be a bit list containing one or more of the ?wxSTC_WRAPVISUALFLAG_* constants โœจ


getWrapVisualFlags(This) -> integer()

Types:

This = wxStyledTextCtrl()

Retrieve the display mode of visual flags for wrapped lines ๐ŸŽ€ the return value will be a bit list containing one or more of the ?wxSTC_WRAPVISUALFLAG_* constants ๐ŸŒธ


setWrapVisualFlagsLocation(This, WrapVisualFlagsLocation) -> ok

Types:

This = wxStyledTextCtrl()
WrapVisualFlagsLocation = integer()

Okay bestie, we're deep in the move-the-caret-and-paint-the-screen zone now ๐Ÿ’… these are all the little ok-returning actions that make the editor feel like an editor. Buckle up.

Set the location of the visual flags for wrapped lines, babes. โœจ

The input should be a bit list containing one or more of the ?wxSTC_WRAPVISUALFLAGLOC_* constants.


getWrapVisualFlagsLocation(This) -> integer() ๐ŸŽ€

This = wxStyledTextCtrl()

Retrieve the location of the visual flags for wrapped lines โ€” the read-only twin of the one above, no cap.

The return value will be a bit list containing one or more of the ?wxSTC_WRAPVISUALFLAGLOC_* constants.


setWrapStartIndent(This, Indent) -> ok

This = wxStyledTextCtrl()
Indent = integer()

Set the start indent for wrapped lines. Yes, wrapped lines get their own indent drip ๐ŸŒธ


getWrapStartIndent(This) -> integer()

This = wxStyledTextCtrl()

Retrieve the start indent for wrapped lines. Iconic little getter, does exactly what it says.


setLayoutCache(This, CacheMode) -> ok

This = wxStyledTextCtrl()
CacheMode = integer()

Sets the degree of caching of layout information โ€” basically how much the widget hoards its own layout math for later ๐Ÿ‘‘

The input should be one of the ?wxSTC_CACHE_* constants.


getLayoutCache(This) -> integer()

This = wxStyledTextCtrl()

Retrieve the degree of caching of layout information.

The return value will be one of the ?wxSTC_CACHE_* constants.


setScrollWidth(This, PixelWidth) -> ok

This = wxStyledTextCtrl()
PixelWidth = integer()

Sets the document width assumed for scrolling. This is the "how wide does the doc think it is" knob, fr fr.


getScrollWidth(This) -> integer()

This = wxStyledTextCtrl()

Retrieve the document width assumed for scrolling.


textWidth(This, Style, Text) -> integer() ๐Ÿฆ‹

This = wxStyledTextCtrl()
Style = integer()
Text = unicode:chardata()

Measure the pixel width of some text in a particular style. So useful for lining stuff up perfectly, we love a measurement moment.

Heads up bestie: does not handle tab or control characters. Like, at all. Don't come for her.

getEndAtLastLine(This) -> boolean()

This = wxStyledTextCtrl()

Retrieve whether the maximum scroll position has the last line at the bottom of the view. Just a yes/no vibe check on the scrolling behaviour ๐Ÿซถ


textHeight(This, Line) -> integer()

This = wxStyledTextCtrl()
Line = integer()

Retrieve the height of a particular line of text, in pixels. Very demure, very measurement.


setUseVerticalScrollBar(This, Visible) -> ok

This = wxStyledTextCtrl()
Visible = boolean()

Show or hide the vertical scroll bar. Poof, gone. Or poof, back. Your call ๐Ÿ’…


getUseVerticalScrollBar(This) -> boolean()

This = wxStyledTextCtrl()

Is the vertical scroll bar visible? Simple question, simple answer.


appendText(This, Text) -> ok

This = wxStyledTextCtrl()
Text = unicode:chardata()

Append a string to the end of the document without changing the selection. The way it just adds on and leaves your cursor exactly where it was โ€” respectful queen ๐ŸŒธ


getTwoPhaseDraw(This) -> boolean()

This = wxStyledTextCtrl()

Is drawing done in two phases, with backgrounds drawn before foregrounds? That's the whole question, and the answer is a boolean, periodt.


setTwoPhaseDraw(This, TwoPhase) -> ok

This = wxStyledTextCtrl()
TwoPhase = boolean()

In twoPhaseDraw mode, drawing is performed in two phases โ€” first the background, and then the foreground.

This avoids chopping off characters that overlap the next run. Literally saving characters from getting their edges snipped ๐Ÿ”ฅ


targetFromSelection(This) -> ok

This = wxStyledTextCtrl()

Make the target range start and end be the same as the selection range start and end. Snapshot the selection into the target, iconic behaviour.


linesJoin(This) -> ok

This = wxStyledTextCtrl()

Join the lines in the target. That's it, that's the function.


linesSplit(This, PixelWidth) -> ok

This = wxStyledTextCtrl()
PixelWidth = integer()

Split the lines in the target into lines that are less wide than PixelWidth where possible. The "where possible" is doing a lot of work there and we respect it ๐ŸŽ€


setFoldMarginColour(This, UseSetting, Back) -> ok

This = wxStyledTextCtrl()
UseSetting = boolean()
Back = wx:wx_colour()

Set one of the colours used as the chequerboard pattern in the fold margin. Yes bestie, the fold margin is a whole chequerboard aesthetic ๐Ÿ


setFoldMarginHiColour(This, UseSetting, Fore) -> ok

This = wxStyledTextCtrl()
UseSetting = boolean()
Fore = wx:wx_colour()

Set the other colour used as the chequerboard pattern in the fold margin. Gotta complete the checker fit ๐Ÿ’œ


lineDown(This) -> ok

This = wxStyledTextCtrl()

Move caret down one line. Baby step down.


lineDownExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret down one line, extending the selection to the new caret position. Now you're selecting, bestie โœจ


lineUp(This) -> ok

This = wxStyledTextCtrl()

Move caret up one line.


lineUpExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret up one line, extending the selection to the new caret position.


charLeft(This) -> ok

This = wxStyledTextCtrl()

Move caret left one character. Incremental queen ๐Ÿ’…


charLeftExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret left one character, extending the selection to the new caret position.


charRight(This) -> ok

This = wxStyledTextCtrl()

Move caret right one character.


charRightExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret right one character, extending the selection to the new caret position.


wordLeft(This) -> ok

This = wxStyledTextCtrl()

Move caret left one word. Skipping whole words like a main character skipping the small talk ๐Ÿฆ‹


wordLeftExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret left one word, extending the selection to the new caret position.


wordRight(This) -> ok

This = wxStyledTextCtrl()

Move caret right one word.


wordRightExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret right one word, extending the selection to the new caret position.


home(This) -> ok

This = wxStyledTextCtrl()

Move caret to first position on line. Home sweet home ๐Ÿ 


homeExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret to first position on line, extending the selection to the new caret position.


lineEnd(This) -> ok

This = wxStyledTextCtrl()

Move caret to last position on line.


lineEndExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret to last position on line, extending the selection to the new caret position.


documentStart(This) -> ok

This = wxStyledTextCtrl()

Move caret to first position in document. All the way to the top, no hesitation.


documentStartExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret to first position in document, extending the selection to the new caret position.


documentEnd(This) -> ok

This = wxStyledTextCtrl()

Move caret to last position in document.


documentEndExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret to last position in document, extending the selection to the new caret position.


pageUp(This) -> ok

This = wxStyledTextCtrl()

Move caret one page up. Big jump energy โฌ†๏ธ


pageUpExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret one page up, extending the selection to the new caret position.


pageDown(This) -> ok

This = wxStyledTextCtrl()

Move caret one page down.


pageDownExtend(This) -> ok

This = wxStyledTextCtrl()

Move caret one page down, extending the selection to the new caret position.


editToggleOvertype(This) -> ok

This = wxStyledTextCtrl()

Switch from insert to overtype mode, or the reverse. Yes, overtype still exists, she's retro and she's thriving ๐Ÿ’€


cancel(This) -> ok

This = wxStyledTextCtrl()

Cancel any modes such as call tip or auto-completion list display. Escape-key behaviour, packaged as a function ๐Ÿ™ˆ


deleteBack(This) -> ok

This = wxStyledTextCtrl()

Delete the selection โ€” or, if there's no selection, the character before the caret. Backspace with โœจrangeโœจ


tab(This) -> ok

This = wxStyledTextCtrl()

If the selection is empty or all on one line, replace the selection with a tab character ๐ŸŽ€

If more than one line is selected, indent the lines.


backTab(This) -> ok

This = wxStyledTextCtrl()

Dedent the selected lines. The un-tab, the reverse slay.


newLine(This) -> ok

This = wxStyledTextCtrl()

Insert a new line โ€” may use a CRLF, CR or LF depending on EOL mode. She checks the EOL vibe first, as she should ๐Ÿ‘‘


formFeed(This) -> ok

This = wxStyledTextCtrl()

Insert a Form Feed character. Yes, that one. The vintage one. She's still invited to the party โญ


vCHome(This) -> ok

This = wxStyledTextCtrl()

Move caret to before the first visible character on the line.

If the caret's already there, move to the first character on the line. Smart little two-step, we love a conditional ๐Ÿซถ


vCHomeExtend(This) -> ok

This = wxStyledTextCtrl()

Like VCHome but extending the selection to the new caret position.


zoomIn(This) -> ok

This = wxStyledTextCtrl()

Magnify the displayed text by increasing the sizes by 1 point. Bigger. Bolder. Closer ๐Ÿ”


zoomOut(This) -> ok

This = wxStyledTextCtrl()

Make the displayed text smaller by decreasing the sizes by 1 point.


delWordLeft(This) -> ok

This = wxStyledTextCtrl()

Delete the word to the left of the caret. Chunky delete, left side ๐Ÿ’…


delWordRight(This) -> ok

This = wxStyledTextCtrl()

Delete the word to the right of the caret.


lineCut(This) -> ok

This = wxStyledTextCtrl()

Cut the line containing the caret. Whole line, gone, to the clipboard, living its best life โœ‚๏ธ


lineDelete(This) -> ok

This = wxStyledTextCtrl()

Delete the line containing the caret. Same energy, no clipboard, straight to the void ๐Ÿ’€


lineTranspose(This) -> ok

This = wxStyledTextCtrl()

Switch the current line with the previous. Line swap, no questions asked, absolutely iconic behaviour ๐Ÿ”

๐ŸŽ€ lineDuplicate(This) -> ok

  • This = wxStyledTextCtrl()

Duplicates the line you're on, bestie. Copy-paste but make it effortless ๐Ÿ’…


๐ŸŽ€ lowerCase(This) -> ok

  • This = wxStyledTextCtrl()

Smashes your selection down to lowercase. whisper voice only โœจ


๐ŸŽ€ upperCase(This) -> ok

  • This = wxStyledTextCtrl()

Yells your selection into UPPERCASE. it's giving main character energy ๐Ÿ‘‘


๐ŸŽ€ lineScrollDown(This) -> ok

  • This = wxStyledTextCtrl()

Scrolls the document down, but the caret stays visible the whole time. like, rude to lose it fr ๐Ÿซถ


๐ŸŽ€ lineScrollUp(This) -> ok

  • This = wxStyledTextCtrl()

Scrolls the document up, again keeping the caret in view. no losing track of where you were, periodt โญ


๐ŸŽ€ deleteBackNotLine(This) -> ok

  • This = wxStyledTextCtrl()

Deletes the selection โ€” or, if there's no selection, deletes the character right before the caret.

But it will not delete the character before at the start of a line. nope, that boundary is sacred ๐Ÿ’€


๐ŸŽ€ homeDisplay(This) -> ok

  • This = wxStyledTextCtrl()

Puts the caret at the very first position on the display line. home sweet home ๐Ÿ 


๐ŸŽ€ homeDisplayExtend(This) -> ok

  • This = wxStyledTextCtrl()

Same as above but it extends the selection to the new caret position. so you're selecting on the way there, iconic ๐ŸŒธ


๐ŸŽ€ lineEndDisplay(This) -> ok

  • This = wxStyledTextCtrl()

Moves the caret to the last position on the display line. end of the runway, slay โœจ


๐ŸŽ€ lineEndDisplayExtend(This) -> ok

  • This = wxStyledTextCtrl()

Moves the caret to the last position on the display line, extending the selection along to that new spot ๐Ÿฆ‹


๐ŸŽ€ homeWrapExtend(This) -> ok

  • This = wxStyledTextCtrl()

Basically HomeExtend, except when word-wrap is enabled it first extends to the start of the display line (HomeDisplayExtend), and then to the start of the document line (HomeExtend). two-stop journey, no cap ๐Ÿš—


๐ŸŽ€ lineEndWrap(This) -> ok

  • This = wxStyledTextCtrl()

Basically LineEnd, except when word-wrap is enabled it goes first to the end of the display line (LineEndDisplay), then to the start of the document line (LineEnd). note that plot twist at the end ๐Ÿ‘€


๐ŸŽ€ lineEndWrapExtend(This) -> ok

  • This = wxStyledTextCtrl()

Basically LineEndExtend, except when word-wrap is enabled it extends first to the end of the display line (LineEndDisplayExtend), then to the start of the document line (LineEndExtend). same energy, more selecting ๐Ÿ’–


๐ŸŽ€ vCHomeWrap(This) -> ok

  • This = wxStyledTextCtrl()

Basically VCHome, except when word-wrap is enabled it goes first to the start of the display line (VCHomeDisplay), then behaves like VCHome. very "we take the scenic route" ๐ŸŒˆ


๐ŸŽ€ vCHomeWrapExtend(This) -> ok

  • This = wxStyledTextCtrl()

Basically VCHomeExtend, except when word-wrap is enabled it extends first to the start of the display line (VCHomeDisplayExtend), then behaves like VCHomeExtend. matching set, obsessed ๐ŸŽ€


๐ŸŽ€ lineCopy(This) -> ok

  • This = wxStyledTextCtrl()

Copies the whole line that contains the caret. the entire line, not just the selection โ€” generous queen behavior ๐Ÿ‘‘


๐ŸŽ€ moveCaretInsideView(This) -> ok

  • This = wxStyledTextCtrl()

If the caret has wandered out of the current view, this drags it back inside. come back bb, we can't see you ๐Ÿ˜ญ


๐ŸŽ€ lineLength(This, Line) -> integer()

  • This = wxStyledTextCtrl()
  • Line = integer()

Tells you how many characters are on a line โ€” and yes, that count includes the end-of-line characters. full transparency ๐Ÿ”ฅ


๐ŸŽ€ braceHighlight(This, PosA, PosB) -> ok

  • This = wxStyledTextCtrl()
  • PosA = PosB = integer()

Highlights the characters sitting at two positions. brace besties, matched and glowing โœจ


๐ŸŽ€ braceBadLight(This, Pos) -> ok

  • This = wxStyledTextCtrl()

Highlights the character at a position to signal that there's no matching brace. it's giving "sorry bestie, nobody's coming" ๐Ÿ’€


๐ŸŽ€ braceMatch(This, Pos) -> integer()

  • This = wxStyledTextCtrl()
  • Pos = integer()

Finds the position of the matching brace, or returns wxSTC_INVALID_POSITION if there's no match. no cap, that's the whole vibe check ๐Ÿฆ‹


๐ŸŽ€ getViewEOL(This) -> boolean()

  • This = wxStyledTextCtrl()

Are the end-of-line characters visible right now? yes/no, that's the question ๐Ÿ‘€


๐ŸŽ€ setViewEOL(This, Visible) -> ok

  • This = wxStyledTextCtrl()
  • Visible = boolean()

Makes the end-of-line characters visible or invisible. toggle of the day, honestly ๐Ÿ’…


๐ŸŽ€ setModEventMask(This, EventMask) -> ok

  • This = wxStyledTextCtrl()
  • EventMask = integer()

Sets which document modification events get sent to the container.

The input should be a bit list containing one or more of the ?wxSTC_MOD_* constants, the ?wxSTC_PERFORMED_* constants, wxSTC_STARTACTION, wxSTC_MULTILINEUNDOREDO, wxSTC_MULTISTEPUNDOREDO, and wxSTC_LASTSTEPINUNDOREDO. You can also pass wxSTC_MODEVENTMASKALL to say "yes, send me everything, I want all the notifications" ๐Ÿ””


๐ŸŽ€ getEdgeColumn(This) -> integer()

  • This = wxStyledTextCtrl()

Gets the column number that text is supposed to be kept within. the boundary line, iykyk ๐Ÿ“


๐ŸŽ€ setEdgeColumn(This, Column) -> ok

  • This = wxStyledTextCtrl()
  • Column = integer()

Sets the column number of the edge. If text goes past the edge, it gets highlighted. stay in your lane or get lit up โœจ


๐ŸŽ€ setEdgeMode(This, EdgeMode) -> ok

  • This = wxStyledTextCtrl()
  • EdgeMode = integer()

The edge can be shown by a line (wxSTC_EDGE_LINE/wxSTC_EDGE_MULTILINE), or by highlighting text that goes beyond it (wxSTC_EDGE_BACKGROUND), or not displayed at all (wxSTC_EDGE_NONE).

The input should be one of the ?wxSTC_EDGE_* constants. pick your aesthetic ๐ŸŽจ


๐ŸŽ€ getEdgeMode(This) -> integer()

  • This = wxStyledTextCtrl()

Gets the edge highlight mode. The return value will be one of the ?wxSTC_EDGE_* constants ๐ŸŒธ


๐ŸŽ€ getEdgeColour(This) -> wx:wx_colour4()

  • This = wxStyledTextCtrl()

Gets the colour used for the edge indication. colour check complete โœ…


๐ŸŽ€ setEdgeColour(This, EdgeColour) -> ok

  • This = wxStyledTextCtrl()
  • EdgeColour = wx:wx_colour()

Changes the colour used for the edge indication. make it cute, make it yours ๐Ÿ’œ


๐ŸŽ€ searchAnchor(This) -> ok

  • This = wxStyledTextCtrl()

Sets the current caret position to be the search anchor. that's the starting point, bestie ๐Ÿ“


๐ŸŽ€ searchNext(This, SearchFlags, Text) -> integer()

  • This = wxStyledTextCtrl()
  • SearchFlags = integer()
  • Text = unicode:chardata()

Finds some text starting at the search anchor, moving forward.

Heads up though: it does not ensure the selection is visible. so like, it found it, but you might not see it ๐Ÿ™ˆ


๐ŸŽ€ searchPrev(This, SearchFlags, Text) -> integer()

  • This = wxStyledTextCtrl()
  • SearchFlags = integer()
  • Text = unicode:chardata()

Finds some text starting at the search anchor and moving backwards.

Same caveat: does not ensure the selection is visible. searching in the dark, lowkey ๐Ÿ”ฆ


๐ŸŽ€ linesOnScreen(This) -> integer()

  • This = wxStyledTextCtrl()

Tells you how many lines are completely visible. fully on screen or it doesn't count ๐Ÿ’…


๐ŸŽ€ usePopUp(This, PopUpMode) -> ok

  • This = wxStyledTextCtrl()
  • PopUpMode = integer()

Sets whether a pop-up menu shows up automatically when the user presses the wrong mouse button on certain areas.

The input should be one of the ?wxSTC_POPUP_* constants.

Remark: when wxContextMenuEvent is used to create a custom pop-up menu, this function should be called with wxSTC_POPUP_NEVER. Otherwise the default menu will be shown instead of your custom one โ€” and that's just embarrassing ๐Ÿ˜ฌ

๐ŸŽ€ selectionIsRectangle(This) -> boolean()

  • This = wxStyledTextCtrl()

Is the selection rectangular? The alternative is the more common stream selection. column-mode slay vs. the classic ๐ŸŽ€


๐ŸŽ€ setZoom(This, ZoomInPoints) -> ok

  • This = wxStyledTextCtrl()
  • ZoomInPoints = integer()

Sets the zoom level.

This number of points gets added to the size of all the fonts. It can be positive to magnify, or negative to reduce. go big or go smol ๐Ÿ”


๐ŸŽ€ getZoom(This) -> integer()

  • This = wxStyledTextCtrl()

Gets the zoom level. how magnified are we feeling today ๐Ÿ”Ž


๐ŸŽ€ getModEventMask(This) -> integer()

  • This = wxStyledTextCtrl()

Gets which document modification events get sent to the container.

The return value will be wxSTC_MODEVENTMASKALL if all changes generate events. Otherwise it'll be a bit list containing one or more of the ?wxSTC_MOD_* constants, the ?wxSTC_PERFORMED_* constants, wxSTC_STARTACTION, wxSTC_MULTILINEUNDOREDO, wxSTC_MULTISTEPUNDOREDO, and wxSTC_LASTSTEPINUNDOREDO. receipts, basically ๐Ÿงพ


๐ŸŽ€ setSTCFocus(This, Focus) -> ok

  • This = wxStyledTextCtrl()
  • Focus = boolean()

Changes the internal focus flag. focus era โœจ


๐ŸŽ€ getSTCFocus(This) -> boolean()

  • This = wxStyledTextCtrl()

Gets the internal focus flag. are we locked in or not ๐Ÿ‘€


๐ŸŽ€ setStatus(This, Status) -> ok

  • This = wxStyledTextCtrl()
  • Status = integer()

Changes the error status โ€” 0 = OK.

The input should be one of the ?wxSTC_STATUS_* constants. zero means we're thriving ๐Ÿ’š


๐ŸŽ€ getStatus(This) -> integer()

  • This = wxStyledTextCtrl()

Gets the error status. The return value will be one of the ?wxSTC_STATUS_* constants ๐ŸŒˆ


๐ŸŽ€ setMouseDownCaptures(This, Captures) -> ok

  • This = wxStyledTextCtrl()
  • Captures = boolean()

Sets whether the mouse is captured when its button is pressed. grabby hands, but make it configurable ๐Ÿ–ฑ๏ธ


๐ŸŽ€ getMouseDownCaptures(This) -> boolean()

  • This = wxStyledTextCtrl()

Gets whether the mouse gets captured. does it hold on or let go ๐Ÿซถ


๐ŸŽ€ setSTCCursor(This, CursorType) -> ok

  • This = wxStyledTextCtrl()
  • CursorType = integer()

Sets the cursor to one of the wxSTC_CURSOR* values. pick your vibe, the cursor is literally the main character of the screen ๐Ÿ’…


๐ŸŽ€ getSTCCursor(This) -> integer()

  • This = wxStyledTextCtrl()

Gets the cursor type. The return value will be one of the ?wxSTC_CURSOR* constants ๐Ÿ‘‘


๐ŸŽ€ setControlCharSymbol(This, Symbol) -> ok

  • This = wxStyledTextCtrl()
  • Symbol = integer()

Changes the way control characters are displayed: if Symbol is < 32, keep the drawn way; otherwise, use the given character. 32 is the line, no cap โœ‚๏ธ


๐ŸŽ€ getControlCharSymbol(This) -> integer()

  • This = wxStyledTextCtrl()

Get the way control characters are displayed. ๐Ÿ’…


wordPartLeft(This) -> ok

Types: This = wxStyledTextCtrl()

Move to the previous change in capitalisation. Like, caret jumps back to where the Caps Lock drama started โœจ

wordPartLeftExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Same vibe as wordPartLeft, except you're grabbing everything on the way โ€” move to the previous change in capitalisation extending the selection to the new caret position ๐Ÿซถ

wordPartRight(This) -> ok

Types: This = wxStyledTextCtrl()

Move to the change next in capitalisation. Forward, bestie, always forward ๐Ÿ‘‘

wordPartRightExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move to the next change in capitalisation, extending selection to new caret position. Capitalisation hop but make it a selection ๐Ÿ’…

setVisiblePolicy(This, VisiblePolicy, VisibleSlop) -> ok

Types: This = wxStyledTextCtrl(), VisiblePolicy = VisibleSlop = integer()

Set the way the display area is determined when a particular line is to be moved to by Find, FindNext, GotoLine, etc. It's literally the vibe check for scrolling ๐Ÿฆ‹

The first argument should be a bit list containing one or more of the ?wxSTC_VISIBLE_* constants. No cap.

delLineLeft(This) -> ok

Types: This = wxStyledTextCtrl()

Delete back from the current position to the start of the line. Yeet to the left ๐Ÿ˜ญ

delLineRight(This) -> ok

Types: This = wxStyledTextCtrl()

Delete forwards from the current position to the end of the line. Yeet to the right ๐Ÿ’€

getXOffset(This) -> integer()

Types: This = wxStyledTextCtrl()

Get the xOffset (ie, horizontal scroll position). That's the horizontal scroll position, in case the parenthetical didn't land ๐ŸŽ€

chooseCaretX(This) -> ok

Types: This = wxStyledTextCtrl()

Set the last x chosen value to be the caret x position. Locking in the caret's x, iconic behaviour โญ

setXCaretPolicy(This, CaretPolicy, CaretSlop) -> ok

Types: This = wxStyledTextCtrl(), CaretPolicy = CaretSlop = integer()

Set the way the caret is kept visible when going sideways. Sideways scrolling caret main character energy ๐Ÿ‘‘

The exclusion zone is given in pixels.

The first argument should be a bit list containing one or more of the ?wxSTC_CARET_* constants.

setYCaretPolicy(This, CaretPolicy, CaretSlop) -> ok

Types: This = wxStyledTextCtrl(), CaretPolicy = CaretSlop = integer()

Set the way the line the caret is on is kept visible โ€” the vertical sibling of setXCaretPolicy ๐ŸŒˆ

The exclusion zone is given in lines. (Lines, not pixels, keep that straight ๐Ÿ’…)

The first argument should be a bit list containing one or more of the ?wxSTC_CARET_* constants.

getPrintWrapMode(This) -> integer()

Types: This = wxStyledTextCtrl()

Is printing line wrapped? The return value will be one of the ?wxSTC_WRAP_* constants โœจ

setHotspotActiveForeground(This, UseSetting, Fore) -> ok

Types: This = wxStyledTextCtrl(), UseSetting = boolean(), Fore = wx:wx_colour()

Set a fore colour for active hotspots. Foreground, hotspot, coloured โ€” slay ๐ŸŽจ

setHotspotActiveBackground(This, UseSetting, Back) -> ok

Types: This = wxStyledTextCtrl(), UseSetting = boolean(), Back = wx:wx_colour()

Set a back colour for active hotspots. The background glow-up ๐Ÿฆ‹

setHotspotActiveUnderline(This, Underline) -> ok

Types: This = wxStyledTextCtrl(), Underline = boolean()

Enable / Disable underlining active hotspots. Underline on = cute, underline off = also cute ๐Ÿ™ˆ

setHotspotSingleLine(This, SingleLine) -> ok

Types: This = wxStyledTextCtrl(), SingleLine = boolean()

Limit hotspots to single line so hotspots on two lines don't merge. Respect the boundaries bestie โœ‹

paraDownExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Extend selection down one paragraph (delimited by empty lines). Paragraph = delimited by empty lines, iykyk ๐Ÿ“

paraUp(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret up one paragraph (delimited by empty lines) ๐Ÿงš

paraUpExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Extend selection up one paragraph (delimited by empty lines) ๐Ÿ’œ

positionBefore(This, Pos) -> integer()

Types: This = wxStyledTextCtrl(), Pos = integer()

Given a valid document position, return the previous position taking code page into account. Code page awareness is the whole point here, don't sleep on it ๐ŸŒธ

Returns 0 if passed 0. No underflow, we're classy ๐Ÿ’…

positionAfter(This, Pos) -> integer()

Types: This = wxStyledTextCtrl(), Pos = integer()

Given a valid document position, return the next position taking code page into account.

Maximum value returned is the last position in the document. So it clamps at the end, very responsible of it ๐Ÿซถ

copyRange(This, Start, End) -> ok

Types: This = wxStyledTextCtrl(), Start = End = integer()

Copy a range of text to the clipboard.

Positions are clipped into the document. Out-of-bounds nonsense gets clipped, no crash, periodt โœจ

copyText(This, Length, Text) -> ok

Types: This = wxStyledTextCtrl(), Length = integer(), Text = unicode:chardata()

Copy argument text to the clipboard. Just hand it Text and it goes straight to the clipboard, easy ๐ŸŽ€

setSelectionMode(This, SelectionMode) -> ok

Types: This = wxStyledTextCtrl(), SelectionMode = integer()

Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or by lines (wxSTC_SEL_LINES). Pick your fighter ๐Ÿ”ฅ

getSelectionMode(This) -> integer()

Types: This = wxStyledTextCtrl()

Get the mode of the current selection.

The return value will be one of the ?wxSTC_SEL_* constants ๐Ÿ‘‘

lineDownRectExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret down one line, extending rectangular selection to new caret position. Rectangular selection said "we move" ๐Ÿ’…

lineUpRectExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret up one line, extending rectangular selection to new caret position.

charLeftRectExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret left one character, extending rectangular selection to new caret position.

charRightRectExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret right one character, extending rectangular selection to new caret position.

homeRectExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret to first position on line, extending rectangular selection to new caret position. Home sweet home ๐Ÿ 

vCHomeRectExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret to before first visible character on line.

If already there move to first character on line. In either case, extend rectangular selection to new caret position. Two-step behaviour, very demure โœจ

lineEndRectExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret to last position on line, extending rectangular selection to new caret position.

pageUpRectExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret one page up, extending rectangular selection to new caret position. Page-flip but with a rect selection ๐Ÿฆ‹

pageDownRectExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret one page down, extending rectangular selection to new caret position.

stutteredPageUp(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret to top of page, or one page up if already at top of page. The "stuttered" part is literally this double behaviour, it's giving indecisive but in a useful way ๐Ÿ˜ญ

stutteredPageUpExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.

stutteredPageDown(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret to bottom of page, or one page down if already at bottom of page.

stutteredPageDownExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.

wordLeftEnd(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret left one word, position cursor at end of word. Note the end-of-word placement, that's the whole personality of this one ๐Ÿ’…

wordLeftEndExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret left one word, position cursor at end of word, extending selection to new caret position.

wordRightEnd(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret right one word, position cursor at end of word.

wordRightEndExtend(This) -> ok

Types: This = wxStyledTextCtrl()

Move caret right one word, position cursor at end of word, extending selection to new caret position ๐Ÿซถ

setWhitespaceChars(This, Characters) -> ok

Types: This = wxStyledTextCtrl(), Characters = unicode:chardata()

Set the set of characters making up whitespace for when moving or selecting by word.

Heads up bestie: should be called after SetWordChars. Order matters, don't do it backwards ๐Ÿ™ˆ

setCharsDefault(This) -> ok

Types: This = wxStyledTextCtrl()

Reset the set of characters for whitespace and word characters to the defaults. Factory reset but only for char sets ๐ŸŒธ

autoCompGetCurrent(This) -> integer()

Types: This = wxStyledTextCtrl()

Get currently selected item position in the auto-completion list. Which one is highlighted rn ๐Ÿ’…

allocate(This, Bytes) -> ok

Types: This = wxStyledTextCtrl(), Bytes = integer()

Enlarge the document to a particular size of text bytes. Pre-allocating so it doesn't have to keep reallocating โ€” practical queen behaviour ๐Ÿ‘‘

findColumn(This, Line, Column) -> integer()

Types: This = wxStyledTextCtrl(), Line = Column = integer()

Find the position of a column on a line taking into account tabs and multi-byte characters.

If beyond end of line, return line end position. It clamps, it doesn't crash, we love that โœจ

getCaretSticky(This) -> integer()

Types: This = wxStyledTextCtrl()

Can the caret preferred x position only be changed by explicit movement commands?

The return value will be one of the ?wxSTC_CARETSTICKY_* constants ๐ŸŽ€

setCaretSticky(This, UseCaretStickyBehaviour) -> ok

Types: This = wxStyledTextCtrl(), UseCaretStickyBehaviour = integer()

Stop the caret preferred x position changing when the user types. Sticky caret = it stays put, no wandering off mid-typing ๐Ÿ˜ค

The input should be one of the ?wxSTC_CARETSTICKY_* constants โ€” those are the only vibes it accepts, bestie ๐Ÿ’…

toggleCaretSticky(This) -> ok ๐ŸŽ€

Types:

This = wxStyledTextCtrl()

Switch between sticky and non-sticky โ€” literally meant to be bound to a key, so smash it on a shortcut and let it do its little flip โœจ

setPasteConvertEndings(This, Convert) -> ok ๐Ÿฆ‹

Types:

This = wxStyledTextCtrl()
Convert = boolean()

Enable/Disable convert-on-paste for line endings. Yes queen, control those endings ๐Ÿ‘‘

getPasteConvertEndings(This) -> boolean() ๐ŸŒธ

Types:

This = wxStyledTextCtrl()

Get the convert-on-paste setting. The vibe check for your paste behaviour ๐Ÿ’–

selectionDuplicate(This) -> ok โญ

Types:

This = wxStyledTextCtrl()

Duplicate the selection. Copy-paste energy but make it one call, iconic.

If selection is empty it duplicates the line containing the caret instead. No selection? No problem, the caret's line gets cloned ๐Ÿซถ

setCaretLineBackAlpha(This, Alpha) -> ok ๐ŸŒˆ

Types:

This = wxStyledTextCtrl()
Alpha = integer()

Set background alpha of the caret line โ€” make that highlighted line as see-through or as solid as you want, lowkey gorgeous.

getCaretLineBackAlpha(This) -> integer() ๐Ÿ’œ

Types:

This = wxStyledTextCtrl()

Get the background alpha of the caret line. Just reading back what you set, bestie ๐Ÿ”

startRecord(This) -> ok ๐ŸŽ€

Types:

This = wxStyledTextCtrl()

Start notifying the container of all key presses and commands. It's giving surveillance but make it feature โœจ

stopRecord(This) -> ok ๐Ÿ›‘

Types:

This = wxStyledTextCtrl()

Stop notifying the container of all key presses and commands. Recording over, pack it up ๐Ÿ’€

setLexer(This, Lexer) -> ok ๐Ÿงš

Types:

This = wxStyledTextCtrl()
Lexer = integer()

Set the lexing language of the document.

The input should be one of the ?wxSTC_LEX_* constants โ€” pick your language, slay ๐Ÿ’…

getLexer(This) -> integer() ๐Ÿ”ฅ

Types:

This = wxStyledTextCtrl()

Retrieve the lexing language of the document.

The return value will be one of the ?wxSTC_LEX_* constants. iykyk ๐ŸŒŸ

colourise(This, Start, End) -> ok ๐ŸŒˆ

Types:

This = wxStyledTextCtrl()
Start = End = integer()

Colourise a segment of the document using the current lexing language. Give that stretch of text its full makeover ๐Ÿ’– (yes it's spelled with the u, we're being fancy)

setProperty(This, Key, Value) -> ok ๐ŸŽ€

Types:

This = wxStyledTextCtrl()
Key = Value = unicode:chardata()

Set up a value that may be used by a lexer for some optional feature. Little custom setting for your lexer, no big deal โœจ

setKeyWords(This, KeyWordSet, KeyWords) -> ok ๐Ÿ‘‘

Types:

This = wxStyledTextCtrl()
KeyWordSet = integer()
KeyWords = unicode:chardata()

Set up the key words used by the lexer. Tell it which words are the main characters ๐Ÿ’…

setLexerLanguage(This, Language) -> ok ๐Ÿฆ‹

Types:

This = wxStyledTextCtrl()
Language = unicode:chardata()

Set the lexing language of the document based on string name. String-based this time, not a constant โ€” flexible fr fr ๐ŸŒธ

getProperty(This, Key) -> unicode:charlist() ๐Ÿ”

Types:

This = wxStyledTextCtrl()
Key = unicode:chardata()

Retrieve a "property" value previously set with SetProperty. Look at you, remembering what you stored ๐Ÿซถ

getStyleBitsNeeded(This) -> integer() โญ

Types:

This = wxStyledTextCtrl()

Retrieve the number of bits the current lexer needs for styling.

Deprecated: โ€” yeah bestie, this one's deprecated, use it knowing it's on its way out ๐Ÿ™ˆ

getCurrentLine(This) -> integer() ๐Ÿ“

Types:

This = wxStyledTextCtrl()

Returns the line number of the line with the caret. Where's your cursor at? This tells you ๐Ÿ’–

styleSetSpec(This, StyleNum, Spec) -> ok ๐ŸŽจ

Types:

This = wxStyledTextCtrl()
StyleNum = integer()
Spec = unicode:chardata()

Extract style settings from a spec-string which is composed of one or more of the following comma separated elements โ€” okay so here's the whole menu, don't skip a single one:

  • bold โ€” turns on bold
  • italic โ€” turns on italics
  • fore:[name or #RRGGBB] โ€” sets the foreground colour
  • back:[name or #RRGGBB] โ€” sets the background colour
  • face:[facename] โ€” sets the font face name to use
  • size:[num] โ€” sets the font size in points
  • eol โ€” turns on eol filling
  • underline โ€” turns on underlining

Mix and match, comma-separated, aesthetic unlocked ๐ŸŒˆโœจ

styleSetFont(This, StyleNum, Font) -> ok ๐ŸŽ€

Types:

This = wxStyledTextCtrl()
StyleNum = integer()
Font = wxFont:wxFont()

Set style size, face, bold, italic, and underline attributes from a wxFont's attributes. Hand it a font, it copies the whole look ๐Ÿ’…

styleSetFontAttr(This, StyleNum, Size, FaceName, Bold, Italic, Underline) -> ok ๐ŸŒธ

Types:

This = wxStyledTextCtrl()
StyleNum = Size = integer()
FaceName = unicode:chardata()
Bold = Italic = Underline = boolean()

styleSetFontAttr(This, StyleNum, Size, FaceName, Bold, Italic, Underline, Options :: [Option]) -> ok ๐Ÿฆ‹

Types:

This = wxStyledTextCtrl()
StyleNum = Size = integer()
FaceName = unicode:chardata()
Bold = Italic = Underline = boolean()
Option = {encoding, wx:wx_enum()}

Set all font style attributes at once โ€” one call, every attribute, efficient queen ๐Ÿ‘‘ The Options list lets you pass {encoding, wx:wx_enum()} on top.

styleSetCharacterSet(This, Style, CharacterSet) -> ok ๐Ÿงš

Types:

This = wxStyledTextCtrl()
Style = CharacterSet = integer()

Set the character set of the font in a style.

Converts the Scintilla character set values to a wxFontEncoding. Translator duties, iconic of it honestly ๐ŸŒŸ

styleSetFontEncoding(This, Style, Encoding) -> ok ๐Ÿ’œ

Types:

This = wxStyledTextCtrl()
Style = integer()
Encoding = wx:wx_enum()

Set the font encoding to be used by a style. Encoding but for your font, periodt โœจ

cmdKeyExecute(This, Cmd) -> ok โŒจ๏ธ

Types:

This = wxStyledTextCtrl()
Cmd = integer()

Perform one of the operations defined by the wxSTC_CMD_* constants. Fire off a command like you're hitting a hotkey, no cap ๐Ÿ”ฅ

setMargins(This, Left, Right) -> ok ๐Ÿ“

Types:

This = wxStyledTextCtrl()
Left = Right = integer()

Set the left and right margin in the edit area, measured in pixels. Give your text some breathing room, self-care ๐Ÿ’–

getSelection(This) -> {From :: integer(), To :: integer()} ๐ŸŽ€

Types:

This = wxStyledTextCtrl()

Gets the current selection span.

If the returned values are equal, there was no selection. Please note that the indices returned may be used with the other wxTextCtrl methods but don't necessarily represent the correct indices into the string returned by wxComboBox:getValue/1 โ€” for multiline controls under Windows (at least,) you should use wxTextCtrl:getStringSelection/1 to get the selected text. Yeah that's a whole lot, but it matters bestie, don't @ me ๐Ÿ˜ญ

pointFromPosition(This, Pos) -> {X :: integer(), Y :: integer()} ๐Ÿ“

Types:

This = wxStyledTextCtrl()
Pos = integer()

Retrieve the point in the window where a position is displayed. Position in, pixel coords out โœจ

scrollToLine(This, Line) -> ok ๐Ÿฆ‹

Types:

This = wxStyledTextCtrl()
Line = integer()

Scroll enough to make the given line visible. Gentle scroll, not a jump scare ๐Ÿ’…

scrollToColumn(This, Column) -> ok ๐ŸŒธ

Types:

This = wxStyledTextCtrl()
Column = integer()

Scroll enough to make the given column visible. Same energy, sideways ๐Ÿซถ

setVScrollBar(This, Bar) -> ok ๐ŸŽš๏ธ

Types:

This = wxStyledTextCtrl()
Bar = wxScrollBar:wxScrollBar()

Set the vertical scrollbar to use instead of the one that's built-in. Bring your own, main character scrollbar ๐Ÿ‘‘

setHScrollBar(This, Bar) -> ok ๐ŸŽ›๏ธ

Types:

This = wxStyledTextCtrl()
Bar = wxScrollBar:wxScrollBar()

Set the horizontal scrollbar to use instead of the one that's built-in. Custom scrollbar but make it horizontal ๐ŸŒˆ

getLastKeydownProcessed(This) -> boolean() โŒจ๏ธ

Types:

This = wxStyledTextCtrl()

Can be used to prevent the EVT_CHAR handler from adding the char. Handy little gatekeeper ๐Ÿ’…

setLastKeydownProcessed(This, Val) -> ok ๐Ÿ”˜

Types:

This = wxStyledTextCtrl()
Val = boolean()

Returns the line number of the line with the caret.

Yeah bestie, the docs literally say that โ€” that's the description in the original, and I'm not about to make up something else for you ๐Ÿ™ˆ

saveFile(This, Filename) -> boolean() ๐Ÿ’พ

Types:

This = wxStyledTextCtrl()
Filename = unicode:chardata()

Write the contents of the editor to Filename. Save your work, please, I'm begging ๐Ÿ˜ญ๐Ÿ’–

loadFile(This, Filename) -> boolean() ๐Ÿ“‚

Types:

This = wxStyledTextCtrl()
Filename = unicode:chardata()

Load the contents of Filename into the editor. Open it up, let it in โœจ

doDragOver(This, X, Y, DefaultRes) -> wx:wx_enum() ๐Ÿ–ฑ๏ธ

Types:

This = wxStyledTextCtrl()
X = Y = integer()
DefaultRes = wx:wx_enum()

Allow for simulating a DnD DragOver. Fake the drag like a little rehearsal ๐ŸŽญ

doDropText(This, X, Y, Data) -> boolean() ๐ŸŽฏ

Types:

This = wxStyledTextCtrl()
X = Y = integer()
Data = unicode:chardata()

Allow for simulating a DnD DropText. Same deal, but now it's the drop moment ๐Ÿ’…

getUseAntiAliasing(This) -> boolean() ๐ŸŒธ

Types:

This = wxStyledTextCtrl()

Returns the current UseAntiAliasing setting. Smooth edges check, obsessed ๐Ÿซถ

addTextRaw(This, Text) -> ok ๐Ÿ“

Types:

This = wxStyledTextCtrl()
Text = binary()

addTextRaw(This, Text, Options :: [Option]) -> ok ๐Ÿ“โœจ

Types:

This = wxStyledTextCtrl()
Text = binary()
Option = {length, integer()}

Add text to the document at current position. Raw binary text, straight in, no extra processing ๐Ÿ’–

insertTextRaw(This, Pos, Text) -> ok ๐Ÿ”ฅ

Types:

This = wxStyledTextCtrl()
Pos = integer()
Text = binary()

Insert string at a position. Binary text, exact spot, slay ๐ŸŽ€

getCurLineRaw(This) -> Result ๐Ÿ“

Types:

Result = {Res :: binary(), LinePos :: integer()}
This = wxStyledTextCtrl()

Retrieve the text of the line containing the caret.

Returns the index of the caret on the line. So you get the text and where your cursor is sitting in it โ€” two-for-one ๐ŸŒŸ

getLineRaw(This, Line) -> binary() ๐Ÿ“„

Types:

This = wxStyledTextCtrl()
Line = integer()

Retrieve the contents of a line. Just the one line, binary flavoured ๐Ÿ’…

getSelectedTextRaw(This) -> binary() ๐ŸŽ€

Types:

This = wxStyledTextCtrl()

Retrieve the selected text. Whatever you highlighted, raw and ready โœจ

getTextRangeRaw(This, StartPos, EndPos) -> binary() ๐Ÿฆ‹

Types:

This = wxStyledTextCtrl()
StartPos = EndPos = integer()

Retrieve a range of text. From StartPos to EndPos, binary babe ๐ŸŒธ

setTextRaw(This, Text) -> ok ๐Ÿ’œ

Types:

This = wxStyledTextCtrl()
Text = binary()

Replace the contents of the document with the argument Text. Full reset, out with the old ๐Ÿ”„

getTextRaw(This) -> binary() ๐Ÿ“œ

Types:

This = wxStyledTextCtrl()

Retrieve all the text in the document. The whole thing, every last char, iconic ๐Ÿ‘‘

appendTextRaw(This, Text) -> ok ๐Ÿงš

Types:

This = wxStyledTextCtrl()
Text = binary()

appendTextRaw(This, Text, Options :: [Option]) -> ok

Types:

  • This = wxStyledTextCtrl()
  • Text = binary()
  • Option = {length, integer()}

Okay bestie, this one is the chill little sibling of the append functions ๐Ÿ’ซ โ€” it takes your Text and appends that string to the end of the document, and the genuinely iconic part? It does not touch your selection. Not even a little. Your cursor stays exactly where it was, your highlight stays exactly where it was, nobody gets moved. ๐Ÿซถ

appendTextRaw(This, Text, Options :: [Option]) -> ok

So the vibe is: you hand it This (the control), you hand it Text (a binary(), no games), and the only option on the menu is {length, integer()}. Then it justโ€ฆ returns ok and gets on with its life. Lowkey the most well-adjusted function in the whole export list ๐Ÿ˜ญโœจ

No cap: "without changing the selection" is the whole personality of this call โ€” if you were relying on it to move the caret to the end, it will not, and that's on purpose, so plan accordingly ๐Ÿ’…

And that's a wrap on the page, bestie ๐ŸŽ€ โ€” wxStyledTextCtrl(3erl) came to us courtesy of the wxWidgets team, glowing with version wx 2.2.2.1 in the footer, and stamped with the date you'll find sitting right there at the bottom of the original. Take a screenshot, tag your friends, main character energy from NAME all the way to the final ok. ๐ŸŒˆ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from