class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectNodeCanvasItemControl TextEdit
A multiline text editor.

A multiline text editor. It also has limited facilities for editing code, such as syntax highlighting support. For more advanced facilities for editing code, see CodeEdit.

caret_changed caret_changed<>():caret_changed

Emitted when the caret changes position.

gutter_added gutter_added<>():gutter_added

Emitted when a gutter is added.

gutter_clicked gutter_clicked<>( int line=, line:int=, int gutter=, gutter:int=, ):gutter_clicked

Emitted when a gutter is clicked.

gutter_removed gutter_removed<>():gutter_removed

Emitted when a gutter is removed.

lines_edited_from lines_edited_from<>( int from_line=, from_line:int=, int to_line=, to_line:int=, ):lines_edited_from

Emitted immediately when the text changes.

When text is added from_line will be less than to_line. On a remove to_line will be less than from_line.

text_changed text_changed<>():text_changed

Emitted when the text changes.

text_set text_set<>():text_set

Emitted when clear is called or text is set.

Enum MenuItems<>():Enum

MENU_CUT = 0

Cuts (copies and clears) the selected text.


MENU_COPY = 1

Copies the selected text.


MENU_PASTE = 2

Pastes the clipboard text over the selected text (or at the cursor's position).


MENU_CLEAR = 3

Erases the whole TextEdit text.


MENU_SELECT_ALL = 4

Selects the whole TextEdit text.


MENU_UNDO = 5

Undoes the previous action.


MENU_REDO = 6

Redoes the previous action.


MENU_SUBMENU_TEXT_DIR = 7

ID of "Text Writing Direction" submenu.


MENU_DIR_INHERITED = 8

Sets text direction to inherited.


MENU_DIR_AUTO = 9

Sets text direction to automatic.


MENU_DIR_LTR = 10

Sets text direction to left-to-right.


MENU_DIR_RTL = 11

Sets text direction to right-to-left.


MENU_DISPLAY_UCC = 12

Toggles control character display.


MENU_SUBMENU_INSERT_UCC = 13

ID of "Insert Control Character" submenu.


MENU_INSERT_LRM = 14

Inserts left-to-right mark (LRM) character.


MENU_INSERT_RLM = 15

Inserts right-to-left mark (RLM) character.


MENU_INSERT_LRE = 16

Inserts start of left-to-right embedding (LRE) character.


MENU_INSERT_RLE = 17

Inserts start of right-to-left embedding (RLE) character.


MENU_INSERT_LRO = 18

Inserts start of left-to-right override (LRO) character.


MENU_INSERT_RLO = 19

Inserts start of right-to-left override (RLO) character.


MENU_INSERT_PDF = 20

Inserts pop direction formatting (PDF) character.


MENU_INSERT_ALM = 21

Inserts Arabic letter mark (ALM) character.


MENU_INSERT_LRI = 22

Inserts left-to-right isolate (LRI) character.


MENU_INSERT_RLI = 23

Inserts right-to-left isolate (RLI) character.


MENU_INSERT_FSI = 24

Inserts first strong isolate (FSI) character.


MENU_INSERT_PDI = 25

Inserts pop direction isolate (PDI) character.


MENU_INSERT_ZWJ = 26

Inserts zero width joiner (ZWJ) character.


MENU_INSERT_ZWNJ = 27

Inserts zero width non-joiner (ZWNJ) character.


MENU_INSERT_WJ = 28

Inserts word joiner (WJ) character.


MENU_INSERT_SHY = 29

Inserts soft hyphen (SHY) character.


MENU_MAX = 30

Represents the size of the MenuItems enum.

Enum EditAction<>():Enum

ACTION_NONE = 0

No current action.


ACTION_TYPING = 1

A typing action.


ACTION_BACKSPACE = 2

A backwards delete action.


ACTION_DELETE = 3

A forward delete action.

Enum SearchFlags<>():Enum

SEARCH_MATCH_CASE = 1

Match case when searching.


SEARCH_WHOLE_WORDS = 2

Match whole words when searching.


SEARCH_BACKWARDS = 4

Search from end to beginning.

Enum CaretType<>():Enum

CARET_TYPE_LINE = 0

Vertical line caret.


CARET_TYPE_BLOCK = 1

Block caret.

Enum SelectionMode<>():Enum

SELECTION_MODE_NONE = 0

Not selecting.


SELECTION_MODE_SHIFT = 1

Select as if shift is pressed.


SELECTION_MODE_POINTER = 2

Select single characters as if the user single clicked.


SELECTION_MODE_WORD = 3

Select whole words as if the user double clicked.


SELECTION_MODE_LINE = 4

Select whole lines as if the user triple clicked.

Enum LineWrappingMode<>():Enum

LINE_WRAPPING_NONE = 0

Line wrapping is disabled.


LINE_WRAPPING_BOUNDARY = 1

Line wrapping occurs at the control boundary, beyond what would normally be visible.

Enum GutterType<>():Enum

GUTTER_TYPE_STRING = 0

Draw a string.


GUTTER_TYPE_ICON = 1

Draw an icon.


GUTTER_TYPE_CUSTOM = 2

Custom draw.

AutowrapMode autowrap_mode<>():AutowrapMode

If wrap_mode is set to LINE_WRAPPING_BOUNDARY, sets text wrapping mode. To see how each mode behaves, see AutowrapMode.

bool caret_blink<>():bool

If true, makes the caret blink.

float caret_blink_interval<>():float

The interval at which the caret blinks (in seconds).

bool caret_draw_when_editable_disabled<>():bool

If true, caret will be visible when editable is disabled.

bool caret_mid_grapheme<>():bool

Allow moving caret, selecting and removing the individual composite character components.

Note: Backspace is always removing individual composite character components.

bool caret_move_on_right_click<>():bool

If true, a right-click moves the caret at the mouse position before displaying the context menu.

If false, the context menu ignores mouse location.

bool caret_multiple<>():bool

Sets if multiple carets are allowed.

CaretType caret_type<>():CaretType

Set the type of caret to draw.

bool context_menu_enabled<>():bool

If true, a right-click displays the context menu.

bool deselect_on_focus_loss_enabled<>():bool

If true, the selected text will be deselected when focus is lost.

bool drag_and_drop_selection_enabled<>():bool

If true, allow drag and drop of selected text.

bool draw_control_chars<>():bool

If true, control characters are displayed.

bool draw_spaces<>():bool

If true, the "space" character will have a visible representation.

bool draw_tabs<>():bool

If true, the "tab" character will have a visible representation.

bool editable<>():bool

If false, existing text cannot be modified and new text cannot be added.

bool highlight_all_occurrences<>():bool

If true, all occurrences of the selected text will be highlighted.

bool highlight_current_line<>():bool

If true, the line containing the cursor is highlighted.

String language<>():String

Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.

bool middle_mouse_paste_enabled<>():bool

If false, using middle mouse button to paste clipboard will be disabled.

Note: This method is only implemented on Linux.

bool minimap_draw<>():bool

If true, a minimap is shown, providing an outline of your source code.

int minimap_width<>():int

The width, in pixels, of the minimap.

String placeholder_text<>():String

Text shown when the TextEdit is empty. It is not the TextEdit's default value (see text).

bool scroll_fit_content_height<>():bool

If true, TextEdit will disable vertical scroll and fit minimum height to the number of visible lines.

int scroll_horizontal<>():int

If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.

bool scroll_past_end_of_file<>():bool

Allow scrolling past the last line into "virtual" space.

bool scroll_smooth<>():bool

Scroll smoothly over the text rather than jumping to the next location.

float scroll_v_scroll_speed<>():float

Sets the scroll speed with the minimap or when scroll_smooth is enabled.

float scroll_vertical<>():float

If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line.

bool selecting_enabled<>():bool

If true, text can be selected.

If false, text can not be selected by the user or by the select or select_all methods.

bool shortcut_keys_enabled<>():bool

If true, shortcut keys for context menu items are enabled, even if the context menu is disabled.

StructuredTextParser structured_text_bidi_override<>():StructuredTextParser

Set BiDi algorithm override for the structured text.

Array structured_text_bidi_override_options<>():Array

Set additional options for BiDi override.

SyntaxHighlighter syntax_highlighter<>():SyntaxHighlighter

Sets the SyntaxHighlighter to use.

String text<>():String

String value of the TextEdit.

TextDirection text_direction<>():TextDirection

Base text writing direction.

bool virtual_keyboard_enabled<>():bool

If true, the native virtual keyboard is shown when focused on platforms that support it.

LineWrappingMode wrap_mode<>():LineWrappingMode

Sets the line wrapping mode to use.

void _backspace<>( int caret_index=, caret_index:int=, ):void

Override this method to define what happens when the user presses the backspace key.

void _copy<>( int caret_index=, caret_index:int=, ):void

Override this method to define what happens when the user performs a copy operation.

void _cut<>( int caret_index=, caret_index:int=, ):void

Override this method to define what happens when the user performs a cut operation.

void _handle_unicode_input<>( int unicode_char=, unicode_char:int=, int caret_index=, caret_index:int=, ):void

Override this method to define what happens when the user types in the provided key unicode_char.

void _paste<>( int caret_index=, caret_index:int=, ):void

Override this method to define what happens when the user performs a paste operation.

void _paste_primary_clipboard<>( int caret_index=, caret_index:int=, ):void

Override this method to define what happens when the user performs a paste operation with middle mouse button.

Note: This method is only implemented on Linux.

int add_caret<>( int line=, line:int=, int col=, col:int=, ):int

Adds a new caret at the given location. Returns the index of the new caret, or -1 if the location is invalid.

void add_caret_at_carets<>( bool below=, below:bool=, ):void

Adds an additional caret above or below every caret. If below is true the new caret will be added below and above otherwise.

void add_gutter<>( int=, int:=, ):void

Register a new gutter to this TextEdit. Use at to have a specific gutter order. A value of -1 appends the gutter to the right.

void add_selection_for_next_occurrence<>():void

Adds a selection and a caret for the next occurrence of the current selection. If there is no active selection, selects word under caret.

void adjust_carets_after_edit<>( int caret=, caret:int=, int from_line=, from_line:int=, int from_col=, from_col:int=, int to_line=, to_line:int=, int to_col=, to_col:int=, ):void

Reposition the carets affected by the edit. This assumes edits are applied in edit order, see get_caret_index_edit_order.

void adjust_viewport_to_caret<>( int caret_index=0, caret_index:int=0, ):void

Adjust the viewport so the caret is visible.

void backspace<>( int=, int:=, ):void

Called when the user presses the backspace key. Can be overridden with _backspace.

void begin_complex_operation<>():void

Starts a multipart edit. All edits will be treated as one action until end_complex_operation is called.

void center_viewport_to_caret<>( int caret_index=0, caret_index:int=0, ):void

Centers the viewport on the line the editing caret is at. This also resets the scroll_horizontal value to 0.

void clear<>():void

Performs a full reset of TextEdit, including undo history.

void clear_undo_history<>():void

Clears the undo history.

void copy<>( int=, int:=, ):void

Copies the current text selection. Can be overridden with _copy.

void cut<>( int=, int:=, ):void

Cut's the current selection. Can be overridden with _cut.

void delete_selection<>( int=, int:=, ):void

Deletes the selected text.

void deselect<>( int=, int:=, ):void

Deselects the current selection.

void end_action<>():void

Marks the end of steps in the current action started with start_action.

void end_complex_operation<>():void

Ends a multipart edit, started with begin_complex_operation. If called outside a complex operation, the current operation is pushed onto the undo/redo stack.

int get_caret_column<>( int caret_index=0, caret_index:int=0, ):int

Returns the column the editing caret is at.

int get_caret_count<>():int

Returns the number of carets in this TextEdit.

Vector2 get_caret_draw_pos<>( int caret_index=0, caret_index:int=0, ):Vector2

Returns the caret pixel draw position.

PackedInt32Array get_caret_index_edit_order<>():PackedInt32Array

Returns a list of caret indexes in their edit order, this done from bottom to top. Edit order refers to the way actions such as insert_text_at_caret are applied.

int get_caret_line<>( int caret_index=0, caret_index:int=0, ):int

Returns the line the editing caret is on.

int get_caret_wrap_index<>( int caret_index=0, caret_index:int=0, ):int

Returns the wrap index the editing caret is on.

int get_first_non_whitespace_column<>( int line=, line:int=, ):int

Returns the first column containing a non-whitespace character.

int get_first_visible_line<>():int

Returns the first visible line.

int get_gutter_count<>():int

Returns the number of gutters registered.

String get_gutter_name<>( int gutter=, gutter:int=, ):String

Returns the name of the gutter at the given index.

GutterType get_gutter_type<>( int gutter=, gutter:int=, ):GutterType

Returns the type of the gutter at the given index.

int get_gutter_width<>( int gutter=, gutter:int=, ):int

Returns the width of the gutter at the given index.

HScrollBar get_h_scroll_bar<>():HScrollBar

Returns the HScrollBar used by TextEdit.

int get_indent_level<>( int line=, line:int=, ):int

Returns the number of spaces and tab * tab_size before the first char.

int get_last_full_visible_line<>():int

Returns the last visible line. Use get_last_full_visible_line_wrap_index for the wrap index.

int get_last_full_visible_line_wrap_index<>():int

Returns the last visible wrap index of the last visible line.

int get_last_unhidden_line<>():int

Returns the last unhidden line in the entire TextEdit.

String get_line<>( int line=, line:int=, ):String

Returns the text of a specific line.

Color get_line_background_color<>( int line=, line:int=, ):Color

Returns the current background color of the line. Color(0, 0, 0, 0) is returned if no color is set.

Vector2i get_line_column_at_pos<>( Vector2i position=, position:Vector2i=, bool allow_out_of_bounds=true, allow_out_of_bounds:bool=true, ):Vector2i

Returns the line and column at the given position. In the returned vector, x is the column, y is the line. If allow_out_of_bounds is false and the position is not over the text, both vector values will be set to -1.

int get_line_count<>():int

Returns the number of lines in the text.

Texture2D get_line_gutter_icon<>( int line=, line:int=, int gutter=, gutter:int=, ):Texture2D

Returns the icon currently in gutter at line.

Color get_line_gutter_item_color<>( int line=, line:int=, int gutter=, gutter:int=, ):Color

Returns the color currently in gutter at line.

Variant get_line_gutter_metadata<>( int line=, line:int=, int gutter=, gutter:int=, ):Variant

Returns the metadata currently in gutter at line.

String get_line_gutter_text<>( int line=, line:int=, int gutter=, gutter:int=, ):String

Returns the text currently in gutter at line.

int get_line_height<>():int

Returns the maximum value of the line height among all lines.

Note: The return value is influenced by line_spacing and font_size. And it will not be less than 1.

int get_line_width<>( int line=, line:int=, int=, int:=, ):int

Returns the width in pixels of the wrap_index on line.

int get_line_wrap_count<>( int line=, line:int=, ):int

Returns the number of times the given line is wrapped.

int get_line_wrap_index_at_column<>( int line=, line:int=, int column=, column:int=, ):int

Returns the wrap index of the given line column.

PackedStringArray get_line_wrapped_text<>( int line=, line:int=, ):PackedStringArray

Returns an array of Strings representing each wrapped index.

Vector2 get_local_mouse_pos<>():Vector2

Returns the local mouse position adjusted for the text direction.

PopupMenu get_menu<>():PopupMenu

Returns the PopupMenu of this TextEdit. By default, this menu is displayed when right-clicking on the TextEdit.

You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see MenuItems). For example:

func _ready(): var menu = get_menu() # Remove all items after "Redo". menu.item_count = menu.get_item_index(MENU_REDO) + 1 # Add custom items. menu.add_separator() menu.add_item("Insert Date", MENU_MAX + 1) # Connect callback. menu.id_pressed.connect(_on_item_pressed) func _on_item_pressed(id): if id == MENU_MAX + 1: insert_text_at_caret(Time.get_date_string_from_system())

Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their Window.visible property.

int get_minimap_line_at_pos<>( Vector2i position=, position:Vector2i=, ):int

Returns the equivalent minimap line at position.

int get_minimap_visible_lines<>():int

Returns the number of lines that may be drawn on the minimap.

Vector2i get_next_visible_line_index_offset_from<>( int line=, line:int=, int wrap_index=, wrap_index:int=, int visible_amount=, visible_amount:int=, ):Vector2i

Similar to get_next_visible_line_offset_from, but takes into account the line wrap indexes. In the returned vector, x is the line, y is the wrap index.

int get_next_visible_line_offset_from<>( int line=, line:int=, int visible_amount=, visible_amount:int=, ):int

Returns the count to the next visible line from line to line + visible_amount. Can also count backwards. For example if a TextEdit has 5 lines with lines 2 and 3 hidden, calling this with line = 1, visible_amount = 1 would return 3.

Vector2i get_pos_at_line_column<>( int line=, line:int=, int column=, column:int=, ):Vector2i

Returns the local position for the given line and column. If x or y of the returned vector equal -1, the position is outside of the viewable area of the control.

Note: The Y position corresponds to the bottom side of the line. Use get_rect_at_line_column to get the top side position.

Rect2i get_rect_at_line_column<>( int line=, line:int=, int column=, column:int=, ):Rect2i

Returns the local position and size for the grapheme at the given line and column. If x or y position of the returned rect equal -1, the position is outside of the viewable area of the control.

Note: The Y position of the returned rect corresponds to the top side of the line, unlike get_pos_at_line_column which returns the bottom side.

int get_saved_version<>():int

Returns the last tagged saved version from tag_saved_version.

float get_scroll_pos_for_line<>( int line=, line:int=, int wrap_index=0, wrap_index:int=0, ):float

Returns the scroll position for wrap_index of line.

String get_selected_text<>( int=, int:=, ):String

Returns the text inside the selection of a caret, or all the carets if caret_index is its default value -1.

int get_selection_column<>( int caret_index=0, caret_index:int=0, ):int

Returns the original start column of the selection.

int get_selection_from_column<>( int caret_index=0, caret_index:int=0, ):int

Returns the selection begin column.

int get_selection_from_line<>( int caret_index=0, caret_index:int=0, ):int

Returns the selection begin line.

int get_selection_line<>( int caret_index=0, caret_index:int=0, ):int

Returns the original start line of the selection.

SelectionMode get_selection_mode<>():SelectionMode

Returns the current selection mode.

int get_selection_to_column<>( int caret_index=0, caret_index:int=0, ):int

Returns the selection end column.

int get_selection_to_line<>( int caret_index=0, caret_index:int=0, ):int

Returns the selection end line.

int get_tab_size<>():int

Returns the TextEdit's' tab size.

int get_total_gutter_width<>():int

Returns the total width of all gutters and internal padding.

int get_total_visible_line_count<>():int

Returns the number of lines that may be drawn.

VScrollBar get_v_scroll_bar<>():VScrollBar

Returns the VScrollBar of the TextEdit.

int get_version<>():int

Returns the current version of the TextEdit. The version is a count of recorded operations by the undo/redo history.

int get_visible_line_count<>():int

Returns the number of visible lines, including wrapped text.

int get_visible_line_count_in_range<>( int from_line=, from_line:int=, int to_line=, to_line:int=, ):int

Returns the total number of visible + wrapped lines between the two lines.

String get_word_at_pos<>( Vector2 position=, position:Vector2=, ):String

Returns the word at position.

String get_word_under_caret<>( int=, int:=, ):String

Returns a String text with the word under the caret's location.

bool has_ime_text<>():bool

Returns if the user has IME text.

bool has_redo<>():bool

Returns true if a "redo" action is available.

bool has_selection<>( int=, int:=, ):bool

Returns true if the user has selected text.

bool has_undo<>():bool

Returns true if an "undo" action is available.

void insert_line_at<>( int line=, line:int=, String text=, text:String=, ):void

Inserts a new line with text at line.

void insert_text_at_caret<>( String text=, text:String=, int=, int:=, ):void

Insert the specified text at the caret position.

bool is_caret_visible<>( int caret_index=0, caret_index:int=0, ):bool

Returns true if the caret is visible on the screen.

bool is_dragging_cursor<>():bool

Returns true if the user is dragging their mouse for scrolling or selecting.

bool is_gutter_clickable<>( int gutter=, gutter:int=, ):bool

Returns whether the gutter is clickable.

bool is_gutter_drawn<>( int gutter=, gutter:int=, ):bool

Returns whether the gutter is currently drawn.

bool is_gutter_overwritable<>( int gutter=, gutter:int=, ):bool

Returns whether the gutter is overwritable.

bool is_line_gutter_clickable<>( int line=, line:int=, int gutter=, gutter:int=, ):bool

Returns whether the gutter on the given line is clickable.

bool is_line_wrapped<>( int line=, line:int=, ):bool

Returns if the given line is wrapped.

bool is_menu_visible<>():bool

Returns whether the menu is visible. Use this instead of get_menu().visible to improve performance (so the creation of the menu is avoided).

bool is_mouse_over_selection<>( bool edges=, edges:bool=, int=, int:=, ):bool

Returns whether the mouse is over selection. If edges is true, the edges are considered part of the selection.

bool is_overtype_mode_enabled<>():bool

Returns whether the user is in overtype mode.

void menu_option<>( int option=, option:int=, ):void

Executes a given action as defined in the MenuItems enum.

void merge_gutters<>( int from_line=, from_line:int=, int to_line=, to_line:int=, ):void

Merge the gutters from from_line into to_line. Only overwritable gutters will be copied.

void merge_overlapping_carets<>():void

Merges any overlapping carets. Will favor the newest caret, or the caret with a selection.

Note: This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap.

void paste<>( int=, int:=, ):void

Paste at the current location. Can be overridden with _paste.

void paste_primary_clipboard<>( int=, int:=, ):void

Pastes the primary clipboard.

void redo<>():void

Perform redo operation.

void remove_caret<>( int caret=, caret:int=, ):void

Removes the given caret index.

Note: This can result in adjustment of all other caret indices.

void remove_gutter<>( int gutter=, gutter:int=, ):void

Removes the gutter from this TextEdit.

void remove_secondary_carets<>():void

Removes all additional carets.

void remove_text<>( int from_line=, from_line:int=, int from_column=, from_column:int=, int to_line=, to_line:int=, int to_column=, to_column:int=, ):void

Removes text between the given positions.

Note: This does not adjust the caret or selection, which as a result it can end up in an invalid position.

Vector2i search<>( String text=, text:String=, int flags=, flags:int=, int from_line=, from_line:int=, int from_colum=, from_colum:int=, ):Vector2i

Perform a search inside the text. Search flags can be specified in the SearchFlags enum.

In the returned vector, x is the column, y is the line. If no results are found, both are equal to -1.

var result = search("print", SEARCH_WHOLE_WORDS, 0, 0) if result.x != -1: # Result found. var line_number = result.y var column_number = result.x
void select<>( int from_line=, from_line:int=, int from_column=, from_column:int=, int to_line=, to_line:int=, int to_column=, to_column:int=, int caret_index=0, caret_index:int=0, ):void

Perform selection, from line/column to line/column.

If selecting_enabled is false, no selection will occur.

void select_all<>():void

Select all the text.

If selecting_enabled is false, no selection will occur.

void select_word_under_caret<>( int=, int:=, ):void

Selects the word under the caret.

void set_caret_column<>( int column=, column:int=, bool adjust_viewport=true, adjust_viewport:bool=true, int caret_index=0, caret_index:int=0, ):void

Moves the caret to the specified column index.

If adjust_viewport is true, the viewport will center at the caret position after the move occurs.

Note: If supporting multiple carets this will not check for any overlap. See merge_overlapping_carets.

void set_caret_line<>( int line=, line:int=, bool adjust_viewport=true, adjust_viewport:bool=true, bool can_be_hidden=true, can_be_hidden:bool=true, int wrap_index=0, wrap_index:int=0, int caret_index=0, caret_index:int=0, ):void

Moves the caret to the specified line index.

If adjust_viewport is true, the viewport will center at the caret position after the move occurs.

If can_be_hidden is true, the specified line can be hidden.

Note: If supporting multiple carets this will not check for any overlap. See merge_overlapping_carets.

void set_gutter_clickable<>( int gutter=, gutter:int=, bool clickable=, clickable:bool=, ):void

Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter.

void set_gutter_custom_draw<>( int column=, column:int=, Callable draw_callback=, draw_callback:Callable=, ):void

Set a custom draw method for the gutter. The callback method must take the following args: line: int, gutter: int, Area: Rect2.

void set_gutter_draw<>( int gutter=, gutter:int=, bool draw=, draw:bool=, ):void

Sets whether the gutter should be drawn.

void set_gutter_name<>( int gutter=, gutter:int=, String name=, name:String=, ):void

Sets the name of the gutter.

void set_gutter_overwritable<>( int gutter=, gutter:int=, bool overwritable=, overwritable:bool=, ):void

Sets the gutter to overwritable. See merge_gutters.

void set_gutter_type<>( int gutter=, gutter:int=, GutterType type=, type:GutterType=, ):void

Sets the type of gutter.

void set_gutter_width<>( int gutter=, gutter:int=, int width=, width:int=, ):void

Set the width of the gutter.

void set_line<>( int line=, line:int=, String new_text=, new_text:String=, ):void

Sets the text for a specific line.

void set_line_as_center_visible<>( int line=, line:int=, int wrap_index=0, wrap_index:int=0, ):void

Positions the wrap_index of line at the center of the viewport.

void set_line_as_first_visible<>( int line=, line:int=, int wrap_index=0, wrap_index:int=0, ):void

Positions the wrap_index of line at the top of the viewport.

void set_line_as_last_visible<>( int line=, line:int=, int wrap_index=0, wrap_index:int=0, ):void

Positions the wrap_index of line at the bottom of the viewport.

void set_line_background_color<>( int line=, line:int=, Color color=, color:Color=, ):void

Sets the current background color of the line. Set to Color(0, 0, 0, 0) for no color.

void set_line_gutter_clickable<>( int line=, line:int=, int gutter=, gutter:int=, bool clickable=, clickable:bool=, ):void

If clickable is true, makes the gutter on line clickable. See gutter_clicked.

void set_line_gutter_icon<>( int line=, line:int=, int gutter=, gutter:int=, Texture2D icon=, icon:Texture2D=, ):void

Sets the icon for gutter on line to icon.

void set_line_gutter_item_color<>( int line=, line:int=, int gutter=, gutter:int=, Color color=, color:Color=, ):void

Sets the color for gutter on line to color.

void set_line_gutter_metadata<>( int line=, line:int=, int gutter=, gutter:int=, Variant metadata=, metadata:Variant=, ):void

Sets the metadata for gutter on line to metadata.

void set_line_gutter_text<>( int line=, line:int=, int gutter=, gutter:int=, String text=, text:String=, ):void

Sets the text for gutter on line to text.

void set_overtype_mode_enabled<>( bool enabled=, enabled:bool=, ):void

If true, sets the user into overtype mode. When the user types in this mode, it will override existing text.

void set_search_flags<>( int flags=, flags:int=, ):void

Sets the search flags. This is used with set_search_text to highlight occurrences of the searched text. Search flags can be specified from the SearchFlags enum.

void set_search_text<>( String search_text=, search_text:String=, ):void

Sets the search text. See set_search_flags.

void set_selection_mode<>( SelectionMode mode=, mode:SelectionMode=, int=, int:=, int=, int:=, int caret_index=0, caret_index:int=0, ):void

Sets the current selection mode.

void set_tab_size<>( int size=, size:int=, ):void

Sets the tab size for the TextEdit to use.

void set_tooltip_request_func<>( Callable callback=, callback:Callable=, ):void

Provide custom tooltip text. The callback method must take the following args: hovered_word: String.

void start_action<>( EditAction action=, action:EditAction=, ):void

Starts an action, will end the current action if action is different.

An action will also end after a call to end_action, after ProjectSettings.gui/timers/text_edit_idle_detect_sec is triggered or a new undoable step outside the start_action and end_action calls.

void swap_lines<>( int from_line=, from_line:int=, int to_line=, to_line:int=, ):void

Swaps the two lines.

void tag_saved_version<>():void

Tag the current version as saved.

void undo<>():void

Perform undo operation.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...