wxStyledTextCtrl(3erl)
๐ธ 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 searchmaxPosโ the last position (starting from zero) in the document to which the search will be restrictedtextโ the text to search forflagsโ (optional) the search flags. This should be a bit list containing one or more of thewxSTC_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: whenwxContextMenuEventis used to create a custom pop-up menu, this function should be called withwxSTC_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 bolditalicโ turns on italicsfore:[name or #RRGGBB]โ sets the foreground colourback:[name or #RRGGBB]โ sets the background colourface:[facename]โ sets the font face name to usesize:[num]โ sets the font size in pointseolโ turns on eol fillingunderlineโ 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
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 ยท Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 ยท Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms