TextEdit
Multiline text editor with selection, multiple carets and undo history.
TextEdit edits multiline text in the UI. The application implements file loading, saving and validation. After creation, add the control to the UI and configure its size. Even an empty document contains one logical line.
Assign Text to load a document. The setter emits TextSet rather than TextChanged and, with normal undo history enabled, allows the replacement to be undone. For a new document, explicitly call ClearUndoHistory and TagSavedVersion after loading. Do not clear history on every model synchronization: that removes the user’s ability to undo.
Connect TextChanged and read Text to track edits. Notifications are deferred; several synchronous edits can coalesce into one signal. TextSet reports whole-text assignment or Clear rather than individual keystrokes. Explicitly update the model when loading.
Lines and columns start at 0. Columns count Unicode code points rather than C# UTF-16 char values: a supplementary character occupies one column while String.Length counts two code units. A code point is not always one visible character either. Convert C# string indices before passing them as columns.
InsertTextAtCaret replaces selection; by default it targets all eligible carets, while caretIndex = 0 selects the main caret. RemoveText uses an exclusive end boundary. Group related edits with BeginComplexOperation/EndComplexOperation in try/finally so one command can be undone with one Undo.
Editable false limits user editing and Undo/Redo, but not programmatic setters or insertion. Compare GetVersion with GetSavedVersion to track unsaved changes. Call TagSavedVersion after the application successfully saves: the method does not write a file. Explicitly restore the saved marker after clearing history.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
TextEditConstructor
public TextEdit();Creates an editable empty control with one logical line and empty undo history. Configure UI attachment and size separately.
Properties48
AutowrapModeProperty
public TextServer.AutowrapMode AutowrapMode { get; set; }Visual wrapping rule with WrapMode.Boundary: Arbitrary uses grapheme boundaries, Word uses words, WordSmart can split an oversized word, and Off disables soft wrapping. Does not enable Boundary by itself.
BackspaceDeletesCompositeCharacterEnabledProperty
public bool BackspaceDeletesCompositeCharacterEnabled { get; set; }With true, normal Backspace deletes to the previous composite-character boundary; false deletes one code point. CaretMidGrapheme true takes priority and also selects one-code-point deletion. Does not control RemoveText with an explicit range.
CaretBlinkProperty
public bool CaretBlink { get; set; }Enables text-caret blinking. The timer runs while focused; false disables blinking rather than hiding the caret. Visibility still depends on focus and other drawing conditions. Configure timing with CaretBlinkInterval.
CaretBlinkIntervalProperty
public float CaretBlinkInterval { get; set; }Positive caret-visibility toggle interval in seconds. For example, 0.5 toggles every half second; a complete visible/hidden cycle takes two intervals. Zero does not disable blinking: use CaretBlink false. This is not a key-repeat delay.
CaretDrawWhenEditableDisabledProperty
public bool CaretDrawWhenEditableDisabled { get; set; }Allows caret drawing with Editable false, subject to the remaining visibility conditions. Does not allow input or make the control editable. Leave false for ordinary text viewing without a caret.
CaretMidGraphemeProperty
public bool CaretMidGrapheme { get; set; }Allows caret/deletion behavior inside composite characters. With true, Backspace deletes one code point even if BackspaceDeletesCompositeCharacterEnabled is enabled. Does not mean operating on halves of a UTF-16 surrogate pair.
CaretMoveOnRightClickProperty
public bool CaretMoveOnRightClick { get; set; }Allows moving the caret by right-clicking. Assigning this property does not move it or enable the context menu; configure ContextMenuEnabled separately.
CaretMultipleProperty
public bool CaretMultiple { get; set; }Allows multiple carets. false immediately removes secondary carets, resets multicaret-edit state and blocks AddCaret. Do not toggle this setting inside BeginMulticaretEdit/EndMulticaretEdit.
CaretTypeProperty
public TextEdit.CaretTypeEnum CaretType { get; set; }Text-caret shape: Line or Block. Block changes drawing but does not enable character replacement: configure OvertypeMode separately. Does not change text or caret positions.
ContextMenuEnabledProperty
public bool ContextMenuEnabled { get; set; }Allows the user to open the built-in context menu. false neither deletes the PopupMenu nor prevents programmatic GetMenu or MenuOption calls. This is an interface setting, not an editing restriction; use Editable to control input.
CustomWordSeparatorsProperty
public string CustomWordSeparators { get; set; }Additional word-separator characters for the editor’s text system. Assigning the string does not enable them; use UseCustomWordSeparators. Not a regex and does not change the fixed WholeWords boundary checks in Search.
DeselectOnFocusLossEnabledProperty
public bool DeselectOnFocusLossEnabled { get; set; }Controls deselection on focus loss. false retains selection when another control receives focus. Switching false to true while this editor is unfocused immediately clears an existing selection. Does not edit text or transfer focus.
DragAndDropSelectionEnabledProperty
public bool DragAndDropSelectionEnabled { get; set; }Allows the user to drag selected text through TextEdit’s drag-and-drop handling. Does not create a selection, perform a transfer on assignment or automatically enable file/project-object drops. Selection separately requires SelectingEnabled.
DrawControlCharsProperty
public bool DrawControlChars { get; set; }Allows the text system to display control characters. Does not remove them from the document or sanitize/validate input text.
DrawSpacesProperty
public bool DrawSpaces { get; set; }Shows space markers without changing Text or selection rules. Presentation rather than adding characters to a file.
DrawTabsProperty
public bool DrawTabs { get; set; }Shows visual tab markers while retaining document text. Does not enable Tab input or convert tabs into spaces.
EditableProperty
public bool Editable { get; set; }Allows user editing; default true. false also blocks Undo/Redo actions, but not programmatic Text, SetLine, InsertTextAtCaret or RemoveText. This is a UI mode rather than model-data protection.
EmojiMenuEnabledProperty
public bool EmojiMenuEnabled { get; set; }Allows the context-menu emoji command when the platform supports a system picker. false disables the corresponding item rather than necessarily removing it. Editable is also required. Does not add an emoji font or guarantee a system picker on every platform.
EmptySelectionClipboardEnabledProperty
public bool EmptySelectionClipboardEnabled { get; set; }Allows default Copy and Cut to operate on full lines when no text is selected. Defaults to true. Does not mean copying an empty string: it copies the entire caret line, which Cut may remove. Does not affect selected-text handling; assigning the property does not access the clipboard.
HighlightAllOccurrencesProperty
public bool HighlightAllOccurrences { get; set; }Highlights case-sensitive whole-word matches of caret 0’s selected text. Empty or whitespace-only selections are ignored. Creates no additional selections and does not set SetSearchText. Differs from AddSelectionForNextOccurrence, which allows substring matches.
HighlightCurrentLineProperty
public bool HighlightCurrentLine { get; set; }Highlights the background of current caret lines using the theme color. This is visual highlighting rather than text selection: HasSelection and GetSelectedText are unchanged. Use Select for an explicit range.
IndentWrappedLinesProperty
public bool IndentWrappedLines { get; set; }Adds visual indentation to wrapped continuations. Does not insert spaces/tabs or change text or logical line numbers.
LanguageProperty
public string Language { get; set; }Text-shaping language hint, such as ar; an empty string uses the locale. Does not translate the document or switch application language. Changes shaping/glyph selection while retaining Text.
MiddleMousePasteEnabledProperty
public bool MiddleMousePasteEnabled { get; set; }Allows middle-mouse paste through the primary-selection clipboard on supporting platforms. Does not add primary-clipboard support or control ordinary Paste. false disables this input path but does not block programmatic PastePrimaryClipboard. Assigning the property inserts nothing.
MinimapDrawProperty
public bool MinimapDraw { get; set; }Shows the document minimap. It takes part of TextEdit’s width, so enabling it can change the number of display rows when wrapping is enabled. Source Text and logical line count remain unchanged. Set its width with MinimapWidth.
MinimapWidthProperty
public int MinimapWidth { get; set; }Minimap area width in control pixels. Use a nonnegative value that leaves room for the main text. This is not a minimap font scale. Changing it recalculates available wrap width; use MinimapDraw false to disable the minimap.
PlaceholderTextProperty
public string PlaceholderText { get; set; }Empty-editor hint, separate from Text. GetPlaceholder returns the source string; presentation uses UI translation. Not part of document saving, searching or content history.
ScrollFitContentHeightProperty
public bool ScrollFitContentHeight { get; set; }Include content in the control’s minimum height. A parent container can expand the editor instead of using internal scrolling. Does not change font size or add lines.
ScrollFitContentWidthProperty
public bool ScrollFitContentWidth { get; set; }Include content in the control’s minimum width. A layout requirement rather than fixed width or text zoom; account for interaction with wrapping.
ScrollHorizontalProperty
public int ScrollHorizontal { get; set; }Horizontal offset in pixels. Clamped to the internal scrollbar range; wrapping can eliminate the available horizontal range. Not a text column number.
ScrollPastEndOfFileProperty
public bool ScrollPastEndOfFile { get; set; }Allows extra scrolling space beyond text end. Does not add empty document lines or increase GetLineCount.
ScrollSmoothProperty
public bool ScrollSmooth { get; set; }Enables smooth vertical scrolling. Does not change ScrollVertical units or guarantee animation for every programmatic SetVScroll.
ScrollVScrollSpeedProperty
public float ScrollVScrollSpeed { get; set; }Smooth vertical scrolling speed, at least 1. Does not set the current offset or represent line height or a horizontal step size.
ScrollVerticalProperty
public double ScrollVertical { get; set; }Vertical offset in visual-row units, allowing a fractional part. Not pixels or always a logical line number: use GetScrollPosForLine with wrapping. The getter returns the actual clamped value.
SelectingEnabledProperty
public bool SelectingEnabled { get; set; }Allows text selection. Disabling clears existing selections but does not block caret movement through Select or make the document read-only. Configure Editable separately.
SelectionHandleEnabledProperty
public bool SelectionHandleEnabled { get; set; }Enables on-screen selection handles for touch input. Does not enable selection itself; configure SelectingEnabled separately. Does not control the number of carets or replace CaretMultiple.
ShortcutKeysEnabledProperty
public bool ShortcutKeysEnabled { get; set; }Enables built-in editing-command shortcuts and their context-menu accelerator labels. Does not disable all keyboard input or block programmatic commands. Use Editable false to prevent user text editing.
StructuredTextBidiOverrideProperty
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }Structured-text parser for mixed LTR/RTL: URI, path, email, list and other supported modes. Controls separator presentation rather than converting document encoding. Configure parser options separately.
StructuredTextBidiOverrideOptionsProperty
public Reckfell.Collections.Array StructuredTextBidiOverrideOptions { get; set; }Shared Array of BiDi parser options. The setter compares contents and skips equal values; merely assigning Duplicate with old contents does not detach the previous array. In-place mutation does not trigger text recalculation. Supply a separately prepared array and a new array with changed contents when updating.
SyntaxHighlighterProperty
public SyntaxHighlighter SyntaxHighlighter { get; set; }This editor’s highlighting resource; null disables highlighting. Use one instance per TextEdit because the resource stores only one context. Reassigning the same resource is skipped and does not replace ClearHighlightingCache/EmitChanged.
TabInputModeProperty
public bool TabInputMode { get; set; }Controls editor handling of the Tab key. Does not convert existing tab characters, set their width or automatically translate indentation to spaces.
TextProperty
public string Text { get; set; }Full text with \n line separators. Assignment replaces the document, emits TextSet without TextChanged and allows Undo with history enabled. For a newly loaded document, explicitly clear history and mark the saved version afterward.
TextDirectionProperty
public Control.TextDirection TextDirection { get; set; }Base text direction: Inherited follows Control layout, Auto derives it from text, and Ltr/Rtl set it explicitly. Does not translate or reverse stored Text. Document character order remains logical.
UseCustomWordSeparatorsProperty
public bool UseCustomWordSeparators { get; set; }Enables CustomWordSeparators for word-boundary processing. Independent of UseDefaultWordSeparators; both sets can be used together. Does not switch Search into WholeWords mode.
UseDefaultWordSeparatorsProperty
public bool UseDefaultWordSeparators { get; set; }Enables the text system’s default word separators. Disabling does not enable custom separators automatically; configure UseCustomWordSeparators separately. Does not change Search WholeWords boundary checks.
VirtualKeyboardEnabledProperty
public bool VirtualKeyboardEnabled { get; set; }Allows the on-screen keyboard when supported by the current platform. Assigning true does not itself open it. VirtualKeyboardShowOnFocus separately controls opening on focus; editing requires Editable. Does not build a custom keyboard from UI controls.
VirtualKeyboardShowOnFocusProperty
public bool VirtualKeyboardShowOnFocus { get; set; }Allows requesting the on-screen keyboard on focus. Requires VirtualKeyboardEnabled, Editable and platform support. false disables focus-triggered opening rather than every other keyboard-opening path.
WrapModeProperty
public TextEdit.LineWrappingMode WrapMode { get; set; }None disables visual wrapping; Boundary constrains lines to available control width. AutowrapMode chooses break points. Does not insert line separators or change GetLineCount; gutters, scrollbar, theme and minimap also affect available width.
Methods259
AddCaretint
public int AddCaret(int line, int column);Adds a caret and returns its index; -1 when CaretMultiple is disabled or the position overlaps an existing caret/selection outside a multicaret edit. Position is clamped to the document. Inside BeginMulticaretEdit, a new caret is temporarily ignored by the current operation until EndMulticaretEdit.
| Name | Type | Default |
|---|---|---|
line | int | — |
column | int | — |
lineZero-based logical line.
columnColumn in Unicode code points rather than a UTF-16 index.
intAdds a caret and returns its index; -1 when CaretMultiple is disabled or the position overlaps an existing caret/selection outside a multicaret edit. Position is clamped to the document. Inside BeginMulticaretEdit, a new caret is temporarily ignored by the current operation until EndMulticaretEdit.
AddCaretAtCaretsvoid
public void AddCaretAtCarets(bool below);Adds a caret one visible display row above or below each original caret, preserving the visual horizontal position and corresponding selection span. Requires CaretMultiple. With wrapping, the target may be another part of the same logical line; hidden lines are skipped. No caret is added beyond document edges; duplicate positions are merged.
| Name | Type | Default |
|---|---|---|
below | bool | — |
belowtrue adds one visible row below; false adds above.
AddGuttervoid
public void AddGutter(int at = -1);Adds a field beside the text and cells for every logical line. at within 0…Count inserts at that index; a negative value or one above Count appends. Later gutter indices shift. A new gutter is String, width 24, drawn, non-clickable and non-overwritable. Emits GutterAdded without an index.
| Name | Type | Default |
|---|---|---|
at | int | -1 |
atInsertion index 0…GetGutterCount; negative values or values above Count append.
AddSelectionForNextOccurrencevoid
public void AddSelectionForNextOccurrence();Adds a selection for the next literal match of the last indexed caret’s selection. Requires SelectingEnabled and CaretMultiple. With no selection, the first call only selects the word. Search is case-sensitive, allows substrings and wraps; multiline queries are unsupported. Matches may overlap, so merging need not increase the caret count. Does not edit text.
AdjustCaretsAfterEditvoid · Deprecated
public void AdjustCaretsAfterEdit(int caret, int fromLine, int fromCol, int toLine, int toCol);Obsolete no-op. Current edit operations adjust carets themselves; remove this call from new code.
| Name | Type | Default |
|---|---|---|
caret | int | — |
fromLine | int | — |
fromCol | int | — |
toLine | int | — |
toCol | int | — |
caretCurrent caret index rather than a persistent identifier.
fromLineUnused by the obsolete method.
fromColUnused by the obsolete method.
toLineUnused by the obsolete method.
toColUnused by the obsolete method.
AdjustViewportToCaretvoid
public void AdjustViewportToCaret(int caretIndex = 0);Scrolls the viewport to reveal the specified caret without moving it. Use current layout after text/size changes. Explicitly choose the intended index in multicaret mode.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent index of one caret; 0 is the main caret.
ApplyImevoid
public void ApplyIme();Applies the current IME composition through the insertion path and closes it. Does not save a document file. Invoke from a coordinated editable context rather than using it for ordinary programmatic string insertion.
Backspacevoid
public void Backspace(int caretIndex = -1);Runs deletion before the caret. The default implementation requires Editable; joins lines at line start and does nothing at document start. If the target set contains a selection, deletes selections without deleting characters at other unselected carets. Defaults to all eligible carets. An overridden _Backspace completely replaces the default path.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexCaret index; Backspace uses -1 for the entire eligible set.
BeginComplexOperationvoid
public void BeginComplexOperation();Begins an edit group for one Undo. Supports nested groups; balance each Begin with EndComplexOperation in finally. Not a model transaction and does not defer all signals until the group ends.
BeginMulticaretEditvoid
public void BeginMulticaretEdit();Begins a multicaret-processing scope: merging is deferred and new carets can be marked ignored. End with EndMulticaretEdit in finally; scopes can nest. Use BeginComplexOperation separately for Undo grouping: these are different mechanisms.
CancelImevoid
public void CancelIme();Cancels unfinished IME composition and updates its presentation. Does not revert committed Text or replace Undo for previous edits.
CenterViewportToCaretvoid
public void CenterViewportToCaret(int caretIndex = 0);Centers the viewport around the specified caret within scroll limits. Does not create a selection or move the caret.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent index of one caret; 0 is the main caret.
Clearvoid
public void Clear();Clears text and emits TextSet. An empty document retains one line. With Editable true and history enabled, the operation is undoable; with Editable false it clears history. Distinct from ClearUndoHistory, which retains text.
ClearUndoHistoryvoid
public void ClearUndoHistory();Removes Undo/Redo while retaining current text. Also resets the GetSavedVersion marker. Retag with TagSavedVersion after loading if needed; clearing history does not save anything to disk.
CollapseCaretsvoid
public void CollapseCarets(int fromLine, int fromColumn, int toLine, int toColumn, bool inclusive = false);Moves carets and affected selection boundaries inside the range to the original fromLine/fromColumn position. Reversed bounds are normalized for membership, but the target remains the original from position. inclusive includes both edges; both are excluded by default. Fully contained selections are cleared, partial selections shortened, and duplicate carets merged. Merging can be deferred inside a multicaret-edit scope. Text and Undo history are unchanged.
| Name | Type | Default |
|---|---|---|
fromLine | int | — |
fromColumn | int | — |
toLine | int | — |
toColumn | int | — |
inclusive | bool | false |
fromLineOriginal logical target line and first range boundary.
fromColumnOriginal target column in Unicode code points; remains the target for a reversed range.
toLineLogical line of the second range boundary.
toColumnSecond boundary column in Unicode code points.
inclusiveInclude both range edges; false excludes both.
Copyvoid
public void Copy(int caretIndex = -1);The default implementation copies selected text to the system clipboard without editing the document. With caretIndex -1, selections are joined by newlines in document order. Without a selection, EmptySelectionClipboardEnabled permits copying full lines with a trailing newline; multiple carets on one line do not duplicate it. With that setting disabled and no selection, leaves the clipboard unchanged. Works with Editable false. Overriding _Copy replaces this behavior.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexExisting caret index; -1 means all.
Cutvoid
public void Cut(int caretIndex = -1);The default implementation first copies text, then, when Editable, removes selections or full lines if EmptySelectionClipboardEnabled allows it. With Editable false, the document is unchanged but copying can still occur. Undo restores the document, not the previous system clipboard. Cut’s internal copying does not call a custom _Copy; override _Cut to replace the whole action.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexExisting caret index; -1 means all.
DeleteSelectionvoid
public void DeleteSelection(int caretIndex = -1);Deletes selected text and collapses affected selections. By default, processes all eligible carets and groups deletion into one Undo step. A specific caretIndex limits the operation to one caret. Programmatic calls work independently of Editable.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
Deselectvoid
public void Deselect(int caretIndex = -1);Clears selection while retaining caret positions and text. caretIndex -1 affects all carets; a specific index affects one. Does not remove secondary carets.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
EndActionvoid
public void EndAction();Marks a boundary in the current StartAction action; not Undo, rollback or an immediate text reset. Group completion can be processed with the next action. Use StartAction with another type or None to switch groups explicitly.
EndComplexOperationvoid
public void EndComplexOperation();Closes one undo-group level. A completed outer group combines nested changes into one history step. Call in finally for its matching BeginComplexOperation.
EndMulticaretEditvoid
public void EndMulticaretEdit();Closes a multicaret-edit level. Leaving the outer scope performs pending merges and clears ignored indices. Does not replace EndComplexOperation for Undo history.
GetAutowrapModeTextServer.AutowrapMode
public TextServer.AutowrapMode GetAutowrapMode();Visual wrapping rule with WrapMode.Boundary: Arbitrary uses grapheme boundaries, Word uses words, WordSmart can split an oversized word, and Off disables soft wrapping. Does not enable Boundary by itself.
TextServer.AutowrapModeVisual wrapping rule with WrapMode.Boundary: Arbitrary uses grapheme boundaries, Word uses words, WordSmart can split an oversized word, and Off disables soft wrapping. Does not enable Boundary by itself.
GetCaretBlinkIntervalfloat
public float GetCaretBlinkInterval();Positive caret-visibility toggle interval in seconds. For example, 0.5 toggles every half second; a complete visible/hidden cycle takes two intervals. Zero does not disable blinking: use CaretBlink false. This is not a key-repeat delay.
floatPositive caret-visibility toggle interval in seconds. For example, 0.5 toggles every half second; a complete visible/hidden cycle takes two intervals. Zero does not disable blinking: use CaretBlink false. This is not a key-repeat delay.
GetCaretColumnint
public int GetCaretColumn(int caretIndex = 0);Active endpoint column in Unicode code points. Not a pixel position, UTF-16 index or guaranteed boundary of one visible character.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intActive endpoint column in Unicode code points. Not a pixel position, UTF-16 index or guaranteed boundary of one visible character.
GetCaretCountint
public int GetCaretCount();Number of user carets, at least 1. Excludes the temporary drag caret. Indices apply only to the current set and can change after merging/removal.
intNumber of user carets, at least 1. Excludes the temporary drag caret. Indices apply only to the current set and can change after merging/removal.
GetCaretDrawPosVector2
public Vector2 GetCaretDrawPos(int caretIndex = 0);Last computed local caret drawing position. Depends on the current frame/layout; use GetCaretLine/GetCaretColumn to retain a document position.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent index of one caret; 0 is the main caret.
Vector2Last computed local caret drawing position. Depends on the current frame/layout; use GetCaretLine/GetCaretColumn to retain a document position.
GetCaretIndexEditOrderint[] · Deprecated
public int[] GetCaretIndexEditOrder();Obsolete reverse index order. Current editing APIs adjust carets themselves; use GetSortedCarets when sorting is needed rather than relying on the old manual-edit order.
int[]Obsolete reverse index order. Current editing APIs adjust carets themselves; use GetSortedCarets when sorting is needed rather than relying on the old manual-edit order.
GetCaretLineint
public int GetCaretLine(int caretIndex = 0);Logical line of the specified caret’s active endpoint, not the anchor line or visual wrap index.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intLogical line of the specified caret’s active endpoint, not the anchor line or visual wrap index.
GetCaretTypeTextEdit.CaretTypeEnum
public TextEdit.CaretTypeEnum GetCaretType();Text-caret shape: Line or Block. Block changes drawing but does not enable character replacement: configure OvertypeMode separately. Does not change text or caret positions.
TextEdit.CaretTypeEnumText-caret shape: Line or Block. Block changes drawing but does not enable character replacement: configure OvertypeMode separately. Does not change text or caret positions.
GetCaretWrapIndexint
public int GetCaretWrapIndex(int caretIndex = 0);Visual segment of the current logical line containing the specified caret. Does not change the caret index or document line.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent index of one caret; 0 is the main caret.
intVisual segment of the current logical line containing the specified caret. Does not change the caret index or document line.
GetCustomWordSeparatorsstring
public string GetCustomWordSeparators();Additional word-separator characters for the editor’s text system. Assigning the string does not enable them; use UseCustomWordSeparators. Not a regex and does not change the fixed WholeWords boundary checks in Search.
stringAdditional word-separator characters for the editor’s text system. Assigning the string does not enable them; use UseCustomWordSeparators. Not a regex and does not change the fixed WholeWords boundary checks in Search.
GetDrawControlCharsbool
public bool GetDrawControlChars();Allows the text system to display control characters. Does not remove them from the document or sanitize/validate input text.
boolAllows the text system to display control characters. Does not remove them from the document or sanitize/validate input text.
GetFirstNonWhiteSpaceColumnint
public int GetFirstNonWhiteSpaceColumn(int line);Unicode code-point column of the first non-whitespace character. A tab occupies one column even when its visual indentation is wider. For an all-whitespace line, returns its length.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
intUnicode code-point column of the first non-whitespace character. A tab occupies one column even when its visual indentation is wider. For an all-whitespace line, returns its length.
GetFirstVisibleLineint
public int GetFirstVisibleLine();Logical line number at the top of the viewport. When scrolled into a long line, its first visual segment can already be above the viewport; does not return a wrapIndex.
intLogical line number at the top of the viewport. When scrolled into a long line, its first visual segment can already be above the viewport; does not return a wrapIndex.
GetGutterCountint
public int GetGutterCount();Number of gutter definitions, including hidden ones. Use this count to test for no gutters rather than comparing GetTotalGutterWidth with zero.
intNumber of gutter definitions, including hidden ones. Use this count to test for no gutters rather than comparing GetTotalGutterWidth with zero.
GetGutterNamestring
public string GetGutterName(int gutter);Stored gutter-definition name rather than a per-line label or guaranteed unique ID.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
stringStored gutter-definition name rather than a per-line label or guaranteed unique ID.
GetGutterTypeTextEdit.GutterType
public TextEdit.GutterType GetGutterType(int gutter);Gutter presentation mode, default String. Does not report whether individual line data is populated.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
TextEdit.GutterTypeGutter presentation mode, default String. Does not report whether individual line data is populated.
GetGutterWidthint
public int GetGutterWidth(int gutter);Stored width of one gutter, excluding shared padding. Hiding the gutter does not reset it.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
intStored width of one gutter, excluding shared padding. Hiding the gutter does not reset it.
GetHScrollint
public int GetHScroll();Horizontal offset in pixels. Clamped to the internal scrollbar range; wrapping can eliminate the available horizontal range. Not a text column number.
intHorizontal offset in pixels. Clamped to the internal scrollbar range; wrapping can eliminate the available horizontal range. Not a text column number.
GetHScrollBarHScrollBar
public HScrollBar GetHScrollBar();Internal HScrollBar owned by TextEdit. Do not free or reparent it separately; freeing the editor frees the scrollbar. Use ScrollHorizontal for ordinary scrolling.
HScrollBarInternal HScrollBar owned by TextEdit. Do not free or reparent it separately; freeing the editor frees the scrollbar. Use ScrollHorizontal for ordinary scrolling.
GetIndentLevelint
public int GetIndentLevel(int line);Leading indentation amount: tab count multiplied by GetTabSize plus leading spaces. Not the first-content column or a syntax-tree nesting level.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
intLeading indentation amount: tab count multiplied by GetTabSize plus leading spaces. Not the first-content column or a syntax-tree nesting level.
GetLanguagestring
public string GetLanguage();Text-shaping language hint, such as ar; an empty string uses the locale. Does not translate the document or switch application language. Changes shaping/glyph selection while retaining Text.
stringText-shaping language hint, such as ar; an empty string uses the locale. Does not translate the document or switch application language. Changes shaping/glyph selection while retaining Text.
GetLastFullVisibleLineint
public int GetLastFullVisibleLine();Logical line number of the bottom fully fitting visual row. Also read GetLastFullVisibleLineWrapIndex to distinguish segments of a wrapped line.
intLogical line number of the bottom fully fitting visual row. Also read GetLastFullVisibleLineWrapIndex to distinguish segments of a wrapped line.
GetLastFullVisibleLineWrapIndexint
public int GetLastFullVisibleLineWrapIndex();Index of the bottom fully fitting visual segment within GetLastFullVisibleLine. Not a standalone document line number.
intIndex of the bottom fully fitting visual segment within GetLastFullVisibleLine. Not a standalone document line number.
public int GetLastUnhiddenLine();Returns the last logical line index not hidden by a derived editor’s folding system. In ordinary TextEdit without hiding, this is GetLineCount() - 1. Does not mean the last line in the current scrolled viewport; use viewport methods for that. An empty document has line 0.
intReturns the last logical line index not hidden by a derived editor’s folding system. In ordinary TextEdit without hiding, this is GetLineCount() - 1. Does not mean the last line in the current scrolled viewport; use viewport methods for that. An empty document has line 0.
GetLinestring
public string GetLine(int line);Logical-line text without the \n separator. Indices start at 0. An invalid index returns an empty string, so check GetLineCount first when an error must be distinguished from an empty document line.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
stringLogical-line text without the \n separator. Indices start at 0. An invalid index returns an empty string, so check GetLineCount first when an error must be distinguished from an empty document line.
GetLineBackgroundColorColor
public Color GetLineBackgroundColor(int line);Stored additional logical-line background rather than the final color including theme and selection.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
ColorStored additional logical-line background rather than the final color including theme and selection.
GetLineColumnAtPos2 overloads
public Vector2I GetLineColumnAtPos(Vector2I position, bool allowOutOfBounds);Converts a TextEdit-local position to Vector2I: X is a Unicode code-point column and Y a logical line. clampLine/clampColumn control text-layout clamping; an unavailable position can return (-1, -1). Not a universal control hit-test: check the local control area first. The old overload’s allowOutOfBounds actually forwards as clampLine with clampColumn always true. Prefer the three-argument overload for clarity.
| Name | Type | Default |
|---|---|---|
position | Vector2I | — |
allowOutOfBounds | bool | — |
positionControl-local pixel position rather than screen coordinates.
allowOutOfBoundsHistorical name: actually clampLine; this overload always sets clampColumn true.
Vector2IConverts a TextEdit-local position to Vector2I: X is a Unicode code-point column and Y a logical line. clampLine/clampColumn control text-layout clamping; an unavailable position can return (-1, -1). Not a universal control hit-test: check the local control area first. The old overload’s allowOutOfBounds actually forwards as clampLine with clampColumn always true. Prefer the three-argument overload for clarity.
public Vector2I GetLineColumnAtPos(Vector2I position, bool clampLine = true, bool clampColumn = true);Converts a TextEdit-local position to Vector2I: X is a Unicode code-point column and Y a logical line. clampLine/clampColumn control text-layout clamping; an unavailable position can return (-1, -1). Not a universal control hit-test: check the local control area first. The old overload’s allowOutOfBounds actually forwards as clampLine with clampColumn always true. Prefer the three-argument overload for clarity.
| Name | Type | Default |
|---|---|---|
position | Vector2I | — |
clampLine | bool | true |
clampColumn | bool | true |
positionControl-local pixel position rather than screen coordinates.
clampLineClamp the result to text-layout lines.
clampColumnClamp the result to the line text width.
Vector2IConverts a TextEdit-local position to Vector2I: X is a Unicode code-point column and Y a logical line. clampLine/clampColumn control text-layout clamping; an unavailable position can return (-1, -1). Not a universal control hit-test: check the local control area first. The old overload’s allowOutOfBounds actually forwards as clampLine with clampColumn always true. Prefer the three-argument overload for clarity.
GetLineCountint
public int GetLineCount();Number of logical lines, including empty ones; an empty document has 1. Visual wrapping of a long line does not add logical lines.
intNumber of logical lines, including empty ones; an empty document has 1. Visual wrapping of a long line does not add logical lines.
GetLineGutterIconTexture2D
public Texture2D GetLineGutterIcon(int line, int gutter);Shared cell icon resource or null. Not a texture copy or proof that the gutter currently displays an icon.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
Texture2DShared cell icon resource or null. Not a texture copy or proof that the gutter currently displays an icon.
GetLineGutterItemColorColor
public Color GetLineGutterItemColor(int line, int gutter);Stored cell text/icon color rather than the line background or main document text color.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
ColorStored cell text/icon color rather than the line background or main document text color.
GetLineGutterMetadataVariant
public Variant GetLineGutterMetadata(int line, int gutter);Returns the stored Variant. Containers remain shared with the original value. Dispose the C# Variant wrapper after use; this does not delete the gutter or model record.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
VariantReturns the stored Variant. Containers remain shared with the original value. Dispose the C# Variant wrapper after use; this does not delete the gutter or model record.
GetLineGutterTextstring
public string GetLineGutterText(int line, int gutter);Stored gutter-cell label. Retained even with another GutterType or a hidden gutter.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
stringStored gutter-cell label. Retained even with another GutterType or a hidden gutter.
GetLineHeightint
public int GetLineHeight();Visual-row pixel height including theme spacing, at least 1. Need not equal the font size and is not a logical-line count.
intVisual-row pixel height including theme spacing, at least 1. Need not equal the font size and is not a logical-line count.
GetLineRangesFromCaretsReckfell.Collections.Array<Vector2I>
public Reckfell.Collections.Array<Vector2I> GetLineRangesFromCarets(bool onlySelections = false, bool mergeAdjacent = true);New Vector2I array of logical-line ranges: X is the first and Y the last included line. onlySelections excludes unselected carets; mergeAdjacent merges adjacent ranges. When a selection ends at column 0, that end line is excluded.
| Name | Type | Default |
|---|---|---|
onlySelections | bool | false |
mergeAdjacent | bool | true |
onlySelectionsInclude only carets with active selections.
mergeAdjacentMerge adjacent logical-line ranges.
Reckfell.Collections.Array<Vector2I>New Vector2I array of logical-line ranges: X is the first and Y the last included line. onlySelections excludes unselected carets; mergeAdjacent merges adjacent ranges. When a selection ends at column 0, that end line is excluded.
GetLineWidthint
public int GetLineWidth(int line, int wrapIndex = -1);Shaped-text width in pixels. wrapIndex -1 requests the line buffer size; otherwise measures a particular visual segment. With wrapping enabled, not the width of a hypothetical unwrapped full line.
| Name | Type | Default |
|---|---|---|
line | int | — |
wrapIndex | int | -1 |
lineLogical-line index from 0 through GetLineCount() - 1.
wrapIndexVisual segment index; GetLineWidth uses -1 for the line buffer.
intShaped-text width in pixels. wrapIndex -1 requests the line buffer size; otherwise measures a particular visual segment. With wrapping enabled, not the width of a hypothetical unwrapped full line.
GetLineWithImestring
public string GetLineWithIme(int line);Presentation line including temporary IME composition when it affects that line. Matches GetLine without composition. Save through Text/GetLine to avoid recording unfinished input as committed text.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
stringPresentation line including temporary IME composition when it affects that line. Matches GetLine without composition. Save through Text/GetLine to avoid recording unfinished input as committed text.
GetLineWrapCountint
public int GetLineWrapCount(int line);Number of additional visual wraps in the line. Zero means one segment; total segments equal Count + 1. Not the document GetLineCount.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
intNumber of additional visual wraps in the line. Zero means one segment; total segments equal Count + 1. Not the document GetLineCount.
GetLineWrapIndexAtColumnint
public int GetLineWrapIndexAtColumn(int line, int column);Index of the visual segment containing a logical-line column. Columns count Unicode code points; the line end is valid too. Returns 0 without wrapping; not a document line number.
| Name | Type | Default |
|---|---|---|
line | int | — |
column | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
columnUnicode code-point column, including a valid line-end position.
intIndex of the visual segment containing a logical-line column. Columns count Unicode code points; the line end is valid too. Returns 0 without wrapping; not a document line number.
GetLineWrappedTextstring[]
public string[] GetLineWrappedText(int line);New array of visual segments of one logical line; without wrapping contains one element. Can include temporary IME text. Read Text to save a document. Editing the array does not modify the editor.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
string[]New array of visual segments of one logical line; without wrapping contains one element. Can include temporary IME text. Read Text to save a document. Editing the array does not modify the editor.
GetLineWrappingModeTextEdit.LineWrappingMode
public TextEdit.LineWrappingMode GetLineWrappingMode();None disables visual wrapping; Boundary constrains lines to available control width. AutowrapMode chooses break points. Does not insert line separators or change GetLineCount; gutters, scrollbar, theme and minimap also affect available width.
TextEdit.LineWrappingModeNone disables visual wrapping; Boundary constrains lines to available control width. AutowrapMode chooses break points. Does not insert line separators or change GetLineCount; gutters, scrollbar, theme and minimap also affect available width.
GetLocalMousePosVector2
public Vector2 GetLocalMousePos();Returns the mouse position in TextEdit coordinates, mirroring X as Width - X for RTL layout. This is neither a global screen position nor text line/column coordinates. Differs from ordinary GetLocalMousePosition in RTL.
Vector2Returns the mouse position in TextEdit coordinates, mirroring X as Width - X for RTL layout. This is neither a global screen position nor text line/column coordinates. Differs from ordinary GetLocalMousePosition in RTL.
GetMenuPopupMenu
public PopupMenu GetMenu();Returns the built-in PopupMenu, creating it on first access without opening it. Repeated calls return the same object. TextEdit owns and frees the menu: do not Free or Dispose this borrowed object. MenuItems defines built-in command IDs; use distinct IDs for application items.
PopupMenuReturns the built-in PopupMenu, creating it on first access without opening it. Repeated calls return the same object. TextEdit owns and frees the menu: do not Free or Dispose this borrowed object. MenuItems defines built-in command IDs; use distinct IDs for application items.
GetMinimapLineAtPosint
public int GetMinimapLineAtPos(Vector2I position);Computes a minimap logical line from a control-local vertical position, accounting for scrolling, wrapping and hiding. Clamps the result to document line bounds. Does not test X or return -1 merely because the point is outside the minimap: check its rectangle first.
| Name | Type | Default |
|---|---|---|
position | Vector2I | — |
positionControl-local pixel position; minimap lookup uses Y without checking X.
intComputes a minimap logical line from a control-local vertical position, accounting for scrolling, wrapping and hiding. Clamps the result to document line bounds. Does not test X or return -1 merely because the point is outside the minimap: check its rectangle first.
GetMinimapVisibleLinesint
public int GetMinimapVisibleLines();Returns the minimap’s vertical row capacity: available height divided by minimap row height plus spacing. This is neither the document line count nor the number of rows actually containing text. Use GetLineCount for logical lines.
intReturns the minimap’s vertical row capacity: available height divided by minimap row height plus spacing. This is neither the document line count nor the number of rows actually containing text. Use GetLineCount for logical lines.
GetMinimapWidthint
public int GetMinimapWidth();Minimap area width in control pixels. Use a nonnegative value that leaves room for the main text. This is not a minimap font scale. Changing it recalculates available wrap width; use MinimapDraw false to disable the minimap.
intMinimap area width in control pixels. Use a nonnegative value that leaves room for the main text. This is not a minimap font scale. Changing it recalculates available wrap width; use MinimapDraw false to disable the minimap.
GetNextCompositeCharacterColumnint
public int GetNextCompositeCharacterColumn(int line, int column);Next composite-character boundary from TextServer-shaped text. Input and result are Unicode code-point columns rather than UTF-16 indices. At line end, returns the same end column. One visible composite character can span more than one column.
| Name | Type | Default |
|---|---|---|
line | int | — |
column | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
columnUnicode code-point column rather than a UTF-16 index.
intNext composite-character boundary from TextServer-shaped text. Input and result are Unicode code-point columns rather than UTF-16 indices. At line end, returns the same end column. One visible composite character can span more than one column.
GetNextVisibleLineIndexOffsetFromVector2I
public Vector2I GetNextVisibleLineIndexOffsetFrom(int line, int wrapIndex, int visibleAmount);Traverses visible rows including wrapping and hidden lines. Vector2I.X is the count of traversed logical lines including the starting line, not an absolute index; Y is the destination wrap-part index. The sign of visibleAmount selects direction. For nonzero traversal, compute the destination as line + X - 1 downward or line - X + 1 upward and validate bounds. For example, reaching the second display row within the same logical line returns (1, 1). visibleAmount 0 returns (0, 0).
| Name | Type | Default |
|---|---|---|
line | int | — |
wrapIndex | int | — |
visibleAmount | int | — |
lineExisting starting logical line, indexed from zero.
wrapIndexStarting line wrap-part index from 0 through GetLineWrapCount(line).
visibleAmountVisible-row count including the start; positive downward, negative upward. Use a nonzero value when computing a destination.
Vector2ITraverses visible rows including wrapping and hidden lines. Vector2I.X is the count of traversed logical lines including the starting line, not an absolute index; Y is the destination wrap-part index. The sign of visibleAmount selects direction. For nonzero traversal, compute the destination as line + X - 1 downward or line - X + 1 upward and validate bounds. For example, reaching the second display row within the same logical line returns (1, 1). visibleAmount 0 returns (0, 0).
GetNextVisibleLineOffsetFromint
public int GetNextVisibleLineOffsetFrom(int line, int visibleAmount);Counts traversed logical lines while visiting visible lines, including the starting line; hidden lines count toward the result but not as visible lines. The sign of visibleAmount selects direction; the result is nonnegative. This is a count, not a destination index or pixel distance. Without hiding it returns Abs(visibleAmount), even beyond document bounds: validate the computed index. For a nonempty traversal, the destination is line + result - 1 downward or line - result + 1 upward.
| Name | Type | Default |
|---|---|---|
line | int | — |
visibleAmount | int | — |
lineExisting starting logical line, indexed from zero.
visibleAmountVisible-row count including the start; positive downward, negative upward. Use a nonzero value when computing a destination.
intCounts traversed logical lines while visiting visible lines, including the starting line; hidden lines count toward the result but not as visible lines. The sign of visibleAmount selects direction; the result is nonnegative. This is a count, not a destination index or pixel distance. Without hiding it returns Abs(visibleAmount), even beyond document bounds: validate the computed index. For a nonempty traversal, the destination is line + result - 1 downward or line - result + 1 upward.
GetPlaceholderstring
public string GetPlaceholder();Empty-editor hint, separate from Text. GetPlaceholder returns the source string; presentation uses UI translation. Not part of document saving, searching or content history.
stringEmpty-editor hint, separate from Text. GetPlaceholder returns the source string; presentation uses UI translation. Not part of document saving, searching or content history.
GetPosAtLineColumnVector2I
public Vector2I GetPosAtLineColumn(int line, int column);Local character reference point: GetRectAtLineColumn position plus (0, GetLineHeight()). A bottom point rather than the rectangle’s top-left corner. Depends on the drawing cache and returns (-1, -1) when unavailable.
| Name | Type | Default |
|---|---|---|
line | int | — |
column | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
columnUnicode code-point column, including a valid line-end position.
Vector2ILocal character reference point: GetRectAtLineColumn position plus (0, GetLineHeight()). A bottom point rather than the rectangle’s top-left corner. Depends on the drawing cache and returns (-1, -1) when unavailable.
GetPreviousCompositeCharacterColumnint
public int GetPreviousCompositeCharacterColumn(int line, int column);Previous composite-character boundary in Unicode code-point columns. Returns 0 at line start. Do not always subtract 1 for user deletion: combining marks can form one composite character.
| Name | Type | Default |
|---|---|---|
line | int | — |
column | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
columnUnicode code-point column rather than a UTF-16 index.
intPrevious composite-character boundary in Unicode code-point columns. Returns 0 at line start. Do not always subtract 1 for user deletion: combining marks can form one composite character.
GetRectAtLineColumnRect2I
public Rect2I GetRectAtLineColumn(int line, int column);Character/grapheme rectangle in TextEdit-local coordinates from the latest drawing cache. An unavailable/undrawn position returns (-1, -1, 0, 0); an empty document is a special case with an empty Rect2I at the origin. Query after layout/drawing rather than retaining permanent document coordinates.
| Name | Type | Default |
|---|---|---|
line | int | — |
column | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
columnUnicode code-point column, including a valid line-end position.
Rect2ICharacter/grapheme rectangle in TextEdit-local coordinates from the latest drawing cache. An unavailable/undrawn position returns (-1, -1, 0, 0); an empty document is a special case with an empty Rect2I at the origin. Query after layout/drawing rather than retaining permanent document coordinates.
GetSavedVersionuint
public uint GetSavedVersion();Last TagSavedVersion marker; ClearUndoHistory resets it. Does not prove that a disk file exists or is current.
uintLast TagSavedVersion marker; ClearUndoHistory resets it. Does not prove that a disk file exists or is current.
GetScrollPosForLinedouble
public double GetScrollPosForLine(int line, int wrapIndex = 0);Vertical position of a logical line and its wrapIndex in visual-row units. Without wrapping/hiding, equals the logical line number. Can be passed to SetVScroll, which can clamp it to the available range.
| Name | Type | Default |
|---|---|---|
line | int | — |
wrapIndex | int | 0 |
lineLogical-line index from 0 through GetLineCount() - 1.
wrapIndexVisual segment index; GetLineWidth uses -1 for the line buffer.
doubleVertical position of a logical line and its wrapIndex in visual-row units. Without wrapping/hiding, equals the logical line number. Can be passed to SetVScroll, which can clamp it to the available range.
GetSelectedTextstring
public string GetSelectedText(int caretIndex = -1);Selection text without modifying the document. With caretIndex -1, joins nonempty selections in document order with a newline; this is not one original contiguous range. Read each caret explicitly to retain separate fragments. Returns an empty string without selection.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
stringSelection text without modifying the document. With caretIndex -1, joins nonempty selections in document order with a newline; this is not one original contiguous range. Read each caret explicitly to retain separate fragments. Returns an empty string without selection.
GetSelectionAtLineColumnint
public int GetSelectionAtLineColumn(int line, int column, bool includeEdges = true, bool onlySelections = true);Index of the first caret/selection containing the position, or -1. includeEdges controls boundary inclusion; onlySelections excludes unselected carets. With overlaps, returns the first matching index rather than all matches.
| Name | Type | Default |
|---|---|---|
line | int | — |
column | int | — |
includeEdges | bool | true |
onlySelections | bool | true |
lineZero-based logical line.
columnColumn in Unicode code points rather than a UTF-16 index.
includeEdgesInclude the tested range boundaries.
onlySelectionsInclude only carets with active selections.
intIndex of the first caret/selection containing the position, or -1. includeEdges controls boundary inclusion; onlySelections excludes unselected carets. With overlaps, returns the first matching index rather than all matches.
GetSelectionColumnint · Deprecated
public int GetSelectionColumn(int caretIndex = 0);Obsolete alias for GetSelectionOriginColumn. Explicitly choose the Origin anchor or normalized From start in new code.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intObsolete alias for GetSelectionOriginColumn. Explicitly choose the Origin anchor or normalized From start in new code.
GetSelectionFromColumnint
public int GetSelectionFromColumn(int caretIndex = 0);Normalized start column paired with GetSelectionFromLine. Without selection, the caret column. Counts Unicode code points rather than UTF-16 indices.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intNormalized start column paired with GetSelectionFromLine. Without selection, the caret column. Counts Unicode code points rather than UTF-16 indices.
GetSelectionFromLineint
public int GetSelectionFromLine(int caretIndex = 0);Earlier boundary of the active selection in document order. Without selection, returns the caret line. Not always the anchor line.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intEarlier boundary of the active selection in document order. Without selection, returns the caret line. Not always the anchor line.
GetSelectionLineint · Deprecated
public int GetSelectionLine(int caretIndex = 0);Obsolete alias for GetSelectionOriginLine rather than the normalized start. Use Origin or GetSelectionFromLine as appropriate in new code.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intObsolete alias for GetSelectionOriginLine rather than the normalized start. Use Origin or GetSelectionFromLine as appropriate in new code.
GetSelectionModeTextEdit.SelectionMode
public TextEdit.SelectionMode GetSelectionMode();Returns the selection-processing mode, such as Pointer or Word. This does not test whether text is selected: use HasSelection. None mode does not by itself mean there is no selection.
TextEdit.SelectionModeReturns the selection-processing mode, such as Pointer or Word. This does not test whether text is selected: use HasSelection. None mode does not by itself mean there is no selection.
GetSelectionOriginColumnint
public int GetSelectionOriginColumn(int caretIndex = 0);Anchor column in Unicode code points. Can follow the active caret in a backward selection; use GetSelectionFromColumn for the normalized start.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intAnchor column in Unicode code points. Can follow the active caret in a backward selection; use GetSelectionFromColumn for the normalized start.
GetSelectionOriginLineint
public int GetSelectionOriginLine(int caretIndex = 0);Selection-anchor line for the specified caret. This is the original gesture endpoint rather than necessarily the lower line number. Check HasSelection before treating it as an active selection boundary.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intSelection-anchor line for the specified caret. This is the original gesture endpoint rather than necessarily the lower line number. Check HasSelection before treating it as an active selection boundary.
GetSelectionToColumnint
public int GetSelectionToColumn(int caretIndex = 0);Exclusive end column paired with GetSelectionToLine. Without selection, the caret column. Not the selection length when multiple lines are involved.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intExclusive end column paired with GetSelectionToLine. Without selection, the caret column. Not the selection length when multiple lines are involved.
GetSelectionToLineint
public int GetSelectionToLine(int caretIndex = 0);Later boundary of the active selection in document order. Without selection, returns the caret line. The final text position is exclusive.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
intLater boundary of the active selection in document order. Without selection, returns the caret line. The final text position is exclusive.
GetSortedCaretsint[]
public int[] GetSortedCarets(bool includeIgnoredCarets = false);New index array ordered top-to-bottom by normalized selection start or caret position. Does not change actual indices or creation order. By default excludes temporarily ignored carets during a multicaret edit. Do not retain the array after the caret set changes.
| Name | Type | Default |
|---|---|---|
includeIgnoredCarets | bool | false |
includeIgnoredCaretsInclude temporarily ignored multicaret-edit indices.
int[]New index array ordered top-to-bottom by normalized selection start or caret position. Does not change actual indices or creation order. By default excludes temporarily ignored carets during a multicaret edit. Do not retain the array after the caret set changes.
GetStructuredTextBidiOverrideTextServer.StructuredTextParser
public TextServer.StructuredTextParser GetStructuredTextBidiOverride();Structured-text parser for mixed LTR/RTL: URI, path, email, list and other supported modes. Controls separator presentation rather than converting document encoding. Configure parser options separately.
TextServer.StructuredTextParserStructured-text parser for mixed LTR/RTL: URI, path, email, list and other supported modes. Controls separator presentation rather than converting document encoding. Configure parser options separately.
GetStructuredTextBidiOverrideOptionsReckfell.Collections.Array
public Reckfell.Collections.Array GetStructuredTextBidiOverrideOptions();Shared Array of BiDi parser options. The setter compares contents and skips equal values; merely assigning Duplicate with old contents does not detach the previous array. In-place mutation does not trigger text recalculation. Supply a separately prepared array and a new array with changed contents when updating.
Reckfell.Collections.ArrayShared Array of BiDi parser options. The setter compares contents and skips equal values; merely assigning Duplicate with old contents does not detach the previous array. In-place mutation does not trigger text recalculation. Supply a separately prepared array and a new array with changed contents when updating.
GetSyntaxHighlighterSyntaxHighlighter
public SyntaxHighlighter GetSyntaxHighlighter();This editor’s highlighting resource; null disables highlighting. Use one instance per TextEdit because the resource stores only one context. Reassigning the same resource is skipped and does not replace ClearHighlightingCache/EmitChanged.
SyntaxHighlighterThis editor’s highlighting resource; null disables highlighting. Use one instance per TextEdit because the resource stores only one context. Reassigning the same resource is skipped and does not replace ClearHighlightingCache/EmitChanged.
GetTabInputModebool
public bool GetTabInputMode();Controls editor handling of the Tab key. Does not convert existing tab characters, set their width or automatically translate indentation to spaces.
boolControls editor handling of the Tab key. Does not convert existing tab characters, set their width or automatically translate indentation to spaces.
GetTabSizeint
public int GetTabSize();Stored tab width for layout rather than the number of tab characters in the document.
intStored tab width for layout rather than the number of tab characters in the document.
GetTextstring
public string GetText();Full text with \n line separators. Assignment replaces the document, emits TextSet without TextChanged and allows Undo with history enabled. For a newly loaded document, explicitly clear history and mark the saved version afterward.
stringFull text with \n line separators. Assignment replaces the document, emits TextSet without TextChanged and allows Undo with history enabled. For a newly loaded document, explicitly clear history and mark the saved version afterward.
GetTextDirectionControl.TextDirection
public Control.TextDirection GetTextDirection();Base text direction: Inherited follows Control layout, Auto derives it from text, and Ltr/Rtl set it explicitly. Does not translate or reverse stored Text. Document character order remains logical.
Control.TextDirectionBase text direction: Inherited follows Control layout, Auto derives it from text, and Ltr/Rtl set it explicitly. Does not translate or reverse stored Text. Document character order remains logical.
GetTotalGutterWidthint
public int GetTotalGutterWidth();Sum of drawn gutter widths plus internal padding. Current implementation limitation: hiding or removing all previously drawn gutters can leave 2 pixels of padding. Use GetGutterCount to test whether definitions exist; this is not one gutter’s width.
intSum of drawn gutter widths plus internal padding. Current implementation limitation: hiding or removing all previously drawn gutters can leave 2 pixels of padding. Use GetGutterCount to test whether definitions exist; this is not one gutter’s width.
GetTotalVisibleLineCountint
public int GetTotalVisibleLineCount();Total document visual-row count: logical lines plus wraps, excluding hidden lines when hiding is supported. Not limited to the current scrolled viewport.
intTotal document visual-row count: logical lines plus wraps, excluding hidden lines when hiding is supported. Not limited to the current scrolled viewport.
GetVScrolldouble
public double GetVScroll();Vertical offset in visual-row units, allowing a fractional part. Not pixels or always a logical line number: use GetScrollPosForLine with wrapping. The getter returns the actual clamped value.
doubleVertical offset in visual-row units, allowing a fractional part. Not pixels or always a logical line number: use GetScrollPosForLine with wrapping. The getter returns the actual clamped value.
GetVScrollBarVScrollBar
public VScrollBar GetVScrollBar();Internal VScrollBar owned by TextEdit. Do not free or reparent it separately; freeing the editor frees the scrollbar. Values are visual rows rather than pixels.
VScrollBarInternal VScrollBar owned by TextEdit. Do not free or reparent it separately; freeing the editor frees the scrollbar. Values are visual rows rather than pixels.
GetVScrollSpeedfloat
public float GetVScrollSpeed();Smooth vertical scrolling speed, at least 1. Does not set the current offset or represent line height or a horizontal step size.
floatSmooth vertical scrolling speed, at least 1. Does not set the current offset or represent line height or a horizontal step size.
GetVersionuint
public uint GetVersion();Identifier of the current editing-history state rather than an engine version or text hash. Undo can restore an earlier value. Compare with GetSavedVersion within the current document and history.
uintIdentifier of the current editing-history state rather than an engine version or text hash. Undo can restore an earlier value. Compare with GetSavedVersion within the current document and history.
GetVirtualKeyboardShowOnFocusbool
public bool GetVirtualKeyboardShowOnFocus();Allows requesting the on-screen keyboard on focus. Requires VirtualKeyboardEnabled, Editable and platform support. false disables focus-triggered opening rather than every other keyboard-opening path.
boolAllows requesting the on-screen keyboard on focus. Requires VirtualKeyboardEnabled, Editable and platform support. false disables focus-triggered opening rather than every other keyboard-opening path.
GetVisibleLineCountint
public int GetVisibleLineCount();Number of whole visual rows that fit in the control height. View capacity rather than the number of document lines currently drawn.
intNumber of whole visual rows that fit in the control height. View capacity rather than the number of document lines currently drawn.
GetVisibleLineCountInRangeint
public int GetVisibleLineCountInRange(int fromLine, int toLine);Visual-row count in a logical-line range with both endpoints included. Accounts for wrapping/hiding and normalizes reversed arguments. Does not count only the rows currently visible on screen.
| Name | Type | Default |
|---|---|---|
fromLine | int | — |
toLine | int | — |
fromLineIncluded logical-line range boundary.
toLineIncluded range boundary; reversed order is allowed.
intVisual-row count in a logical-line range with both endpoints included. Accounts for wrapping/hiding and normalizes reversed arguments. Does not count only the rows currently visible on screen.
GetWordAtPosstring
public string GetWordAtPos(Vector2 position);Returns the text-system word at a control-local position, accounting for scrolling and wrapping. Does not move the caret or create a selection. Returns an empty string when no word/text is hit. Supply control coordinates rather than screen coordinates; word rules are not a C# parser.
| Name | Type | Default |
|---|---|---|
position | Vector2 | — |
positionControl-local pixel position; minimap lookup uses Y without checking X.
stringReturns the text-system word at a control-local position, accounting for scrolling and wrapping. Does not move the caret or create a selection. Returns an empty string when no word/text is hit. Supply control coordinates rather than screen coordinates; word rules are not a C# parser.
GetWordUnderCaretstring
public string GetWordUnderCaret(int caretIndex = -1);Returns the TextServer-bounded word near a caret. caretIndex -1 can join words from multiple carets with newlines in index order rather than document order. Supply an explicit index for one word. Not a Search operation or C# compiler identifier analysis.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexCaret index; -1 processes all carets.
stringReturns the TextServer-bounded word near a caret. caretIndex -1 can join words from multiple carets with newlines in index order rather than document order. Supply an explicit index for one word. Not a Search operation or C# compiler identifier analysis.
HasImeTextbool
public bool HasImeText();Whether temporary IME composition text exists. Not a test for Editable, a connected keyboard or unsaved document changes.
boolWhether temporary IME composition text exists. Not a test for Editable, a connected keyboard or unsaved document changes.
HasRedobool
public bool HasRedo();Whether an undone operation is available for redo. Executing Redo additionally requires Editable true.
boolWhether an undone operation is available for redo. Executing Redo additionally requires Editable true.
HasSelectionbool
public bool HasSelection(int caretIndex = -1);Whether a caret has an active selection. Default caretIndex -1 checks any caret, while 0 checks only the main caret. Does not mean document text changed.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
boolWhether a caret has an active selection. Default caretIndex -1 checks any caret, while 0 checks only the main caret. Does not mean document text changed.
HasUndobool
public bool HasUndo();Whether an undo operation exists, including a pending current record. Does not grant permission to Undo: Editable must be true.
boolWhether an undo operation exists, including a pending current record. Does not grant permission to Undo: Editable must be true.
InsertLineAtvoid
public void InsertLineAt(int line, string text);Inserts text and a line separator before an existing logical line. line must be less than GetLineCount; Count is not an append command. Inserted text can contain additional line separators. One Undo reverses the operation.
| Name | Type | Default |
|---|---|---|
line | int | — |
text | string | — |
lineExisting logical-line index from 0 through GetLineCount() - 1.
textText to insert; line separators create additional logical lines.
InsertTextvoid
public void InsertText(string text, int line, int column, bool beforeSelectionBegin = true, bool beforeSelectionEnd = false);Inserts text at the supplied position without deleting an existing selection. Adjusts carets and selection bounds; beforeSelectionBegin/End control insertion exactly at a boundary. Undoable and works with Editable false. Use InsertTextAtCaret to replace selection.
| Name | Type | Default |
|---|---|---|
text | string | — |
line | int | — |
column | int | — |
beforeSelectionBegin | bool | true |
beforeSelectionEnd | bool | false |
textText to insert; line separators create additional logical lines.
lineExisting logical-line index from 0 through GetLineCount() - 1.
columnInsertion column in Unicode code points from 0 through line length.
beforeSelectionBeginAt the selection start, true shifts the start past inserted text, excluding it; false retains the start before inserted text.
beforeSelectionEndAt the selection end, true shifts the end past inserted text, including it; false retains the end before inserted text.
InsertTextAtCaretvoid
public void InsertTextAtCaret(string text, int caretIndex = -1);Inserts text, replaces the target caret’s selection and moves it to the insertion end. caretIndex -1 processes all eligible carets; 0 targets the main caret. Programmatic calls also work with Editable false. Supply an explicit index when only one insertion is intended in a multicaret editor.
| Name | Type | Default |
|---|---|---|
text | string | — |
caretIndex | int | -1 |
textText to insert or assign; \n creates logical lines.
caretIndex0 targets the main caret; -1 targets all eligible carets; any other index must exist.
IsBackspaceDeletesCompositeCharacterEnabledbool
public bool IsBackspaceDeletesCompositeCharacterEnabled();With true, normal Backspace deletes to the previous composite-character boundary; false deletes one code point. CaretMidGrapheme true takes priority and also selects one-code-point deletion. Does not control RemoveText with an explicit range.
boolWith true, normal Backspace deletes to the previous composite-character boundary; false deletes one code point. CaretMidGrapheme true takes priority and also selects one-code-point deletion. Does not control RemoveText with an explicit range.
IsCaretAfterSelectionOriginbool
public bool IsCaretAfterSelectionOrigin(int caretIndex = 0);Whether the active caret follows its anchor in document order. Use to retain selection direction; does not test whether a selection exists.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
boolWhether the active caret follows its anchor in document order. Use to retain selection direction; does not test whether a selection exists.
IsCaretBlinkEnabledbool
public bool IsCaretBlinkEnabled();Enables text-caret blinking. The timer runs while focused; false disables blinking rather than hiding the caret. Visibility still depends on focus and other drawing conditions. Configure timing with CaretBlinkInterval.
boolCurrent CaretBlink setting; does not prove the effect is visible in this frame.
IsCaretMidGraphemeEnabledbool
public bool IsCaretMidGraphemeEnabled();Allows caret/deletion behavior inside composite characters. With true, Backspace deletes one code point even if BackspaceDeletesCompositeCharacterEnabled is enabled. Does not mean operating on halves of a UTF-16 surrogate pair.
boolAllows caret/deletion behavior inside composite characters. With true, Backspace deletes one code point even if BackspaceDeletesCompositeCharacterEnabled is enabled. Does not mean operating on halves of a UTF-16 surrogate pair.
IsCaretVisiblebool
public bool IsCaretVisible(int caretIndex = 0);Cached caret visibility from drawing. Not equivalent to caret existence, Editable or visibility of the whole logical line. Can be stale before current drawing.
| Name | Type | Default |
|---|---|---|
caretIndex | int | 0 |
caretIndexCurrent index of one caret; 0 is the main caret.
boolCached caret visibility from drawing. Not equivalent to caret existence, Editable or visibility of the whole logical line. Can be stale before current drawing.
IsContextMenuEnabledbool
public bool IsContextMenuEnabled();Allows the user to open the built-in context menu. false neither deletes the PopupMenu nor prevents programmatic GetMenu or MenuOption calls. This is an interface setting, not an editing restriction; use Editable to control input.
boolAllows the user to open the built-in context menu. false neither deletes the PopupMenu nor prevents programmatic GetMenu or MenuOption calls. This is an interface setting, not an editing restriction; use Editable to control input.
IsCustomWordSeparatorsEnabledbool
public bool IsCustomWordSeparatorsEnabled();Enables CustomWordSeparators for word-boundary processing. Independent of UseDefaultWordSeparators; both sets can be used together. Does not switch Search into WholeWords mode.
boolEnables CustomWordSeparators for word-boundary processing. Independent of UseDefaultWordSeparators; both sets can be used together. Does not switch Search into WholeWords mode.
IsDefaultWordSeparatorsEnabledbool
public bool IsDefaultWordSeparatorsEnabled();Enables the text system’s default word separators. Disabling does not enable custom separators automatically; configure UseCustomWordSeparators separately. Does not change Search WholeWords boundary checks.
boolEnables the text system’s default word separators. Disabling does not enable custom separators automatically; configure UseCustomWordSeparators separately. Does not change Search WholeWords boundary checks.
IsDeselectOnFocusLossEnabledbool
public bool IsDeselectOnFocusLossEnabled();Controls deselection on focus loss. false retains selection when another control receives focus. Switching false to true while this editor is unfocused immediately clears an existing selection. Does not edit text or transfer focus.
boolControls deselection on focus loss. false retains selection when another control receives focus. Switching false to true while this editor is unfocused immediately clears an existing selection. Does not edit text or transfer focus.
IsDragAndDropSelectionEnabledbool
public bool IsDragAndDropSelectionEnabled();Allows the user to drag selected text through TextEdit’s drag-and-drop handling. Does not create a selection, perform a transfer on assignment or automatically enable file/project-object drops. Selection separately requires SelectingEnabled.
boolCurrent DragAndDropSelectionEnabled setting; does not prove the effect is visible in this frame.
IsDraggingCursorbool
public bool IsDraggingCursor();true during TextEdit’s internal selection or minimap dragging. This is control interaction state, not a global mouse-button test or detection of an arbitrary drag-and-drop operation.
booltrue during TextEdit’s internal selection or minimap dragging. This is control interaction state, not a global mouse-button test or detection of an arbitrary drag-and-drop operation.
IsDrawingCaretWhenEditableDisabledbool
public bool IsDrawingCaretWhenEditableDisabled();Allows caret drawing with Editable false, subject to the remaining visibility conditions. Does not allow input or make the control editable. Leave false for ordinary text viewing without a caret.
boolCurrent CaretDrawWhenEditableDisabled setting; does not prove the effect is visible in this frame.
IsDrawingMinimapbool
public bool IsDrawingMinimap();Shows the document minimap. It takes part of TextEdit’s width, so enabling it can change the number of display rows when wrapping is enabled. Source Text and logical line count remain unchanged. Set its width with MinimapWidth.
boolCurrent MinimapDraw setting; does not prove the effect is visible in this frame.
IsDrawingSpacesbool
public bool IsDrawingSpaces();Shows space markers without changing Text or selection rules. Presentation rather than adding characters to a file.
boolShows space markers without changing Text or selection rules. Presentation rather than adding characters to a file.
IsDrawingTabsbool
public bool IsDrawingTabs();Shows visual tab markers while retaining document text. Does not enable Tab input or convert tabs into spaces.
boolShows visual tab markers while retaining document text. Does not enable Tab input or convert tabs into spaces.
IsEditablebool
public bool IsEditable();Allows user editing; default true. false also blocks Undo/Redo actions, but not programmatic Text, SetLine, InsertTextAtCaret or RemoveText. This is a UI mode rather than model-data protection.
boolAllows user editing; default true. false also blocks Undo/Redo actions, but not programmatic Text, SetLine, InsertTextAtCaret or RemoveText. This is a UI mode rather than model-data protection.
IsEmojiMenuEnabledbool
public bool IsEmojiMenuEnabled();Allows the context-menu emoji command when the platform supports a system picker. false disables the corresponding item rather than necessarily removing it. Editable is also required. Does not add an emoji font or guarantee a system picker on every platform.
boolAllows the context-menu emoji command when the platform supports a system picker. false disables the corresponding item rather than necessarily removing it. Editable is also required. Does not add an emoji font or guarantee a system picker on every platform.
IsEmptySelectionClipboardEnabledbool
public bool IsEmptySelectionClipboardEnabled();Allows default Copy and Cut to operate on full lines when no text is selected. Defaults to true. Does not mean copying an empty string: it copies the entire caret line, which Cut may remove. Does not affect selected-text handling; assigning the property does not access the clipboard.
boolThe corresponding setting, not the presence of clipboard data or platform support.
IsFitContentHeightEnabledbool
public bool IsFitContentHeightEnabled();Returns ScrollFitContentHeight rather than whether all text is visible without scrolling. Final size depends on the parent layout.
boolReturns ScrollFitContentHeight rather than whether all text is visible without scrolling. Final size depends on the parent layout.
IsFitContentWidthEnabledbool
public bool IsFitContentWidthEnabled();Returns ScrollFitContentWidth rather than testing the absence of horizontal scrolling. Final size depends on parent layout and wrapping.
boolReturns ScrollFitContentWidth rather than testing the absence of horizontal scrolling. Final size depends on parent layout and wrapping.
IsGutterClickablebool
public bool IsGutterClickable(int gutter);The gutter’s own global flag rather than its effective OR with per-line IsLineGutterClickable or permission to execute a command.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
boolThe gutter’s own global flag rather than its effective OR with per-line IsLineGutterClickable or permission to execute a command.
IsGutterDrawnbool
public bool IsGutterDrawn(int gutter);Whether drawing is enabled for the gutter definition. Does not test whether a particular line is inside the editor viewport.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
boolWhether drawing is enabled for the gutter definition. Does not test whether a particular line is inside the editor viewport.
IsGutterOverwritablebool
public bool IsGutterOverwritable(int gutter);Whether the gutter participates in MergeGutters. Not a user text-editing flag.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
boolWhether the gutter participates in MergeGutters. Not a user text-editing flag.
IsHighlightAllOccurrencesEnabledbool
public bool IsHighlightAllOccurrencesEnabled();Highlights case-sensitive whole-word matches of caret 0’s selected text. Empty or whitespace-only selections are ignored. Creates no additional selections and does not set SetSearchText. Differs from AddSelectionForNextOccurrence, which allows substring matches.
boolCurrent HighlightAllOccurrences setting; does not prove the effect is visible in this frame.
IsHighlightCurrentLineEnabledbool
public bool IsHighlightCurrentLineEnabled();Highlights the background of current caret lines using the theme color. This is visual highlighting rather than text selection: HasSelection and GetSelectedText are unchanged. Use Select for an explicit range.
boolCurrent HighlightCurrentLine setting; does not prove the effect is visible in this frame.
IsInMulitcaretEditbool
public bool IsInMulitcaretEdit();Whether a BeginMulticaretEdit scope is active. Mulitcaret is the spelling in the current C# API; use the exact name. Does not mean that more than one caret exists.
boolWhether a BeginMulticaretEdit scope is active. Mulitcaret is the spelling in the current C# API; use the exact name. Does not mean that more than one caret exists.
IsIndentWrappedLinesbool
public bool IsIndentWrappedLines();Adds visual indentation to wrapped continuations. Does not insert spaces/tabs or change text or logical line numbers.
boolAdds visual indentation to wrapped continuations. Does not insert spaces/tabs or change text or logical line numbers.
IsLineGutterClickablebool
public bool IsLineGutterClickable(int line, int gutter);This cell’s own flag. Does not include global IsGutterClickable, so false does not guarantee an ordinary hover cursor.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
boolThis cell’s own flag. Does not include global IsGutterClickable, so false does not guarantee an ordinary hover cursor.
IsLineInViewportbool
public bool IsLineInViewport(int line);Viewport line query with an implementation limitation: its upper-bound check compares the logical line number with the wrap index. When scrolled into a long line, the result can depend on that line number. Do not use it as the only wrapped-text visibility test; check a specific position with GetRectAtLineColumn after drawing or compute bounds using line and wrapIndex.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
boolViewport line query with an implementation limitation: its upper-bound check compares the logical line number with the wrap index. When scrolled into a long line, the result can depend on that line number. Do not use it as the only wrapped-text visibility test; check a specific position with GetRectAtLineColumn after drawing or compute bounds using line and wrapIndex.
IsLineWrappedbool
public bool IsLineWrapped(int line);Whether a logical line has additional visual segments under the current width and WrapMode. Recheck after resizing; not a test for a document line separator.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineLogical-line index from 0 through GetLineCount() - 1.
boolWhether a logical line has additional visual segments under the current width and WrapMode. Recheck after resizing; not a test for a document line separator.
IsMenuVisiblebool
public bool IsMenuVisible();Tests the actual visibility of the existing built-in menu. Returns false before menu creation and does not create it. Not equivalent to ContextMenuEnabled.
boolTests the actual visibility of the existing built-in menu. Returns false before menu creation and does not create it. Not equivalent to ContextMenuEnabled.
IsMiddleMousePasteEnabledbool
public bool IsMiddleMousePasteEnabled();Allows middle-mouse paste through the primary-selection clipboard on supporting platforms. Does not add primary-clipboard support or control ordinary Paste. false disables this input path but does not block programmatic PastePrimaryClipboard. Assigning the property inserts nothing.
boolThe corresponding setting, not the presence of clipboard data or platform support.
IsMouseOverSelectionbool
public bool IsMouseOverSelection(bool edges, int caretIndex = -1);Tests whether the current mouse position is inside the specified caret’s selection; -1 checks all. edges includes boundaries. Converts the mouse position into line/column coordinates rather than accepting an arbitrary position. Use GetSelectionAtLineColumn for a supplied text position.
| Name | Type | Default |
|---|---|---|
edges | bool | — |
caretIndex | int | -1 |
edgesInclude selection boundaries.
caretIndexCaret index; -1 checks all selections.
boolTests whether the current mouse position is inside the specified caret’s selection; -1 checks all. edges includes boundaries. Converts the mouse position into line/column coordinates rather than accepting an arbitrary position. Use GetSelectionAtLineColumn for a supplied text position.
IsMoveCaretOnRightClickEnabledbool
public bool IsMoveCaretOnRightClickEnabled();Allows moving the caret by right-clicking. Assigning this property does not move it or enable the context menu; configure ContextMenuEnabled separately.
boolCurrent CaretMoveOnRightClick setting; does not prove the effect is visible in this frame.
IsMultipleCaretsEnabledbool
public bool IsMultipleCaretsEnabled();Allows multiple carets. false immediately removes secondary carets, resets multicaret-edit state and blocks AddCaret. Do not toggle this setting inside BeginMulticaretEdit/EndMulticaretEdit.
boolAllows multiple carets. false immediately removes secondary carets, resets multicaret-edit state and blocks AddCaret. Do not toggle this setting inside BeginMulticaretEdit/EndMulticaretEdit.
IsOvertypeModeEnabledbool
public bool IsOvertypeModeEnabled();Whether user-input overtype mode is enabled. Does not mean that every programmatic setter removes old characters.
boolWhether user-input overtype mode is enabled. Does not mean that every programmatic setter removes old characters.
IsScrollPastEndOfFileEnabledbool
public bool IsScrollPastEndOfFileEnabled();Allows extra scrolling space beyond text end. Does not add empty document lines or increase GetLineCount.
boolAllows extra scrolling space beyond text end. Does not add empty document lines or increase GetLineCount.
IsSelectingEnabledbool
public bool IsSelectingEnabled();Allows text selection. Disabling clears existing selections but does not block caret movement through Select or make the document read-only. Configure Editable separately.
boolAllows text selection. Disabling clears existing selections but does not block caret movement through Select or make the document read-only. Configure Editable separately.
IsSelectionHandleEnabledbool
public bool IsSelectionHandleEnabled();Enables on-screen selection handles for touch input. Does not enable selection itself; configure SelectingEnabled separately. Does not control the number of carets or replace CaretMultiple.
boolCurrent SelectionHandleEnabled setting; does not prove the effect is visible in this frame.
IsShortcutKeysEnabledbool
public bool IsShortcutKeysEnabled();Enables built-in editing-command shortcuts and their context-menu accelerator labels. Does not disable all keyboard input or block programmatic commands. Use Editable false to prevent user text editing.
boolEnables built-in editing-command shortcuts and their context-menu accelerator labels. Does not disable all keyboard input or block programmatic commands. Use Editable false to prevent user text editing.
IsSmoothScrollEnabledbool
public bool IsSmoothScrollEnabled();Enables smooth vertical scrolling. Does not change ScrollVertical units or guarantee animation for every programmatic SetVScroll.
boolEnables smooth vertical scrolling. Does not change ScrollVertical units or guarantee animation for every programmatic SetVScroll.
IsVirtualKeyboardEnabledbool
public bool IsVirtualKeyboardEnabled();Allows the on-screen keyboard when supported by the current platform. Assigning true does not itself open it. VirtualKeyboardShowOnFocus separately controls opening on focus; editing requires Editable. Does not build a custom keyboard from UI controls.
boolAllows the on-screen keyboard when supported by the current platform. Assigning true does not itself open it. VirtualKeyboardShowOnFocus separately controls opening on focus; editing requires Editable. Does not build a custom keyboard from UI controls.
MenuOptionvoid
public void MenuOption(int option);Executes a built-in MenuItems command ID supplied as int; this is an ID, not a PopupMenu row index. Does not open the menu. ContextMenuEnabled false does not block the call. The Clear command respects Editable, unlike direct Clear; direction commands change presentation while retaining Text. A disabled menu item is not a substitute for checking your programmatic command’s prerequisites.
| Name | Type | Default |
|---|---|---|
option | int | — |
optionNumeric built-in command ID, for example (int)TextEdit.MenuItems.SelectAll. Not a PopupMenu index.
MergeGuttersvoid
public void MergeGutters(int fromLine, int toLine);Selectively copies fromLine data to toLine for Overwritable gutters only. Nonempty text and an existing icon replace destination values and copy their color; empty text and a null icon do not clear old values. Metadata is skipped only for an empty string: nil can overwrite the destination. Per-line clickable true propagates, while false does not clear an existing true. Retains source data and document text; not a line move or deep container copy.
| Name | Type | Default |
|---|---|---|
fromLine | int | — |
toLine | int | — |
fromLineSource line whose data remains in place.
toLineDestination line for selective copying.
MergeOverlappingCaretsvoid
public void MergeOverlappingCarets();Merges coincident carets and overlapping selections. Adjacent nonempty selections that only touch remain separate. Can remove carets and change indices; inside a multicaret edit, defers merging until its end.
MulticaretEditIgnoreCaretbool
public bool MulticaretEditIgnoreCaret(int caretIndex);Whether an index is marked ignored in the current multicaret edit. Check during manual iteration to avoid processing a caret already affected by another edit. The outer EndMulticaretEdit clears the list.
| Name | Type | Default |
|---|---|---|
caretIndex | int | — |
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
boolWhether an index is marked ignored in the current multicaret edit. Check during manual iteration to avoid processing a caret already affected by another edit. The outer EndMulticaretEdit clears the list.
Pastevoid
public void Paste(int caretIndex = -1);The default implementation replaces selections with system clipboard text; an empty clipboard or Editable false changes nothing. With caretIndex -1 and multiple carets, an exactly equal number of clipboard lines is distributed one per caret in document order; otherwise each receives the entire text. A trailing newline creates an additional empty fragment for this count. With one unselected caret and this TextEdit’s retained full-line-copy marker, unchanged copied text is inserted at the current line start. Edits are grouped for Undo. _Paste replaces this behavior.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexExisting caret index; -1 means all.
PastePrimaryClipboardvoid
public void PastePrimaryClipboard(int caretIndex = -1);The default implementation inserts from the separate primary-selection clipboard when supported by the platform and Editable is enabled. This is not Paste’s regular system clipboard. With one caret, first clears the selection and moves the caret to the mouse, even when the buffer is empty. With multiple carets, the current implementation validates caretIndex but inserts at all carets: the argument does not select the target. Requests focus after a supported call. _PastePrimaryClipboard replaces this behavior; use explicitly obtained text with InsertTextAtCaret for a specific caret.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexValidated, but the default implementation does not use it to select the insertion target.
Redovoid
public void Redo();Reapplies an undone operation/group. Requires Editable true and HasRedo. A new edit after Undo can discard the previous Redo branch.
RemoveCaretvoid
public void RemoveCaret(int caret);Removes the caret at its current index provided at least one remains. Later indices shift. The only remaining caret cannot be removed; use RemoveSecondaryCarets to reset additional carets.
| Name | Type | Default |
|---|---|---|
caret | int | — |
caretCurrent caret index rather than a persistent identifier.
RemoveGuttervoid
public void RemoveGutter(int gutter);Removes the gutter definition and its data from every line. Later indices decrease; recompute retained indices. Emits GutterRemoved without arguments and does not remove document text.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
RemoveLineAtvoid
public void RemoveLineAt(int line, bool moveCaretsDown = true);Removes a logical line with the appropriate separator. For the only line, clears content while retaining one empty line. moveCaretsDown chooses where affected carets move; boundaries use a valid nearest position. The operation is undoable.
| Name | Type | Default |
|---|---|---|
line | int | — |
moveCaretsDown | bool | true |
lineExisting logical-line index from 0 through GetLineCount() - 1.
moveCaretsDownMove affected carets toward the next line; false prefers the previous line. Boundaries use a valid position.
RemoveSecondaryCaretsvoid
public void RemoveSecondaryCarets();Removes all carets except current index 0. Retains text and the remaining caret’s state; not equivalent to deselecting everything.
RemoveTextvoid
public void RemoveText(int fromLine, int fromColumn, int toLine, int toColumn);Removes [fromLine/fromColumn, toLine/toColumn), including intervening line separators. The end boundary is exclusive; cross-line removal joins the retained parts. Columns are Unicode code points. Undoable and does not require Editable true.
| Name | Type | Default |
|---|---|---|
fromLine | int | — |
fromColumn | int | — |
toLine | int | — |
toColumn | int | — |
fromLineRemoval start line; in LinesEditedFrom, the first reported bound, which can exceed the second.
fromColumnRemoval start column in Unicode code points, inclusive.
toLineRemoval end line; in LinesEditedFrom, the second reported bound.
toColumnEnd column in Unicode code points; this position itself is excluded.
SearchVector2I
public Vector2I Search(string text, uint flags, int fromLine, int fromColumn);Searches literal text within logical lines. flags 0 ignores case; combine MatchCase, WholeWords and Backwards as uint. Includes the starting position and wraps around the document. Returns Vector2I with X as the Unicode code-point column and Y as the line; no match is (-1, -1). Does not select the result or move the caret. Does not support regex or matches across line separators. When enumerating, advance the start and stop when the first match position repeats.
| Name | Type | Default |
|---|---|---|
text | string | — |
flags | uint | — |
fromLine | int | — |
fromColumn | int | — |
textLiteral query/insertion text. Search supports neither regex nor multiline queries.
flagsMatchCase, WholeWords and Backwards bits as uint; 0 searches forward ignoring case.
fromLineExisting logical line; in Search, the traversal start line.
fromColumnSearch-start column in Unicode code points, inclusive.
Vector2ISearches literal text within logical lines. flags 0 ignores case; combine MatchCase, WholeWords and Backwards as uint. Includes the starting position and wraps around the document. Returns Vector2I with X as the Unicode code-point column and Y as the line; no match is (-1, -1). Does not select the result or move the caret. Does not support regex or matches across line separators. When enumerating, advance the start and stop when the first match position repeats.
Selectvoid
public void Select(int originLine, int originColumn, int caretLine, int caretColumn, int caretIndex = 0);Sets a selection from origin to the caret position, retaining direction. GetSelectionFrom/To provide normalized bounds; lines and columns start at 0 and columns count Unicode code points. Even with SelectingEnabled false, moves the caret without activating selection. Does not edit text or automatically merge overlapping carets.
| Name | Type | Default |
|---|---|---|
originLine | int | — |
originColumn | int | — |
caretLine | int | — |
caretColumn | int | — |
caretIndex | int | 0 |
originLineLogical selection-anchor line.
originColumnAnchor column in Unicode code points.
caretLineActive selection-end line; can precede the anchor.
caretColumnActive endpoint column in Unicode code points.
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
SelectAllvoid
public void SelectAll();Selects the entire document with the main caret and removes secondary carets. Does not edit text. With SelectingEnabled false, selects nothing; an empty document remains unselected.
SelectWordUnderCaretvoid
public void SelectWordUnderCaret(int caretIndex = -1);Toggles selection at the specified caret: clears an existing selection, otherwise selects the word using text-system boundaries and separator settings. caretIndex -1 processes every caret. Requires SelectingEnabled. Does not edit text; overlapping carets are merged. It is not an unconditional select-word command: calling it again clears the selection.
| Name | Type | Default |
|---|---|---|
caretIndex | int | -1 |
caretIndexCaret index; -1 processes all carets.
SetAutowrapModevoid
public void SetAutowrapMode(TextServer.AutowrapMode autowrapMode);Visual wrapping rule with WrapMode.Boundary: Arbitrary uses grapheme boundaries, Word uses words, WordSmart can split an oversized word, and Off disables soft wrapping. Does not enable Boundary by itself.
| Name | Type | Default |
|---|---|---|
autowrapMode | TextServer.AutowrapMode | — |
autowrapModeOff, Arbitrary, Word or WordSmart. Used with Boundary.
SetBackspaceDeletesCompositeCharacterEnabledvoid
public void SetBackspaceDeletesCompositeCharacterEnabled(bool enable);With true, normal Backspace deletes to the previous composite-character boundary; false deletes one code point. CaretMidGrapheme true takes priority and also selects one-code-point deletion. Does not control RemoveText with an explicit range.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the corresponding composite-deletion setting.
SetCaretBlinkEnabledvoid
public void SetCaretBlinkEnabled(bool enable);Enables text-caret blinking. The timer runs while focused; false disables blinking rather than hiding the caret. Visibility still depends on focus and other drawing conditions. Configure timing with CaretBlinkInterval.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described behavior; does not change Text content.
SetCaretBlinkIntervalvoid
public void SetCaretBlinkInterval(float interval);Positive caret-visibility toggle interval in seconds. For example, 0.5 toggles every half second; a complete visible/hidden cycle takes two intervals. Zero does not disable blinking: use CaretBlink false. This is not a key-repeat delay.
| Name | Type | Default |
|---|---|---|
interval | float | — |
intervalVisibility-toggle interval in seconds, strictly greater than zero.
SetCaretColumnvoid
public void SetCaretColumn(int column, bool adjustViewport = true, int caretIndex = 0);Moves the caret within its current line, clamped to 0 through the Unicode code-point length. Matching the anchor clears selection. adjustViewport controls scrolling rather than the column value.
| Name | Type | Default |
|---|---|---|
column | int | — |
adjustViewport | bool | true |
caretIndex | int | 0 |
columnColumn in Unicode code points rather than a UTF-16 index.
adjustViewportScroll to the new position if needed.
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
SetCaretLinevoid
public void SetCaretLine(int line, bool adjustViewport = true, bool canBeHidden = true, int wrapIndex = 0, int caretIndex = 0);Moves the caret to a logical line, clamping to the document. wrapIndex >= 0 retains visual X within a chosen wrap; -1 retains the numeric column clamped to line length. Set the line, then SetCaretColumn for an exact position. canBeHidden false searches for a visible line.
| Name | Type | Default |
|---|---|---|
line | int | — |
adjustViewport | bool | true |
canBeHidden | bool | true |
wrapIndex | int | 0 |
caretIndex | int | 0 |
lineZero-based logical line.
adjustViewportScroll to the new position if needed.
canBeHiddenAllow a hidden line; false searches for a suitable visible line.
wrapIndexVisual wrap used to retain X; -1 uses the numeric column.
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
SetCaretMidGraphemeEnabledvoid
public void SetCaretMidGraphemeEnabled(bool enabled);Allows caret/deletion behavior inside composite characters. With true, Backspace deletes one code point even if BackspaceDeletesCompositeCharacterEnabled is enabled. Does not mean operating on halves of a UTF-16 surrogate pair.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the input/presentation setting; does not automatically convert text.
SetCaretTypevoid
public void SetCaretType(TextEdit.CaretTypeEnum type);Text-caret shape: Line or Block. Block changes drawing but does not enable character replacement: configure OvertypeMode separately. Does not change text or caret positions.
| Name | Type | Default |
|---|---|---|
type | TextEdit.CaretTypeEnum | — |
typeLine or Block shape; does not enable OvertypeMode.
SetContextMenuEnabledvoid
public void SetContextMenuEnabled(bool enabled);Allows the user to open the built-in context menu. false neither deletes the PopupMenu nor prevents programmatic GetMenu or MenuOption calls. This is an interface setting, not an editing restriction; use Editable to control input.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described interface behavior.
SetCustomWordSeparatorsvoid
public void SetCustomWordSeparators(string customWordSeparators);Additional word-separator characters for the editor’s text system. Assigning the string does not enable them; use UseCustomWordSeparators. Not a regex and does not change the fixed WholeWords boundary checks in Search.
| Name | Type | Default |
|---|---|---|
customWordSeparators | string | — |
customWordSeparatorsAdditional separator characters rather than a regular expression.
SetDeselectOnFocusLossEnabledvoid
public void SetDeselectOnFocusLossEnabled(bool enable);Controls deselection on focus loss. false retains selection when another control receives focus. Switching false to true while this editor is unfocused immediately clears an existing selection. Does not edit text or transfer focus.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable deselection on focus loss; enabling while unfocused clears selection immediately.
SetDragAndDropSelectionEnabledvoid
public void SetDragAndDropSelectionEnabled(bool enable);Allows the user to drag selected text through TextEdit’s drag-and-drop handling. Does not create a selection, perform a transfer on assignment or automatically enable file/project-object drops. Selection separately requires SelectingEnabled.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described behavior; does not change Text content.
SetDrawCaretWhenEditableDisabledvoid
public void SetDrawCaretWhenEditableDisabled(bool enable);Allows caret drawing with Editable false, subject to the remaining visibility conditions. Does not allow input or make the control editable. Leave false for ordinary text viewing without a caret.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described behavior; does not change Text content.
SetDrawControlCharsvoid
public void SetDrawControlChars(bool enabled);Allows the text system to display control characters. Does not remove them from the document or sanitize/validate input text.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the input/presentation setting; does not automatically convert text.
SetDrawMinimapvoid
public void SetDrawMinimap(bool enabled);Shows the document minimap. It takes part of TextEdit’s width, so enabling it can change the number of display rows when wrapping is enabled. Source Text and logical line count remain unchanged. Set its width with MinimapWidth.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described behavior; does not change Text content.
SetDrawSpacesvoid
public void SetDrawSpaces(bool enabled);Shows space markers without changing Text or selection rules. Presentation rather than adding characters to a file.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the input/presentation setting; does not automatically convert text.
SetDrawTabsvoid
public void SetDrawTabs(bool enabled);Shows visual tab markers while retaining document text. Does not enable Tab input or convert tabs into spaces.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the input/presentation setting; does not automatically convert text.
SetEditablevoid
public void SetEditable(bool enabled);Allows user editing; default true. false also blocks Undo/Redo actions, but not programmatic Text, SetLine, InsertTextAtCaret or RemoveText. This is a UI mode rather than model-data protection.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledAllow user editing and Undo/Redo actions.
SetEmojiMenuEnabledvoid
public void SetEmojiMenuEnabled(bool enable);Allows the context-menu emoji command when the platform supports a system picker. false disables the corresponding item rather than necessarily removing it. Editable is also required. Does not add an emoji font or guarantee a system picker on every platform.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described interface behavior.
SetEmptySelectionClipboardEnabledvoid
public void SetEmptySelectionClipboardEnabled(bool enabled);Allows default Copy and Cut to operate on full lines when no text is selected. Defaults to true. Does not mean copying an empty string: it copies the entire caret line, which Cut may remove. Does not affect selected-text handling; assigning the property does not access the clipboard.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described behavior; assignment itself neither reads nor changes the clipboard.
SetFitContentHeightEnabledvoid
public void SetFitContentHeightEnabled(bool enabled);Includes content in TextEdit’s minimum height. A parent container may expand the editor instead of using internal scrolling. Does not set a fixed height or change font size. Corresponds to ScrollFitContentHeight.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described interface behavior.
SetFitContentWidthEnabledvoid
public void SetFitContentWidthEnabled(bool enabled);Includes content in TextEdit’s minimum width. A layout requirement rather than fixed width or text zoom; account for interaction with wrapping. Corresponds to ScrollFitContentWidth.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described interface behavior.
SetGutterClickablevoid
public void SetGutterClickable(int gutter, bool clickable);Sets the global action hint for the hover cursor. A line’s visual clickability is the OR of global and per-line flags. false does not itself block GutterClicked; validate the action in the handler.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
clickable | bool | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
clickableAction hint for the hover cursor rather than a press-signal filter.
SetGutterCustomDrawvoid
public void SetGutterCustomDraw(int column, Callable drawCallback);Assigns a Callable for a Custom gutter, receiving logical line, gutter index and a Rect2 in editor-local coordinates. The C# column parameter here means a gutter index. Does not enable Custom type or immediately invoke the callback; default(Callable) clears it. Do not mutate document structure during drawing.
| Name | Type | Default |
|---|---|---|
column | int | — |
drawCallback | Callable | — |
columnGutter index despite the column name; not a text column.
drawCallbackCallable accepting line, gutter and Rect2; default clears the callback.
SetGutterDrawvoid
public void SetGutterDraw(int gutter, bool draw);Shows or hides a gutter while retaining its definition and line data. Hidden gutters are excluded from hit-testing and the main width sum; shared padding can remain. Use RemoveGutter to remove data.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
draw | bool | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
drawDraw the gutter; false retains its data.
SetGutterNamevoid
public void SetGutterName(int gutter, string name);Sets a gutter name for application identification. Names need not be unique; the setter does not migrate bindings or protect retained indices from shifts. Enforce uniqueness in the application model if needed.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
name | string | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
nameDefinition name; uniqueness is controlled by the application.
SetGutterOverwritablevoid
public void SetGutterOverwritable(int gutter, bool overwritable);Allows MergeGutters to copy this gutter’s data between lines. Does not make document text read-only or restrict direct SetLineGutter methods.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
overwritable | bool | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
overwritableAllow the gutter to participate in MergeGutters.
SetGutterTypevoid
public void SetGutterType(int gutter, TextEdit.GutterType type);Chooses cell presentation: String, Icon or Custom. Changing type retains text, icon and Metadata without converting one value into another. Assign a callback separately for Custom.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
type | TextEdit.GutterType | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
typeString, Icon or Custom: presentation of stored data.
SetGutterWidthvoid
public void SetGutterWidth(int gutter, int width);Sets gutter width in pixels. Use nonnegative values; this is a stored width rather than automatic fitting to text or icons. Hidden gutter widths are excluded from the main sum.
| Name | Type | Default |
|---|---|---|
gutter | int | — |
width | int | — |
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
widthNonnegative gutter width in pixels.
SetHScrollvoid
public void SetHScroll(int value);Horizontal offset in pixels. Clamped to the internal scrollbar range; wrapping can eliminate the available horizontal range. Not a text column number.
| Name | Type | Default |
|---|---|---|
value | int | — |
valueHorizontal pixel offset.
SetHighlightAllOccurrencesvoid
public void SetHighlightAllOccurrences(bool enabled);Highlights case-sensitive whole-word matches of caret 0’s selected text. Empty or whitespace-only selections are ignored. Creates no additional selections and does not set SetSearchText. Differs from AddSelectionForNextOccurrence, which allows substring matches.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described behavior; does not change Text content.
SetHighlightCurrentLinevoid
public void SetHighlightCurrentLine(bool enabled);Highlights the background of current caret lines using the theme color. This is visual highlighting rather than text selection: HasSelection and GetSelectedText are unchanged. Use Select for an explicit range.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described behavior; does not change Text content.
SetIndentWrappedLinesvoid
public void SetIndentWrappedLines(bool enabled);Adds visual indentation to wrapped continuations. Does not insert spaces/tabs or change text or logical line numbers.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable visual continuation indentation without editing text.
SetLanguagevoid
public void SetLanguage(string language);Text-shaping language hint, such as ar; an empty string uses the locale. Does not translate the document or switch application language. Changes shaping/glyph selection while retaining Text.
| Name | Type | Default |
|---|---|---|
language | string | — |
languageText-shaping language hint; an empty string uses the locale.
SetLinevoid
public void SetLine(int line, string newText);Replaces a logical line with undo history. newText can contain \n and create additional lines; not limited to replacing one visual row. Programmatic calls are not blocked by Editable false.
| Name | Type | Default |
|---|---|---|
line | int | — |
newText | string | — |
lineLogical-line index from 0 through GetLineCount() - 1.
newTextNew line text; can contain \n and increase the line count.
SetLineAsCenterVisiblevoid
public void SetLineAsCenterVisible(int line, int wrapIndex = 0);Attempts to center the supplied logical line/wrapIndex. Exact centering can be impossible near document boundaries. Does not alter text or carets.
| Name | Type | Default |
|---|---|---|
line | int | — |
wrapIndex | int | 0 |
lineLogical-line index from 0 through GetLineCount() - 1.
wrapIndexVisual segment index; GetLineWidth uses -1 for the line buffer.
SetLineAsFirstVisiblevoid
public void SetLineAsFirstVisible(int line, int wrapIndex = 0);Scrolls the supplied logical line/wrapIndex toward the top boundary. Does not select text or move carets. Scrollbar range can constrain placement near document end.
| Name | Type | Default |
|---|---|---|
line | int | — |
wrapIndex | int | 0 |
lineLogical-line index from 0 through GetLineCount() - 1.
wrapIndexVisual segment index; GetLineWidth uses -1 for the line buffer.
SetLineAsLastVisiblevoid
public void SetLineAsLastVisible(int line, int wrapIndex = 0);Scrolls the supplied logical line/wrapIndex toward the bottom boundary using viewport height and available range. Does not move the line within the document.
| Name | Type | Default |
|---|---|---|
line | int | — |
wrapIndex | int | 0 |
lineLogical-line index from 0 through GetLineCount() - 1.
wrapIndexVisual segment index; GetLineWidth uses -1 for the line buffer.
SetLineBackgroundColorvoid
public void SetLineBackgroundColor(int line, Color color);Sets an additional background for a logical line, including its visual wraps. Alpha 0 removes this fill while retaining selection and theme styling. Does not edit text or a gutter-cell color.
| Name | Type | Default |
|---|---|---|
line | int | — |
color | Color | — |
lineLogical-line index from 0 through GetLineCount() - 1.
colorColor with alpha; for line backgrounds, alpha 0 removes the additional fill.
SetLineGutterClickablevoid
public void SetLineGutterClickable(int line, int gutter, bool clickable);Sets a per-line action hint for the hover cursor. Effective visual clickability is ORed with global GutterClickable. Does not block GutterClicked; decide whether to execute the command in the handler.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
clickable | bool | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
clickableAction hint for the hover cursor rather than a press-signal filter.
SetLineGutterIconvoid
public void SetLineGutterIcon(int line, int gutter, Texture2D icon);Sets a shared Texture2D for the cell; null clears the icon. GutterType.Icon is required to display it. Does not change the label, gutter type or image resource itself.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
icon | Texture2D | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
iconShared Texture2D or null to clear the icon.
SetLineGutterItemColorvoid
public void SetLineGutterItemColor(int line, int gutter, Color color);Sets a cell text/icon color, including alpha. Does not change the line background, document text or other gutter cells.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
color | Color | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
colorColor with alpha; for line backgrounds, alpha 0 removes the additional fill.
SetLineGutterMetadatavoid
public void SetLineGutterMetadata(int line, int gutter, Variant metadata);Stores a cell Variant, such as a stable model key. Arrays, dictionaries and resources are retained by reference without deep copying. Line and gutter indices can change after structural edits; do not use them as persistent record IDs.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
metadata | Variant | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
metadataVariant holding model data; containers are not deep-copied.
SetLineGutterTextvoid
public void SetLineGutterText(int line, int gutter, string text);Sets a logical line’s gutter-cell label. Does not edit document text, the gutter name or type. Use String type to display the label.
| Name | Type | Default |
|---|---|---|
line | int | — |
gutter | int | — |
text | string | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
textGutter-cell label, separate from document text.
SetLineWrappingModevoid
public void SetLineWrappingMode(TextEdit.LineWrappingMode mode);None disables visual wrapping; Boundary constrains lines to available control width. AutowrapMode chooses break points. Does not insert line separators or change GetLineCount; gutters, scrollbar, theme and minimap also affect available width.
| Name | Type | Default |
|---|---|---|
mode | TextEdit.LineWrappingMode | — |
modeNone or Boundary; configure break-point policy separately.
SetMiddleMousePasteEnabledvoid
public void SetMiddleMousePasteEnabled(bool enabled);Allows middle-mouse paste through the primary-selection clipboard on supporting platforms. Does not add primary-clipboard support or control ordinary Paste. false disables this input path but does not block programmatic PastePrimaryClipboard. Assigning the property inserts nothing.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described behavior; assignment itself neither reads nor changes the clipboard.
SetMinimapWidthvoid
public void SetMinimapWidth(int width);Minimap area width in control pixels. Use a nonnegative value that leaves room for the main text. This is not a minimap font scale. Changing it recalculates available wrap width; use MinimapDraw false to disable the minimap.
| Name | Type | Default |
|---|---|---|
width | int | — |
widthNonnegative minimap width in control pixels.
SetMoveCaretOnRightClickEnabledvoid
public void SetMoveCaretOnRightClickEnabled(bool enable);Allows moving the caret by right-clicking. Assigning this property does not move it or enable the context menu; configure ContextMenuEnabled separately.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described behavior; does not change Text content.
SetMultipleCaretsEnabledvoid
public void SetMultipleCaretsEnabled(bool enabled);Allows multiple carets. false immediately removes secondary carets, resets multicaret-edit state and blocks AddCaret. Do not toggle this setting inside BeginMulticaretEdit/EndMulticaretEdit.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledAllow multiple carets; disabling removes secondary carets.
SetOvertypeModeEnabledvoid
public void SetOvertypeModeEnabled(bool enabled);Enables replacing the next code point in the user-input path when no selection exists. Does not change programmatic InsertTextAtCaret: it continues to insert. Use an explicit removal range for precise replacement from code.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the input/presentation setting; does not automatically convert text.
SetPlaceholdervoid
public void SetPlaceholder(string text);Empty-editor hint, separate from Text. GetPlaceholder returns the source string; presentation uses UI translation. Not part of document saving, searching or content history.
| Name | Type | Default |
|---|---|---|
text | string | — |
textSource hint for an empty editor, separate from the document.
SetScrollPastEndOfFileEnabledvoid
public void SetScrollPastEndOfFileEnabled(bool enable);Allows extra scrolling space beyond text end. Does not add empty document lines or increase GetLineCount.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the corresponding smoothness or past-end-space setting.
SetSearchFlagsvoid
public void SetSearchFlags(uint flags);Sets visual search-highlight flags. Does not replace flags explicitly passed to Search or start a search. Call QueueRedraw after changing them. Backwards controls Search traversal rather than highlight drawing order.
| Name | Type | Default |
|---|---|---|
flags | uint | — |
flagsMatchCase/WholeWords visual-highlight flags; Backwards controls direction only in Search.
SetSearchTextvoid
public void SetSearchText(string searchText);Sets the visual search-highlight text without executing Search or changing selection. An empty string disables highlighting. The setter does not request redraw; call QueueRedraw after changing settings.
| Name | Type | Default |
|---|---|---|
searchText | string | — |
searchTextVisual highlight text; an empty string clears highlighting.
SetSelectingEnabledvoid
public void SetSelectingEnabled(bool enable);Allows text selection. Disabling clears existing selections but does not block caret movement through Select or make the document read-only. Configure Editable separately.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableAllow selection; disabling clears existing selections.
SetSelectionHandleEnabledvoid
public void SetSelectionHandleEnabled(bool enable);Enables on-screen selection handles for touch input. Does not enable selection itself; configure SelectingEnabled separately. Does not control the number of carets or replace CaretMultiple.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described behavior; does not change Text content.
SetSelectionMode2 overloads
public void SetSelectionMode(TextEdit.SelectionMode mode);Sets the selection-processing mode. Does not move the caret, create a selection or clear one. Use Select for a range and Deselect to clear it; Word mode alone does not select a word. The overload with line, column and caretIndex ignores those three arguments; use the mode-only overload.
| Name | Type | Default |
|---|---|---|
mode | TextEdit.SelectionMode | — |
modeSelection-processing mode; assigning it does not select text.
public void SetSelectionMode(TextEdit.SelectionMode mode, int line, int column, int caretIndex);Sets the selection-processing mode. Does not move the caret, create a selection or clear one. Use Select for a range and Deselect to clear it; Word mode alone does not select a word. The overload with line, column and caretIndex ignores those three arguments; use the mode-only overload.
| Name | Type | Default |
|---|---|---|
mode | TextEdit.SelectionMode | — |
line | int | — |
column | int | — |
caretIndex | int | — |
modeSelection-processing mode; assigning it does not select text.
lineIgnored by this overload; use SetSelectionMode(mode).
columnIgnored by this overload; use SetSelectionMode(mode).
caretIndexIgnored by this overload; use SetSelectionMode(mode).
SetSelectionOriginColumnvoid
public void SetSelectionOriginColumn(int column, int caretIndex = 0);Moves the anchor column within its line. Columns count Unicode code points. Matching the caret clears selection; the setter does not itself activate selection.
| Name | Type | Default |
|---|---|---|
column | int | — |
caretIndex | int | 0 |
columnColumn in Unicode code points rather than a UTF-16 index.
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
SetSelectionOriginLinevoid
public void SetSelectionOriginLine(int line, bool canBeHidden = true, int wrapIndex = -1, int caretIndex = 0);Moves the specified caret’s anchor to a logical line, clamped to the document. Does not itself create an active selection; use Select to define both endpoints. canBeHidden and wrapIndex control hidden-line targeting and visual-position retention.
| Name | Type | Default |
|---|---|---|
line | int | — |
canBeHidden | bool | true |
wrapIndex | int | -1 |
caretIndex | int | 0 |
lineZero-based logical line.
canBeHiddenAllow a hidden line; false searches for a suitable visible line.
wrapIndexVisual wrap used to retain X; -1 uses the numeric column.
caretIndexCurrent caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.
SetShortcutKeysEnabledvoid
public void SetShortcutKeysEnabled(bool enabled);Enables built-in editing-command shortcuts and their context-menu accelerator labels. Does not disable all keyboard input or block programmatic commands. Use Editable false to prevent user text editing.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described interface behavior.
SetSmoothScrollEnabledvoid
public void SetSmoothScrollEnabled(bool enable);Enables smooth vertical scrolling. Does not change ScrollVertical units or guarantee animation for every programmatic SetVScroll.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the corresponding smoothness or past-end-space setting.
SetStructuredTextBidiOverridevoid
public void SetStructuredTextBidiOverride(TextServer.StructuredTextParser parser);Structured-text parser for mixed LTR/RTL: URI, path, email, list and other supported modes. Controls separator presentation rather than converting document encoding. Configure parser options separately.
| Name | Type | Default |
|---|---|---|
parser | TextServer.StructuredTextParser | — |
parserStructured-text BiDi parser mode.
SetStructuredTextBidiOverrideOptionsvoid
public void SetStructuredTextBidiOverrideOptions(Reckfell.Collections.Array args);Shared Array of BiDi parser options. The setter compares contents and skips equal values; merely assigning Duplicate with old contents does not detach the previous array. In-place mutation does not trigger text recalculation. Supply a separately prepared array and a new array with changed contents when updating.
| Name | Type | Default |
|---|---|---|
args | Reckfell.Collections.Array | — |
argsShared parser-options Array; do not mutate it in place after assignment.
SetSyntaxHighlightervoid
public void SetSyntaxHighlighter(SyntaxHighlighter syntaxHighlighter);This editor’s highlighting resource; null disables highlighting. Use one instance per TextEdit because the resource stores only one context. Reassigning the same resource is skipped and does not replace ClearHighlightingCache/EmitChanged.
| Name | Type | Default |
|---|---|---|
syntaxHighlighter | SyntaxHighlighter | — |
syntaxHighlighterA separate resource for this editor, or null to disable.
SetTabInputModevoid
public void SetTabInputMode(bool enabled);Controls editor handling of the Tab key. Does not convert existing tab characters, set their width or automatically translate indentation to spaces.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the input/presentation setting; does not automatically convert text.
SetTabSizevoid
public void SetTabSize(int size);Sets a positive tab width for layout and indentation measurement. Does not replace tabs with spaces or change Text. Must be greater than 0.
| Name | Type | Default |
|---|---|---|
size | int | — |
sizePositive tab width.
SetTextvoid
public void SetText(string text);Full text with \n line separators. Assignment replaces the document, emits TextSet without TextChanged and allows Undo with history enabled. For a newly loaded document, explicitly clear history and mark the saved version afterward.
| Name | Type | Default |
|---|---|---|
text | string | — |
textText to insert or assign; \n creates logical lines.
SetTextDirectionvoid
public void SetTextDirection(Control.TextDirection direction);Base text direction: Inherited follows Control layout, Auto derives it from text, and Ltr/Rtl set it explicitly. Does not translate or reverse stored Text. Document character order remains logical.
| Name | Type | Default |
|---|---|---|
direction | Control.TextDirection | — |
directionInherited, Auto, Ltr or Rtl without changing source-text order.
SetTooltipRequestFuncvoid
public void SetTooltipRequestFunc(Callable callback);Sets a (string word) -> string callback for the tooltip of a word under the pointer. Assignment stores the handler without immediately invoking it. An empty Callable restores standard Control handling. Does not edit text, search or mean a tooltip is already visible. Keep the handler valid while installed.
| Name | Type | Default |
|---|---|---|
callback | Callable | — |
callbackA (string word) -> string handler; an empty Callable clears it.
SetUseCustomWordSeparatorsvoid
public void SetUseCustomWordSeparators(bool enabled);Enables CustomWordSeparators for word-boundary processing. Independent of UseDefaultWordSeparators; both sets can be used together. Does not switch Search into WholeWords mode.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the corresponding separator set independently of the other set.
SetUseDefaultWordSeparatorsvoid
public void SetUseDefaultWordSeparators(bool enabled);Enables the text system’s default word separators. Disabling does not enable custom separators automatically; configure UseCustomWordSeparators separately. Does not change Search WholeWords boundary checks.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the corresponding separator set independently of the other set.
SetVScrollvoid
public void SetVScroll(double value);Vertical offset in visual-row units, allowing a fractional part. Not pixels or always a logical line number: use GetScrollPosForLine with wrapping. The getter returns the actual clamped value.
| Name | Type | Default |
|---|---|---|
value | double | — |
valueVertical offset in visual rows; fractional values are allowed.
SetVScrollSpeedvoid
public void SetVScrollSpeed(float speed);Smooth vertical scrolling speed, at least 1. Does not set the current offset or represent line height or a horizontal step size.
| Name | Type | Default |
|---|---|---|
speed | float | — |
speedSmooth vertical scroll speed, at least 1.
SetVirtualKeyboardEnabledvoid
public void SetVirtualKeyboardEnabled(bool enabled);Allows the on-screen keyboard when supported by the current platform. Assigning true does not itself open it. VirtualKeyboardShowOnFocus separately controls opening on focus; editing requires Editable. Does not build a custom keyboard from UI controls.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described interface behavior.
SetVirtualKeyboardShowOnFocusvoid
public void SetVirtualKeyboardShowOnFocus(bool showOnFocus);Allows requesting the on-screen keyboard on focus. Requires VirtualKeyboardEnabled, Editable and platform support. false disables focus-triggered opening rather than every other keyboard-opening path.
| Name | Type | Default |
|---|---|---|
showOnFocus | bool | — |
showOnFocusAllow requesting the on-screen keyboard on focus.
SkipSelectionForNextOccurrencevoid
public void SkipSelectionForNextOccurrence();Moves the last indexed selection to the next match while retaining earlier carets. Without a selection, jumps to the start of the next word match without selecting it. Requires SelectingEnabled; enable CaretMultiple before calling: otherwise the command may only clear the selection without moving the caret. Search is literal, case-sensitive, allows substrings and wraps.
StartActionvoid
public void StartAction(TextEdit.EditAction action);Starts/continues a Typing, Backspace or Delete action group for user-edit history. None ends the current action group. For an ordinary command containing several programmatic edits, prefer BeginComplexOperation/EndComplexOperation with try/finally.
| Name | Type | Default |
|---|---|---|
action | TextEdit.EditAction | — |
actionTyping, Backspace or Delete; None closes the action group.
SwapLinesvoid
public void SwapLines(int fromLine, int toLine);Swaps the text of two existing logical lines and moves associated caret/anchor positions. One Undo operation; equal indices change nothing. Does not sort the whole document.
| Name | Type | Default |
|---|---|---|
fromLine | int | — |
toLine | int | — |
fromLineExisting logical line; in Search, the traversal start line.
toLineSecond existing line to swap.
TagSavedVersionvoid
public void TagSavedVersion();Marks the current GetVersion as saved. Does not write a file; call after a successful application save or after loading a new document and clearing its history.
Undovoid
public void Undo();Undoes the last operation or BeginComplexOperation group. Does nothing with Editable false even when HasUndo is true. Restores text and caret state from history.
_Backspacevoid
public virtual void _Backspace(int caretIndex);Hook replacing Backspace. Invoked before the default Editable check, so enforce it yourself when needed. Do not call Backspace from this hook: it invokes the same hook again. The base C# body is empty; base._Backspace does not perform default deletion.
| Name | Type | Default |
|---|---|---|
caretIndex | int | — |
caretIndexCaret index; Backspace uses -1 for the entire eligible set.
_Copyvoid
public virtual void _Copy(int caretIndex);Overridable Copy handler, called instead of the built-in implementation before its validation and clipboard operations. Implement the required index, Editable and platform checks yourself. The base C# method is empty: base._Copy does not run the default command. Do not call Copy from the handler to continue: it invokes the same handler again.
| Name | Type | Default |
|---|---|---|
caretIndex | int | — |
caretIndexIndex supplied by the command; -1 means all carets. The custom handler is responsible for validation.
_Cutvoid
public virtual void _Cut(int caretIndex);Overridable Cut handler, called instead of the built-in implementation before its validation and clipboard operations. Implement the required index, Editable and platform checks yourself. The base C# method is empty: base._Cut does not run the default command. Do not call Cut from the handler to continue: it invokes the same handler again.
| Name | Type | Default |
|---|---|---|
caretIndex | int | — |
caretIndexIndex supplied by the command; -1 means all carets. The custom handler is responsible for validation.
_HandleUnicodeInputvoid
public virtual void _HandleUnicodeInput(int unicodeChar, int caretIndex);Hook processing one Unicode input code point and caret index. Not a C# char containing half a surrogate pair. An override replaces the default insertion/overtype path; explicitly handle Editable, selection and overtype. Do not invoke the hook manually instead of ordinary InsertTextAtCaret.
| Name | Type | Default |
|---|---|---|
unicodeChar | int | — |
caretIndex | int | — |
unicodeCharOne Unicode code point rather than a separate UTF-16 half of an emoji.
caretIndexCaret index; Backspace uses -1 for the entire eligible set.
_Pastevoid
public virtual void _Paste(int caretIndex);Overridable Paste handler, called instead of the built-in implementation before its validation and clipboard operations. Implement the required index, Editable and platform checks yourself. The base C# method is empty: base._Paste does not run the default command. Do not call Paste from the handler to continue: it invokes the same handler again.
| Name | Type | Default |
|---|---|---|
caretIndex | int | — |
caretIndexIndex supplied by the command; -1 means all carets. The custom handler is responsible for validation.
_PastePrimaryClipboardvoid
public virtual void _PastePrimaryClipboard(int caretIndex);Overridable PastePrimaryClipboard handler, called instead of the built-in implementation before its validation and clipboard operations. Implement the required index, Editable and platform checks yourself. The base C# method is empty: base._PastePrimaryClipboard does not run the default command. Do not call PastePrimaryClipboard from the handler to continue: it invokes the same handler again.
| Name | Type | Default |
|---|---|---|
caretIndex | int | — |
caretIndexIndex supplied by the command; -1 means all carets. The custom handler is responsible for validation.
Signals and events7
CaretChangedEvent
public event Action CaretChanged;Deferred notification of caret-position changes. Not a universal signal for every selection change: anchor-only changes can occur without it. Also synchronize the model after your own programmatic operations.
GutterAddedEvent
public event Action GutterAdded;A gutter was added; no index argument. Definitions and line data are already updated. Recompute retained indices from the application model after insertion.
GutterClickedEvent
public event TextEdit.GutterClickedEventHandler GutterClicked;Press/touch on a drawn gutter, reporting the logical line and gutter index. Clickable flags are hover hints and do not guarantee signal filtering; check whether the action is allowed for this cell. Does not automatically toggle a breakpoint or save data.
| Name | Type | Default |
|---|---|---|
line | long | — |
gutter | long | — |
lineLogical-line index from 0 through GetLineCount() - 1.
gutterCurrent gutter index from 0 through GetGutterCount() - 1.
GutterRemovedEvent
public event Action GutterRemoved;A gutter was removed; no index argument. Later gutter indices have already shifted. Does not mean that a document line was removed.
LinesEditedFromEvent
public event TextEdit.LinesEditedFromEventHandler LinesEditedFrom;Notification of affected logical lines, including programmatic edits and IME activity. During removal, fromLine can exceed toLine; not a guaranteed sorted range or a file-write event. Normalize bounds and account for the new line count when computing an update range.
| Name | Type | Default |
|---|---|---|
fromLine | long | — |
toLine | long | — |
fromLineRemoval start line; in LinesEditedFrom, the first reported bound, which can exceed the second.
toLineRemoval end line; in LinesEditedFrom, the second reported bound.
TextChangedEvent
public event Action TextChanged;Deferred text-edit notification; multiple synchronous operations can coalesce into one signal. Read current Text when handling it. Text/SetText assignment and Clear use TextSet and do not themselves create a new TextChanged; an earlier queued notification can still arrive.
TextSetEvent
public event Action TextSet;Whole text was assigned through Text/SetText or Clear was called. Programmatic assignment is not reported through TextChanged; handle TextSet or explicitly update the model when loading. Does not imply user input or a file save.
TextEdit.CaretTypeEnum
TextEdit.EditAction
| Value | Description |
|---|---|
Backspace = 2 | A backwards delete action. |
Delete = 3 | A forward delete action. |
None = 0 | No current action. |
Typing = 1 | A typing action. |
TextEdit.GutterType
| Value | Description |
|---|---|
Custom = 2 | When a gutter is set to custom using |
Icon = 1 | When a gutter is set to icon using |
String = 0 | When a gutter is set to string using |
TextEdit.LineWrappingMode
| Value | Description |
|---|---|
Boundary = 1 | Line wrapping occurs at the control boundary, beyond what would normally be visible. |
None = 0 | Line wrapping is disabled. |
TextEdit.MenuItems
| Value | Description |
|---|---|
Clear = 3 | Erases the whole |
Copy = 1 | Copies the selected text. |
Cut = 0 | Cuts (copies and clears) the selected text. |
DirAuto = 9 | Sets text direction to automatic. |
DirInherited = 8 | Sets text direction to inherited. |
DirLtr = 10 | Sets text direction to left-to-right. |
DirRtl = 11 | Sets text direction to right-to-left. |
DisplayUcc = 12 | Toggles control character display. |
EmojiAndSymbol = 30 | Opens system emoji and symbol picker. |
InsertAlm = 21 | Inserts Arabic letter mark (ALM) character. |
InsertFsi = 24 | Inserts first strong isolate (FSI) character. |
InsertLre = 16 | Inserts start of left-to-right embedding (LRE) character. |
InsertLri = 22 | Inserts left-to-right isolate (LRI) character. |
InsertLrm = 14 | Inserts left-to-right mark (LRM) character. |
InsertLro = 18 | Inserts start of left-to-right override (LRO) character. |
InsertPdf = 20 | Inserts pop direction formatting (PDF) character. |
InsertPdi = 25 | Inserts pop direction isolate (PDI) character. |
InsertRle = 17 | Inserts start of right-to-left embedding (RLE) character. |
InsertRli = 23 | Inserts right-to-left isolate (RLI) character. |
InsertRlm = 15 | Inserts right-to-left mark (RLM) character. |
InsertRlo = 19 | Inserts start of right-to-left override (RLO) character. |
InsertShy = 29 | Inserts soft hyphen (SHY) character. |
InsertWj = 28 | Inserts word joiner (WJ) character. |
InsertZwj = 26 | Inserts zero width joiner (ZWJ) character. |
InsertZwnj = 27 | Inserts zero width non-joiner (ZWNJ) character. |
Max = 31 | Represents the size of the |
Paste = 2 | Pastes the clipboard text over the selected text (or at the cursor's position). |
Redo = 6 | Redoes the previous action. |
SelectAll = 4 | Selects the whole |
SubmenuInsertUcc = 13 | ID of "Insert Control Character" submenu. |
SubmenuTextDir = 7 | ID of "Text Writing Direction" submenu. |
Undo = 5 | Undoes the previous action. |
TextEdit.SearchFlags
| Value | Description |
|---|---|
Backwards = 4 | Search from end to beginning. |
MatchCase = 1 | Match case when searching. |
WholeWords = 2 | Match whole words when searching. |
TextEdit.SelectionMode
| Value | Description |
|---|---|
Line = 4 | Select whole lines as if the user triple clicked. |
None = 0 | Not selecting. |
Pointer = 2 | Select single characters as if the user single clicked. |
Shift = 1 | Select as if |
Word = 3 | Select whole words as if the user double clicked. |
Theme properties
These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.
| Key and type | Description |
|---|---|
background_colorColor | Sets the background Color(0, 0, 0, 0) |
caret_background_colorColor |
Color(0, 0, 0, 1) |
caret_colorColor |
Color(0.875, 0.875, 0.875, 1) |
current_line_colorColor | Background Color(0.25, 0.25, 0.26, 0.8) |
font_colorColor | Sets the font Color(0.875, 0.875, 0.875, 1) |
font_outline_colorColor | The tint of text outline of the Color(0, 0, 0, 1) |
font_placeholder_colorColor | Font color for Color(0.875, 0.875, 0.875, 0.6) |
font_readonly_colorColor | Sets the font Color(0.875, 0.875, 0.875, 0.5) |
font_selected_colorColor | Sets the Color(0, 0, 0, 0) |
search_result_border_colorColor |
Color(0.3, 0.3, 0.3, 0.4) |
search_result_colorColor |
Color(0.3, 0.3, 0.3, 1) |
selection_colorColor | Sets the highlight Color(0.5, 0.5, 0.5, 1) |
word_highlighted_colorColor | Sets the highlight Color(0.5, 0.5, 0.5, 0.25) |
caret_widthint | The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size. If set to 1 |
line_spacingint | Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative. Default:4 |
outline_sizeint | The size of the text outline.
Note: If using a font with 0 |
wrap_offsetint | Sets an additional margin for line wrapping width. Default:10 |
fontFont | Sets the default |
font_sizeint | Sets default font size. |
spaceTexture2D | Sets a custom |
tabTexture2D | Sets a custom |
caret_move_rejected_soundAudioStream | Played when a caret is attempted to be moved using the arrow keys, [kbd]Home[/kbd], [kbd]End[/kbd], [kbd]Page Up[/kbd], or [kbd]Page Down[/kbd], but none of the carets actually move since they're already at the beginning/end of the text. |
caret_moved_soundAudioStream | Played when a caret is moved using the arrow keys, [kbd]Home[/kbd], [kbd]End[/kbd], [kbd]Page Up[/kbd], [kbd]Page Down[/kbd], or mouse clicks. |
focus_soundAudioStream | Played when this |
text_change_rejected_soundAudioStream | Played when a text change is rejected (for instance, when pressing Backspace while there is no text). |
text_changed_soundAudioStream | Played when text is successfully changed through keyboard input (physical or virtual). Calling methods that alter the text programmatically will also play this sound (but not setting the |
focusStyleBox | Sets the |
normalStyleBox | |
read_onlyStyleBox | Sets the |