2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2020-02-01 02:03:48 +01:00
<class name= "TextEdit" inherits= "Control" version= "4.0" >
2017-09-12 22:42:36 +02:00
<brief_description >
Multiline text editing control.
</brief_description>
<description >
TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
2021-05-10 01:27:54 +02:00
[b]Note:[/b] When holding down [kbd]Alt[/kbd], the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor.
2017-09-12 22:42:36 +02:00
</description>
<tutorials >
</tutorials>
<methods >
2021-06-15 16:05:01 +02:00
<method name= "_backspace" qualifiers= "virtual" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2021-06-15 16:05:01 +02:00
<description >
2021-07-10 15:01:25 +02:00
Override this method to define what happens when the user presses the backspace key.
2021-07-08 17:48:58 +02:00
</description>
</method>
<method name= "_copy" qualifiers= "virtual" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
2021-07-08 17:48:58 +02:00
<description >
2021-07-10 15:01:25 +02:00
Override this method to define what happens when the user performs a copy operation.
2021-07-08 17:48:58 +02:00
</description>
</method>
<method name= "_cut" qualifiers= "virtual" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
2021-07-08 17:48:58 +02:00
<description >
2021-07-10 15:01:25 +02:00
Override this method to define what happens when the user performs a cut operation.
2021-06-15 16:05:01 +02:00
</description>
</method>
2021-06-28 18:14:44 +02:00
<method name= "_handle_unicode_input" qualifiers= "virtual" >
2021-07-01 18:40:59 +02:00
<return type= "void" />
2021-08-22 03:52:44 +02:00
<argument index= "0" name= "unicode_char" type= "int" />
2021-06-28 18:14:44 +02:00
<description >
2021-07-10 15:01:25 +02:00
Override this method to define what happens when the types in the provided key [code]unicode[/code].
2021-07-08 17:48:58 +02:00
</description>
</method>
<method name= "_paste" qualifiers= "virtual" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
2021-07-08 17:48:58 +02:00
<description >
2021-07-10 15:01:25 +02:00
Override this method to define what happens when the user performs a paste operation.
2021-06-28 18:14:44 +02:00
</description>
</method>
2021-10-12 09:43:50 +02:00
<method name= "_paste_primary_clipboard" qualifiers= "virtual" >
<return type= "void" />
<description >
Override this method to define what happens when the user performs a paste operation with middle mouse button.
[b]Note:[/b] This method is only implemented on Linux.
</description>
</method>
2020-09-11 12:22:10 +02:00
<method name= "add_gutter" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "at" type= "int" default= "-1" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Register a new gutter to this [TextEdit]. Use [code]at[/code] to have a specific gutter order. A value of [code]-1[/code] appends the gutter to the right.
2020-09-11 12:22:10 +02:00
</description>
</method>
2021-07-09 18:27:09 +02:00
<method name= "adjust_viewport_to_caret" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
2021-07-09 18:27:09 +02:00
<description >
Adjust the viewport so the caret is visible.
</description>
</method>
2021-06-15 16:05:01 +02:00
<method name= "backspace" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2021-06-15 16:05:01 +02:00
<description >
2021-07-10 15:01:25 +02:00
Called when the user presses the backspace key. Can be overridden with [method _backspace].
</description>
</method>
<method name= "begin_complex_operation" >
<return type= "void" />
<description >
Starts a multipart edit. All edits will be treated as one action until [method end_complex_operation] is called.
2021-06-15 16:05:01 +02:00
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "center_viewport_to_caret" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
2019-06-24 10:39:59 +02:00
<description >
2021-07-10 15:01:25 +02:00
Centers the viewport on the line the editing caret is at. This also resets the [member scroll_horizontal] value to [code]0[/code].
</description>
</method>
<method name= "clear" >
<return type= "void" />
<description >
Performs a full reset of [TextEdit], including undo history.
2019-06-24 10:39:59 +02:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "clear_opentype_features" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2020-08-12 13:49:10 +02:00
<description >
Removes all OpenType features.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "clear_undo_history" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-13 11:12:52 +02:00
Clears the undo history.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "copy" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
2021-07-10 15:01:25 +02:00
Copies the current text selection. Can be overridden with [method _copy].
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "cut" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
2021-07-10 15:01:25 +02:00
Cut's the current selection. Can be overridden with [method _cut].
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "delete_selection" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
2021-07-10 15:01:25 +02:00
Deletes the selected text.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "deselect" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
2021-07-08 19:35:56 +02:00
Deselects the current selection.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "end_complex_operation" >
<return type= "void" />
<description >
Ends a multipart edit, started with [method begin_complex_operation]. If called outside a complex operation, the current operation is pushed onto the undo/redo stack.
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "get_caret_column" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2021-07-08 19:35:56 +02:00
Returns the column the editing caret is at.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "get_caret_draw_pos" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "Vector2" />
2021-06-15 16:05:01 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the caret pixel draw position.
2021-06-15 16:05:01 +02:00
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "get_caret_line" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
2017-12-16 20:34:16 +01:00
<description >
2021-07-08 19:35:56 +02:00
Returns the line the editing caret is on.
2017-12-16 20:34:16 +01:00
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "get_caret_wrap_index" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
2021-05-22 16:11:04 +02:00
<description >
2021-07-08 19:35:56 +02:00
Returns the wrap index the editing caret is on.
2021-05-22 16:11:04 +02:00
</description>
</method>
2021-06-15 16:05:01 +02:00
<method name= "get_first_non_whitespace_column" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
<argument index= "0" name= "line" type= "int" />
2021-06-15 16:05:01 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the first column containing a non-whitespace character.
2021-06-15 16:05:01 +02:00
</description>
</method>
2021-07-09 18:27:09 +02:00
<method name= "get_first_visible_line" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
2021-07-09 18:27:09 +02:00
<description >
Returns the first visible line.
</description>
</method>
2020-09-11 12:22:10 +02:00
<method name= "get_gutter_count" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the total amount of gutters registered.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "get_gutter_name" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
<argument index= "0" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the name of the gutter at the given index.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "get_gutter_type" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "TextEdit.GutterType" />
<argument index= "0" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the type of the gutter at the given index.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "get_gutter_width" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
<argument index= "0" name= "gutter" type= "int" />
2018-05-30 14:02:51 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the width of the gutter at the given index.
2018-05-30 14:02:51 +02:00
</description>
</method>
2021-06-15 16:05:01 +02:00
<method name= "get_indent_level" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
<argument index= "0" name= "line" type= "int" />
2021-06-15 16:05:01 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the amount of spaces and [code]tab * tab_size[/code] before the first char.
2021-06-15 16:05:01 +02:00
</description>
</method>
2021-07-09 18:27:09 +02:00
<method name= "get_last_full_visible_line" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
2021-07-09 18:27:09 +02:00
<description >
2022-01-02 18:32:49 +01:00
Returns the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index.
2021-07-09 18:27:09 +02:00
</description>
</method>
<method name= "get_last_full_visible_line_wrap_index" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
2021-07-09 18:27:09 +02:00
<description >
Returns the last visible wrap index of the last visible line.
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "get_last_unhidden_line" qualifiers= "const" >
<return type= "int" />
<description >
Returns the last unhidden line in the entire [TextEdit].
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "get_line" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
<argument index= "0" name= "line" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the text of a specific line.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "get_line_background_color" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Color" />
<argument index= "0" name= "line" type= "int" />
2020-09-10 22:25:00 +02:00
<description >
Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set.
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "get_line_column_at_pos" qualifiers= "const" >
<return type= "Vector2i" />
<argument index= "0" name= "position" type= "Vector2i" />
2021-10-31 19:34:54 +01:00
<argument index= "1" name= "allow_out_of_bounds" type= "bool" default= "true" />
2021-07-10 15:01:25 +02:00
<description >
2021-10-31 19:34:54 +01:00
Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If [code]allow_out_of_bounds[/code] is [code]false[/code] and the position is not over the text, both vector values will be set to [code]-1[/code].
2021-07-10 15:01:25 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "get_line_count" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the amount of total lines in the text.
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-09-11 12:22:10 +02:00
<method name= "get_line_gutter_icon" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Texture2D" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the icon currently in [code]gutter[/code] at [code]line[/code].
2020-09-11 12:22:10 +02:00
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "get_line_gutter_item_color" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Color" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the color currently in [code]gutter[/code] at [code]line[/code].
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "get_line_gutter_metadata" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Variant" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the metadata currently in [code]gutter[/code] at [code]line[/code].
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "get_line_gutter_text" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the text currently in [code]gutter[/code] at [code]line[/code].
</description>
</method>
<method name= "get_line_height" qualifiers= "const" >
<return type= "int" />
<description >
Returns the height of a largest line.
</description>
</method>
<method name= "get_line_width" qualifiers= "const" >
<return type= "int" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "wrap_index" type= "int" default= "-1" />
<description >
Returns the width in pixels of the [code]wrap_index[/code] on [code]line[/code].
2020-09-11 12:22:10 +02:00
</description>
</method>
2021-07-09 12:52:49 +02:00
<method name= "get_line_wrap_count" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
<argument index= "0" name= "line" type= "int" />
2021-07-09 12:52:49 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the number of times the given line is wrapped.
2021-07-09 12:52:49 +02:00
</description>
</method>
<method name= "get_line_wrap_index_at_column" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "column" type= "int" />
2021-07-09 12:52:49 +02:00
<description >
Returns the wrap index of the given line column.
</description>
</method>
<method name= "get_line_wrapped_text" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "PackedStringArray" />
<argument index= "0" name= "line" type= "int" />
<description >
Returns an array of [String]s representing each wrapped index.
</description>
</method>
<method name= "get_local_mouse_pos" qualifiers= "const" >
<return type= "Vector2" />
2021-07-09 12:52:49 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the local mouse position adjusted for the text direction.
2021-07-09 12:52:49 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "get_menu" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "PopupMenu" />
2017-09-12 22:42:36 +02:00
<description >
2019-04-24 09:59:17 +02:00
Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit].
2021-10-10 21:28:56 +02:00
[b]Warning:[/b] 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 [member Window.visible] property.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "get_minimap_line_at_pos" qualifiers= "const" >
<return type= "int" />
<argument index= "0" name= "position" type= "Vector2i" />
<description >
Returns the equivalent minimap line at [code]position[/code]
</description>
</method>
2021-07-09 18:27:09 +02:00
<method name= "get_minimap_visible_lines" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
2021-07-09 18:27:09 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the total amount of lines that can be draw on the minimap.
</description>
</method>
<method name= "get_next_visible_line_index_offset_from" qualifiers= "const" >
<return type= "Vector2i" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "wrap_index" type= "int" />
<argument index= "2" name= "visible_amount" type= "int" />
<description >
Similar to [method get_next_visible_line_offset_from], but takes into account the line wrap indexes. In the returned vector, [code]x[/code] is the line, [code]y[/code] is the wrap index.
</description>
</method>
<method name= "get_next_visible_line_offset_from" qualifiers= "const" >
<return type= "int" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "visible_amount" type= "int" />
<description >
Returns the count to the next visible line from [code]line[/code] to [code]line + visible_amount[/code]. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with [code]line = 1, visible_amount = 1[/code] would return 3.
2021-07-09 18:27:09 +02:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "get_opentype_feature" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
<argument index= "0" name= "tag" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
Returns OpenType feature [code]tag[/code].
</description>
</method>
2021-11-18 16:55:43 +01:00
<method name= "get_pos_at_line_column" qualifiers= "const" >
<return type= "Vector2i" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "column" type= "int" />
<description >
Returns the local position for the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] of the returned vector equal [code]-1[/code], the position is outside of the viewable area of the control.
[b]Note:[/b] The Y position corresponds to the bottom side of the line. Use [method get_rect_at_line_column] to get the top side position.
</description>
</method>
<method name= "get_rect_at_line_column" qualifiers= "const" >
<return type= "Rect2i" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "column" type= "int" />
<description >
Returns the local position and size for the grapheme at the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] position of the returned rect equal [code]-1[/code], the position is outside of the viewable area of the control.
[b]Note:[/b] The Y position of the returned rect corresponds to the top side of the line, unlike [method get_pos_at_line_column] which returns the bottom side.
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "get_saved_version" qualifiers= "const" >
<return type= "int" />
<description >
Returns the last tagged saved version from [method tag_saved_version]
</description>
</method>
2021-07-09 18:27:09 +02:00
<method name= "get_scroll_pos_for_line" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "float" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "wrap_index" type= "int" default= "0" />
2021-07-09 18:27:09 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the scroll position for [code]wrap_index[/code] of [code]line[/code].
2021-07-09 18:27:09 +02:00
</description>
</method>
<method name= "get_selected_text" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "String" />
2021-07-09 18:27:09 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the text inside the selection.
2021-07-09 18:27:09 +02:00
</description>
</method>
2020-11-04 15:38:26 +01:00
<method name= "get_selection_column" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2020-11-04 15:38:26 +01:00
<description >
2021-07-10 15:01:25 +02:00
Returns the original start column of the selection.
2020-11-04 15:38:26 +01:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "get_selection_from_column" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the selection begin column.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "get_selection_from_line" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the selection begin line.
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-11-04 15:38:26 +01:00
<method name= "get_selection_line" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2020-11-04 15:38:26 +01:00
<description >
2021-07-10 15:01:25 +02:00
Returns the original start line of the selection.
2020-11-04 15:38:26 +01:00
</description>
</method>
<method name= "get_selection_mode" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "TextEdit.SelectionMode" />
2020-11-04 15:38:26 +01:00
<description >
2021-07-10 15:01:25 +02:00
Returns the current selection mode.
2020-11-04 15:38:26 +01:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "get_selection_to_column" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the selection end column.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "get_selection_to_line" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the selection end line.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-06-15 16:05:01 +02:00
<method name= "get_tab_size" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2021-06-15 16:05:01 +02:00
<description >
2021-07-06 13:22:53 +02:00
Returns the [TextEdit]'s' tab size.
2021-06-15 16:05:01 +02:00
</description>
2021-06-30 19:03:32 +02:00
</method>
<method name= "get_total_gutter_width" qualifiers= "const" >
2021-07-01 18:40:59 +02:00
<return type= "int" />
2021-06-30 19:03:32 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the total width of all gutters and internal padding.
2021-06-30 19:03:32 +02:00
</description>
2021-06-15 16:05:01 +02:00
</method>
2021-07-09 18:27:09 +02:00
<method name= "get_total_visible_line_count" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "int" />
2021-07-09 18:27:09 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns the total amount of lines that could be draw.
</description>
</method>
<method name= "get_version" qualifiers= "const" >
<return type= "int" />
<description >
Returns the current version of the [TextEdit]. The version is a count of recorded operations by the undo/redo history.
2021-07-09 18:27:09 +02:00
</description>
</method>
2021-05-07 11:21:04 +02:00
<method name= "get_visible_line_count" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2021-05-07 11:21:04 +02:00
<description >
Returns the number of visible lines, including wrapped text.
</description>
</method>
2021-10-31 19:34:54 +01:00
<method name= "get_visible_line_count_in_range" qualifiers= "const" >
<return type= "int" />
<argument index= "0" name= "from_line" type= "int" />
<argument index= "1" name= "to_line" type= "int" />
<description >
Returns the total number of visible + wrapped lines between the two lines.
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "get_word_at_pos" qualifiers= "const" >
<return type= "String" />
<argument index= "0" name= "position" type= "Vector2" />
<description >
Returns the word at [code]position[/code].
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "get_word_under_caret" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "String" />
<description >
Returns a [String] text with the word under the caret's location.
</description>
</method>
<method name= "has_ime_text" qualifiers= "const" >
<return type= "bool" />
2017-09-12 22:42:36 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns if the user has IME text.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-08-17 05:41:46 +02:00
<method name= "has_redo" qualifiers= "const" >
<return type= "bool" />
<description >
Returns [code]true[/code] if a "redo" action is available.
</description>
</method>
2021-07-09 13:42:55 +02:00
<method name= "has_selection" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "bool" />
2021-07-09 13:42:55 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns [code]true[/code] if the user has selected text.
</description>
</method>
2021-08-17 05:41:46 +02:00
<method name= "has_undo" qualifiers= "const" >
<return type= "bool" />
<description >
Returns [code]true[/code] if an "undo" action is available.
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "insert_line_at" >
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "text" type= "String" />
<description >
Inserts a new line with [code]text[/code] at [code]line[/code].
2021-07-09 13:42:55 +02:00
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "insert_text_at_caret" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
<argument index= "0" name= "text" type= "String" />
2017-09-12 22:42:36 +02:00
<description >
2021-07-08 19:35:56 +02:00
Insert the specified text at the caret position.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-05-22 16:11:04 +02:00
<method name= "is_caret_visible" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2021-05-22 16:11:04 +02:00
<description >
Returns [code]true[/code] if the caret is visible on the screen.
</description>
</method>
2021-07-01 18:10:54 +02:00
<method name= "is_dragging_cursor" qualifiers= "const" >
2021-07-01 18:40:59 +02:00
<return type= "bool" />
2021-07-01 18:10:54 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns [code]true[/code] if the user is dragging their mouse for scrolling or selecting.
2021-07-01 18:10:54 +02:00
</description>
</method>
2020-09-11 12:22:10 +02:00
<method name= "is_gutter_clickable" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns whether the gutter is clickable.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "is_gutter_drawn" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns whether the gutter is currently drawn.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "is_gutter_overwritable" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns whether the gutter is overwritable.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "is_line_gutter_clickable" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns whether the gutter on the given line is clickable.
2020-09-11 12:22:10 +02:00
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "is_line_wrapped" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2021-07-10 15:01:25 +02:00
<argument index= "0" name= "line" type= "int" />
2021-07-16 23:36:05 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns if the given line is wrapped.
2021-07-16 23:36:05 +02:00
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "is_menu_visible" qualifiers= "const" >
<return type= "bool" />
2021-07-09 12:52:49 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided).
2021-07-09 12:52:49 +02:00
</description>
</method>
2021-11-24 22:22:40 +01:00
<method name= "is_mouse_over_selection" qualifiers= "const" >
<return type= "bool" />
<argument index= "0" name= "edges" type= "bool" />
<description >
Returns whether the mouse is over selection. If [code]edges[/code] is [code]true[/code], the edges are considered part of the selection.
</description>
</method>
2021-07-09 14:40:05 +02:00
<method name= "is_overtype_mode_enabled" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "bool" />
2021-07-09 14:40:05 +02:00
<description >
2021-07-10 15:01:25 +02:00
Returns whether the user is in overtype mode.
2021-07-09 14:40:05 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "menu_option" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "option" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Triggers a right-click menu action by the specified index. See [enum MenuItems] for a list of available indexes.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-06-15 16:05:01 +02:00
<method name= "merge_gutters" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "from_line" type= "int" />
<argument index= "1" name= "to_line" type= "int" />
2021-06-15 16:05:01 +02:00
<description >
2021-07-10 15:01:25 +02:00
Merge the gutters from [code]from_line[/code] into [code]to_line[/code]. Only overwritable gutters will be copied.
2021-06-15 16:05:01 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "paste" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
2021-07-10 15:01:25 +02:00
Paste at the current location. Can be overridden with [method _paste].
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "redo" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
Perform redo operation.
</description>
</method>
2020-09-11 12:22:10 +02:00
<method name= "remove_gutter" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "gutter" type= "int" />
2018-05-30 14:02:51 +02:00
<description >
2021-07-10 15:01:25 +02:00
Removes the gutter from this [TextEdit].
</description>
</method>
<method name= "remove_text" >
<return type= "void" />
<argument index= "0" name= "from_line" type= "int" />
<argument index= "1" name= "from_column" type= "int" />
<argument index= "2" name= "to_line" type= "int" />
<argument index= "3" name= "to_column" type= "int" />
<description >
Removes text between the given positions.
2021-10-05 14:24:34 +02:00
[b]Note:[/b] This does not adjust the caret or selection, which as a result it can end up in an invalid position.
2018-05-30 14:02:51 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "search" qualifiers= "const" >
2021-07-10 15:01:25 +02:00
<return type= "Vector2i" />
<argument index= "0" name= "text" type= "String" />
2021-07-30 15:28:05 +02:00
<argument index= "1" name= "flags" type= "int" />
<argument index= "2" name= "from_line" type= "int" />
2021-07-10 15:01:25 +02:00
<argument index= "3" name= "from_colum" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-11-08 08:33:48 +01:00
Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
2021-07-10 15:01:25 +02:00
In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If no results are found, both are equal to [code]-1[/code].
2020-11-28 00:33:15 +01:00
[codeblocks]
[gdscript]
var result = search("print", SEARCH_WHOLE_WORDS, 0, 0)
2021-07-10 15:01:25 +02:00
if result.x != -1:
2020-01-23 18:41:49 +01:00
# Result found.
2021-07-10 15:01:25 +02:00
var line_number = result.y
var column_number = result.x
2020-11-28 00:33:15 +01:00
[/gdscript]
[csharp]
2021-07-10 15:01:25 +02:00
Vector2i result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0);
2021-03-10 10:54:21 +01:00
if (result.Length > 0)
2020-11-28 00:33:15 +01:00
{
// Result found.
2021-07-10 15:01:25 +02:00
int lineNumber = result.y;
int columnNumber = result.x;
2020-11-28 00:33:15 +01:00
}
[/csharp]
[/codeblocks]
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "select" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "from_line" type= "int" />
<argument index= "1" name= "from_column" type= "int" />
<argument index= "2" name= "to_line" type= "int" />
<argument index= "3" name= "to_column" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
Perform selection, from line/column to line/column.
2020-07-03 13:44:34 +02:00
If [member selecting_enabled] is [code]false[/code], no selection will occur.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "select_all" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
Select all the text.
2020-07-03 13:44:34 +02:00
If [member selecting_enabled] is [code]false[/code], no selection will occur.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-07-09 13:42:55 +02:00
<method name= "select_word_under_caret" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
2021-07-09 13:42:55 +02:00
<description >
Selects the word under the caret.
</description>
</method>
2021-07-08 19:35:56 +02:00
<method name= "set_caret_column" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
<argument index= "0" name= "column" type= "int" />
<argument index= "1" name= "adjust_viewport" type= "bool" default= "true" />
2021-07-08 19:35:56 +02:00
<description >
Moves the caret to the specified [code]column[/code] index.
2021-07-10 15:01:25 +02:00
If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs.
2021-07-08 19:35:56 +02:00
</description>
</method>
<method name= "set_caret_line" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "adjust_viewport" type= "bool" default= "true" />
<argument index= "2" name= "can_be_hidden" type= "bool" default= "true" />
<argument index= "3" name= "wrap_index" type= "int" default= "0" />
2021-07-08 19:35:56 +02:00
<description >
Moves the caret to the specified [code]line[/code] index.
2021-07-10 15:01:25 +02:00
If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs.
If [code]can_be_hidden[/code] is [code]true[/code], the specified [code]line[/code] can be hidden.
2021-07-08 19:35:56 +02:00
</description>
</method>
2020-09-11 12:22:10 +02:00
<method name= "set_gutter_clickable" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "gutter" type= "int" />
<argument index= "1" name= "clickable" type= "bool" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_gutter_custom_draw" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "column" type= "int" />
2021-11-07 18:26:15 +01:00
<argument index= "1" name= "draw_callback" type= "Callable" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code].
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_gutter_draw" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "gutter" type= "int" />
<argument index= "1" name= "draw" type= "bool" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets whether the gutter should be drawn.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_gutter_name" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "gutter" type= "int" />
<argument index= "1" name= "name" type= "String" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the name of the gutter.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_gutter_overwritable" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "gutter" type= "int" />
<argument index= "1" name= "overwritable" type= "bool" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the gutter to overwritable. See [method merge_gutters].
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_gutter_type" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "gutter" type= "int" />
<argument index= "1" name= "type" type= "int" enum= "TextEdit.GutterType" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the type of gutter.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_gutter_width" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "gutter" type= "int" />
<argument index= "1" name= "width" type= "int" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Set the width of the gutter.
2020-09-11 12:22:10 +02:00
</description>
</method>
2020-05-11 13:23:39 +02:00
<method name= "set_line" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "new_text" type= "String" />
2017-11-24 09:16:27 +01:00
<description >
2020-05-11 13:23:39 +02:00
Sets the text for a specific line.
2017-11-24 09:16:27 +01:00
</description>
</method>
2021-07-09 18:27:09 +02:00
<method name= "set_line_as_center_visible" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "wrap_index" type= "int" default= "0" />
2021-07-09 18:27:09 +02:00
<description >
Positions the [code]wrap_index[/code] of [code]line[/code] at the center of the viewport.
</description>
</method>
<method name= "set_line_as_first_visible" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "wrap_index" type= "int" default= "0" />
2021-07-09 18:27:09 +02:00
<description >
Positions the [code]wrap_index[/code] of [code]line[/code] at the top of the viewport.
</description>
</method>
<method name= "set_line_as_last_visible" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "wrap_index" type= "int" default= "0" />
2021-07-09 18:27:09 +02:00
<description >
Positions the [code]wrap_index[/code] of [code]line[/code] at the bottom of the viewport.
</description>
</method>
2020-09-10 22:25:00 +02:00
<method name= "set_line_background_color" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "color" type= "Color" />
2020-09-10 22:25:00 +02:00
<description >
Sets the current background color of the line. Set to [code]Color(0, 0, 0, 0)[/code] for no color.
</description>
</method>
2020-09-11 12:22:10 +02:00
<method name= "set_line_gutter_clickable" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
<argument index= "2" name= "clickable" type= "bool" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the [code]gutter[/code] on [code]line[/code] as clickable.
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_line_gutter_icon" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
<argument index= "2" name= "icon" type= "Texture2D" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the icon for [code]gutter[/code] on [code]line[/code].
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_line_gutter_item_color" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
<argument index= "2" name= "color" type= "Color" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the color for [code]gutter[/code] on [code]line[/code].
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_line_gutter_metadata" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
<argument index= "2" name= "metadata" type= "Variant" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the metadata for [code]gutter[/code] on [code]line[/code].
2020-09-11 12:22:10 +02:00
</description>
</method>
<method name= "set_line_gutter_text" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
<argument index= "2" name= "text" type= "String" />
2020-09-11 12:22:10 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the text for [code]gutter[/code] on [code]line[/code].
2020-09-11 12:22:10 +02:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "set_opentype_feature" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "tag" type= "String" />
<argument index= "1" name= "value" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
</description>
</method>
2021-07-09 14:40:05 +02:00
<method name= "set_overtype_mode_enabled" >
2021-07-10 15:01:25 +02:00
<return type= "void" />
<argument index= "0" name= "enabled" type= "bool" />
<description >
If [code]true[/code], sets the user into overtype mode. When the user types in this mode, it will override existing text.
</description>
</method>
<method name= "set_search_flags" >
<return type= "void" />
<argument index= "0" name= "flags" type= "int" />
2021-07-09 14:40:05 +02:00
<description >
2021-07-10 15:01:25 +02:00
Sets the search flags. This is used with [method set_search_text] to highlight occurrences of the searched text. Search flags can be specified from the [enum SearchFlags] enum.
</description>
</method>
<method name= "set_search_text" >
<return type= "void" />
<argument index= "0" name= "search_text" type= "String" />
<description >
Sets the search text. See [method set_search_flags].
2021-07-09 14:40:05 +02:00
</description>
</method>
2020-11-04 15:38:26 +01:00
<method name= "set_selection_mode" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "mode" type= "int" enum= "TextEdit.SelectionMode" />
<argument index= "1" name= "line" type= "int" default= "-1" />
<argument index= "2" name= "column" type= "int" default= "-1" />
2020-11-04 15:38:26 +01:00
<description >
2021-07-10 15:01:25 +02:00
Sets the current selection mode.
2020-11-04 15:38:26 +01:00
</description>
</method>
2021-06-15 16:05:01 +02:00
<method name= "set_tab_size" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "size" type= "int" />
2021-06-15 16:05:01 +02:00
<description >
2021-07-06 13:22:53 +02:00
Sets the tab size for the [TextEdit] to use.
2021-06-15 16:05:01 +02:00
</description>
</method>
2021-07-10 15:01:25 +02:00
<method name= "set_tooltip_request_func" >
<return type= "void" />
2021-11-07 18:26:15 +01:00
<argument index= "0" name= "callback" type= "Callable" />
2021-07-10 15:01:25 +02:00
<description >
2021-11-07 18:26:15 +01:00
Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String[/code]
2021-07-10 15:01:25 +02:00
</description>
</method>
<method name= "swap_lines" >
<return type= "void" />
<argument index= "0" name= "from_line" type= "int" />
<argument index= "1" name= "to_line" type= "int" />
<description >
Swaps the two lines.
</description>
</method>
<method name= "tag_saved_version" >
<return type= "void" />
<description >
Tag the current version as saved.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "undo" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
Perform undo operation.
</description>
</method>
</methods>
<members >
2021-07-08 19:35:56 +02:00
<member name= "caret_blink" type= "bool" setter= "set_caret_blink_enabled" getter= "is_caret_blink_enabled" default= "false" >
Sets if the caret should blink.
2017-09-12 22:42:36 +02:00
</member>
2021-07-08 19:35:56 +02:00
<member name= "caret_blink_speed" type= "float" setter= "set_caret_blink_speed" getter= "get_caret_blink_speed" default= "0.65" >
2017-12-20 02:36:47 +01:00
Duration (in seconds) of a caret's blinking cycle.
2017-09-12 22:42:36 +02:00
</member>
2021-11-18 22:36:22 +01:00
<member name= "caret_mid_grapheme" type= "bool" setter= "set_caret_mid_grapheme_enabled" getter= "is_caret_mid_grapheme_enabled" default= "true" >
2020-08-12 13:49:10 +02:00
Allow moving caret, selecting and removing the individual composite character components.
2021-10-05 14:24:34 +02:00
[b]Note:[/b] [kbd]Backspace[/kbd] is always removing individual composite character components.
2020-08-12 13:49:10 +02:00
</member>
2021-07-08 19:35:56 +02:00
<member name= "caret_move_on_right_click" type= "bool" setter= "set_move_caret_on_right_click_enabled" getter= "is_move_caret_on_right_click_enabled" default= "true" >
If [code]true[/code], a right-click moves the caret at the mouse position before displaying the context menu.
2018-12-20 13:46:54 +01:00
If [code]false[/code], the context menu disregards mouse location.
2017-09-12 22:42:36 +02:00
</member>
2021-07-08 19:35:56 +02:00
<member name= "caret_type" type= "int" setter= "set_caret_type" getter= "get_caret_type" enum= "TextEdit.CaretType" default= "0" >
Set the type of caret to draw.
</member>
2019-06-29 12:38:01 +02:00
<member name= "context_menu_enabled" type= "bool" setter= "set_context_menu_enabled" getter= "is_context_menu_enabled" default= "true" >
2019-06-22 01:04:47 +02:00
If [code]true[/code], a right-click displays the context menu.
2017-11-13 09:24:36 +01:00
</member>
2021-10-21 23:02:46 +02:00
<member name= "deselect_on_focus_loss_enabled" type= "bool" setter= "set_deselect_on_focus_loss_enabled" getter= "is_deselect_on_focus_loss_enabled" default= "true" >
If [code]true[/code], the selected text will be deselected when focus is lost.
</member>
2020-08-12 13:49:10 +02:00
<member name= "draw_control_chars" type= "bool" setter= "set_draw_control_chars" getter= "get_draw_control_chars" default= "false" >
If [code]true[/code], control characters are displayed.
</member>
2019-06-29 12:38:01 +02:00
<member name= "draw_spaces" type= "bool" setter= "set_draw_spaces" getter= "is_drawing_spaces" default= "false" >
2019-05-01 11:31:10 +02:00
If [code]true[/code], the "space" character will have a visible representation.
</member>
2019-06-29 12:38:01 +02:00
<member name= "draw_tabs" type= "bool" setter= "set_draw_tabs" getter= "is_drawing_tabs" default= "false" >
2019-05-21 13:26:37 +02:00
If [code]true[/code], the "tab" character will have a visible representation.
</member>
2021-07-09 15:05:52 +02:00
<member name= "editable" type= "bool" setter= "set_editable" getter= "is_editable" default= "true" >
If [code]false[/code], existing text cannot be modified and new text cannot be added.
</member>
2021-12-02 20:38:49 +01:00
<member name= "focus_mode" type= "int" setter= "set_focus_mode" getter= "get_focus_mode" overrides= "Control" enum= "Control.FocusMode" default= "2" />
2019-06-29 12:38:01 +02:00
<member name= "highlight_all_occurrences" type= "bool" setter= "set_highlight_all_occurrences" getter= "is_highlight_all_occurrences_enabled" default= "false" >
2019-06-13 11:12:52 +02:00
If [code]true[/code], all occurrences of the selected text will be highlighted.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "highlight_current_line" type= "bool" setter= "set_highlight_current_line" getter= "is_highlight_current_line_enabled" default= "false" >
2018-12-20 13:46:54 +01:00
If [code]true[/code], the line containing the cursor is highlighted.
2017-10-24 19:22:37 +02:00
</member>
2020-08-12 13:49:10 +02:00
<member name= "language" type= "String" setter= "set_language" getter= "get_language" default= """" >
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
2021-10-12 09:43:50 +02:00
<member name= "middle_mouse_paste_enabled" type= "bool" setter= "set_middle_mouse_paste_enabled" getter= "is_middle_mouse_paste_enabled" default= "true" >
If [code]false[/code], using middle mouse button to paste clipboard will be disabled.
[b]Note:[/b] This method is only implemented on Linux.
</member>
2021-10-08 23:26:13 +02:00
<member name= "minimap_draw" type= "bool" setter= "set_draw_minimap" getter= "is_drawing_minimap" default= "false" >
2020-07-03 14:42:43 +02:00
If [code]true[/code], a minimap is shown, providing an outline of your source code.
2019-08-22 14:49:30 +02:00
</member>
<member name= "minimap_width" type= "int" setter= "set_minimap_width" getter= "get_minimap_width" default= "80" >
2020-07-03 14:42:43 +02:00
The width, in pixels, of the minimap.
2019-08-22 14:49:30 +02:00
</member>
2021-12-02 20:38:49 +01:00
<member name= "mouse_default_cursor_shape" type= "int" setter= "set_default_cursor_shape" getter= "get_default_cursor_shape" overrides= "Control" enum= "Control.CursorShape" default= "1" />
2019-06-29 12:38:01 +02:00
<member name= "override_selected_font_color" type= "bool" setter= "set_override_selected_font_color" getter= "is_overriding_selected_font_color" default= "false" >
2020-12-08 14:11:45 +01:00
If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text.
2017-10-21 12:02:08 +02:00
</member>
2022-01-23 21:07:35 +01:00
<member name= "placeholder_alpha" type= "float" setter= "set_placeholder_alpha" getter= "get_placeholder_alpha" default= "0.6" >
Opacity of the [member placeholder_text]. From [code]0[/code] to [code]1[/code].
</member>
<member name= "placeholder_text" type= "String" setter= "set_placeholder" getter= "get_placeholder" default= """" >
Text shown when the [TextEdit] is empty. It is [b]not[/b] the [TextEdit]'s default value (see [member text]).
</member>
2020-01-12 14:30:21 +01:00
<member name= "scroll_horizontal" type= "int" setter= "set_h_scroll" getter= "get_h_scroll" default= "0" >
2021-05-10 01:27:54 +02:00
If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
2020-01-12 14:30:21 +01:00
</member>
2021-07-09 18:27:09 +02:00
<member name= "scroll_past_end_of_file" type= "bool" setter= "set_scroll_past_end_of_file_enabled" getter= "is_scroll_past_end_of_file_enabled" default= "false" >
Allow scrolling past the last line into "virtual" space.
</member>
2021-07-10 15:01:25 +02:00
<member name= "scroll_smooth" type= "bool" setter= "set_smooth_scroll_enable" getter= "is_smooth_scroll_enabled" default= "false" >
Scroll smoothly over the text rather then jumping to the next location.
</member>
<member name= "scroll_v_scroll_speed" type= "float" setter= "set_v_scroll_speed" getter= "get_v_scroll_speed" default= "80.0" >
Sets the scroll speed with the minimap or when [member scroll_smooth] is enabled.
</member>
2020-01-12 14:30:21 +01:00
<member name= "scroll_vertical" type= "float" setter= "set_v_scroll" getter= "get_v_scroll" default= "0.0" >
2021-05-10 01:27:54 +02:00
If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line.
2020-01-12 14:30:21 +01:00
</member>
2019-09-24 11:44:48 +02:00
<member name= "selecting_enabled" type= "bool" setter= "set_selecting_enabled" getter= "is_selecting_enabled" default= "true" >
2020-07-03 13:24:40 +02:00
If [code]true[/code], text can be selected.
If [code]false[/code], text can not be selected by the user or by the [method select] or [method select_all] methods.
2019-09-24 11:44:48 +02:00
</member>
<member name= "shortcut_keys_enabled" type= "bool" setter= "set_shortcut_keys_enabled" getter= "is_shortcut_keys_enabled" default= "true" >
2020-07-03 10:03:56 +02:00
If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled.
2019-09-24 11:44:48 +02:00
</member>
2020-08-12 13:49:10 +02:00
<member name= "structured_text_bidi_override" type= "int" setter= "set_structured_text_bidi_override" getter= "get_structured_text_bidi_override" enum= "Control.StructuredTextParser" default= "0" >
Set BiDi algorithm override for the structured text.
</member>
2019-09-24 19:45:03 +02:00
<member name= "structured_text_bidi_override_options" type= "Array" setter= "set_structured_text_bidi_override_options" getter= "get_structured_text_bidi_override_options" default= "[]" >
2020-08-12 13:49:10 +02:00
Set additional options for BiDi override.
</member>
2020-07-15 08:43:21 +02:00
<member name= "syntax_highlighter" type= "SyntaxHighlighter" setter= "set_syntax_highlighter" getter= "get_syntax_highlighter" >
2020-10-11 18:07:33 +02:00
Sets the [SyntaxHighlighter] to use.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "text" type= "String" setter= "set_text" getter= "get_text" default= """" >
2017-11-13 09:24:36 +01:00
String value of the [TextEdit].
</member>
2020-08-12 13:49:10 +02:00
<member name= "text_direction" type= "int" setter= "set_text_direction" getter= "get_text_direction" enum= "Control.TextDirection" default= "0" >
Base text writing direction.
</member>
2020-08-09 11:06:36 +02:00
<member name= "virtual_keyboard_enabled" type= "bool" setter= "set_virtual_keyboard_enabled" getter= "is_virtual_keyboard_enabled" default= "true" >
If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it.
</member>
2021-07-09 12:52:49 +02:00
<member name= "wrap_mode" type= "int" setter= "set_line_wrapping_mode" getter= "get_line_wrapping_mode" enum= "TextEdit.LineWrappingMode" default= "0" >
Sets the line wrapping mode to use.
2017-09-12 22:42:36 +02:00
</member>
</members>
<signals >
2021-07-08 19:35:56 +02:00
<signal name= "caret_changed" >
2017-09-12 22:42:36 +02:00
<description >
2021-07-08 19:35:56 +02:00
Emitted when the caret changes position.
2017-09-12 22:42:36 +02:00
</description>
</signal>
2020-09-11 12:22:10 +02:00
<signal name= "gutter_added" >
2017-09-12 22:42:36 +02:00
<description >
2021-07-10 15:01:25 +02:00
Emitted when a gutter is added.
2017-09-12 22:42:36 +02:00
</description>
</signal>
2020-09-11 12:22:10 +02:00
<signal name= "gutter_clicked" >
2021-07-30 15:28:05 +02:00
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "gutter" type= "int" />
2019-04-23 21:39:09 +02:00
<description >
2021-07-10 15:01:25 +02:00
Emitted when a gutter is clicked.
2019-04-23 21:39:09 +02:00
</description>
</signal>
2020-09-11 12:22:10 +02:00
<signal name= "gutter_removed" >
<description >
2021-07-10 15:01:25 +02:00
Emitted when a gutter is removed.
2020-09-11 12:22:10 +02:00
</description>
</signal>
<signal name= "lines_edited_from" >
2021-07-30 15:28:05 +02:00
<argument index= "0" name= "from_line" type= "int" />
<argument index= "1" name= "to_line" type= "int" />
2020-07-15 08:43:21 +02:00
<description >
2021-07-10 15:01:25 +02:00
Emitted immediately when the text changes.
When text is added [code]from_line[/code] will be less then [code]to_line[/code]. On a remove [code]to_line[/code] will be less then [code]from_line[/code].
2020-07-15 08:43:21 +02:00
</description>
</signal>
2017-09-12 22:42:36 +02:00
<signal name= "text_changed" >
<description >
Emitted when the text changes.
</description>
</signal>
2021-07-11 18:07:29 +02:00
<signal name= "text_set" >
<description >
Emitted when [method clear] is called or [member text] is set.
</description>
</signal>
2017-09-12 22:42:36 +02:00
</signals>
<constants >
2017-11-24 23:16:30 +01:00
<constant name= "MENU_CUT" value= "0" enum= "MenuItems" >
2019-11-08 08:33:48 +01:00
Cuts (copies and clears) the selected text.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "MENU_COPY" value= "1" enum= "MenuItems" >
2017-12-20 02:36:47 +01:00
Copies the selected text.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "MENU_PASTE" value= "2" enum= "MenuItems" >
2017-12-20 02:36:47 +01:00
Pastes the clipboard text over the selected text (or at the cursor's position).
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "MENU_CLEAR" value= "3" enum= "MenuItems" >
2017-12-20 02:36:47 +01:00
Erases the whole [TextEdit] text.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "MENU_SELECT_ALL" value= "4" enum= "MenuItems" >
2017-12-20 02:36:47 +01:00
Selects the whole [TextEdit] text.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "MENU_UNDO" value= "5" enum= "MenuItems" >
2017-12-20 02:36:47 +01:00
Undoes the previous action.
2017-09-12 22:42:36 +02:00
</constant>
2018-12-04 21:57:07 +01:00
<constant name= "MENU_REDO" value= "6" enum= "MenuItems" >
2019-06-13 11:12:52 +02:00
Redoes the previous action.
2018-12-04 21:57:07 +01:00
</constant>
2020-08-12 13:49:10 +02:00
<constant name= "MENU_DIR_INHERITED" value= "7" enum= "MenuItems" >
Sets text direction to inherited.
</constant>
<constant name= "MENU_DIR_AUTO" value= "8" enum= "MenuItems" >
Sets text direction to automatic.
</constant>
<constant name= "MENU_DIR_LTR" value= "9" enum= "MenuItems" >
Sets text direction to left-to-right.
</constant>
<constant name= "MENU_DIR_RTL" value= "10" enum= "MenuItems" >
Sets text direction to right-to-left.
</constant>
<constant name= "MENU_DISPLAY_UCC" value= "11" enum= "MenuItems" >
Toggles control character display.
</constant>
<constant name= "MENU_INSERT_LRM" value= "12" enum= "MenuItems" >
Inserts left-to-right mark (LRM) character.
</constant>
<constant name= "MENU_INSERT_RLM" value= "13" enum= "MenuItems" >
Inserts right-to-left mark (RLM) character.
</constant>
<constant name= "MENU_INSERT_LRE" value= "14" enum= "MenuItems" >
Inserts start of left-to-right embedding (LRE) character.
</constant>
<constant name= "MENU_INSERT_RLE" value= "15" enum= "MenuItems" >
Inserts start of right-to-left embedding (RLE) character.
</constant>
<constant name= "MENU_INSERT_LRO" value= "16" enum= "MenuItems" >
Inserts start of left-to-right override (LRO) character.
</constant>
<constant name= "MENU_INSERT_RLO" value= "17" enum= "MenuItems" >
Inserts start of right-to-left override (RLO) character.
</constant>
<constant name= "MENU_INSERT_PDF" value= "18" enum= "MenuItems" >
Inserts pop direction formatting (PDF) character.
</constant>
<constant name= "MENU_INSERT_ALM" value= "19" enum= "MenuItems" >
Inserts Arabic letter mark (ALM) character.
</constant>
<constant name= "MENU_INSERT_LRI" value= "20" enum= "MenuItems" >
Inserts left-to-right isolate (LRI) character.
</constant>
<constant name= "MENU_INSERT_RLI" value= "21" enum= "MenuItems" >
Inserts right-to-left isolate (RLI) character.
</constant>
<constant name= "MENU_INSERT_FSI" value= "22" enum= "MenuItems" >
Inserts first strong isolate (FSI) character.
</constant>
<constant name= "MENU_INSERT_PDI" value= "23" enum= "MenuItems" >
Inserts pop direction isolate (PDI) character.
</constant>
<constant name= "MENU_INSERT_ZWJ" value= "24" enum= "MenuItems" >
Inserts zero width joiner (ZWJ) character.
</constant>
<constant name= "MENU_INSERT_ZWNJ" value= "25" enum= "MenuItems" >
Inserts zero width non-joiner (ZWNJ) character.
</constant>
<constant name= "MENU_INSERT_WJ" value= "26" enum= "MenuItems" >
Inserts word joiner (WJ) character.
</constant>
<constant name= "MENU_INSERT_SHY" value= "27" enum= "MenuItems" >
Inserts soft hyphen (SHY) character.
</constant>
<constant name= "MENU_MAX" value= "28" enum= "MenuItems" >
2019-06-13 11:12:52 +02:00
Represents the size of the [enum MenuItems] enum.
2017-09-12 22:42:36 +02:00
</constant>
2021-07-10 15:01:25 +02:00
<constant name= "SEARCH_MATCH_CASE" value= "1" enum= "SearchFlags" >
Match case when searching.
</constant>
<constant name= "SEARCH_WHOLE_WORDS" value= "2" enum= "SearchFlags" >
Match whole words when searching.
</constant>
<constant name= "SEARCH_BACKWARDS" value= "4" enum= "SearchFlags" >
Search from end to beginning.
</constant>
<constant name= "CARET_TYPE_LINE" value= "0" enum= "CaretType" >
Vertical line caret.
</constant>
<constant name= "CARET_TYPE_BLOCK" value= "1" enum= "CaretType" >
Block caret.
</constant>
<constant name= "SELECTION_MODE_NONE" value= "0" enum= "SelectionMode" >
Not selecting.
</constant>
<constant name= "SELECTION_MODE_SHIFT" value= "1" enum= "SelectionMode" >
Select as if [code]shift[/code] is pressed.
</constant>
<constant name= "SELECTION_MODE_POINTER" value= "2" enum= "SelectionMode" >
Select single characters as if the user single clicked.
</constant>
<constant name= "SELECTION_MODE_WORD" value= "3" enum= "SelectionMode" >
Select whole words as if the user double clicked.
</constant>
<constant name= "SELECTION_MODE_LINE" value= "4" enum= "SelectionMode" >
Select whole lines as if the user tripped clicked.
</constant>
<constant name= "LINE_WRAPPING_NONE" value= "0" enum= "LineWrappingMode" >
Line wrapping is disabled.
</constant>
<constant name= "LINE_WRAPPING_BOUNDARY" value= "1" enum= "LineWrappingMode" >
Line wrapping occurs at the control boundary, beyond what would normally be visible.
</constant>
<constant name= "GUTTER_TYPE_STRING" value= "0" enum= "GutterType" >
Draw a string.
</constant>
<constant name= "GUTTER_TYPE_ICON" value= "1" enum= "GutterType" >
Draw an icon.
</constant>
<constant name= "GUTTER_TYPE_CUSTOM" value= "2" enum= "GutterType" >
Custom draw.
</constant>
2017-09-12 22:42:36 +02:00
</constants>
<theme_items >
2021-08-04 18:54:41 +02:00
<theme_item name= "background_color" data_type= "color" type= "Color" default= "Color(0, 0, 0, 0)" >
2020-10-11 18:07:33 +02:00
Sets the background [Color] of this [TextEdit].
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-04 18:54:41 +02:00
<theme_item name= "caret_background_color" data_type= "color" type= "Color" default= "Color(0, 0, 0, 1)" >
2021-07-10 15:01:25 +02:00
[Color] of the text behind the caret when using a block caret.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-12-30 17:22:06 +01:00
<theme_item name= "caret_color" data_type= "color" type= "Color" default= "Color(0.875, 0.875, 0.875, 1)" >
2021-11-13 23:06:47 +01:00
[Color] of the caret. This can be set to a fully transparent color to hide the caret entirely.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-04 18:54:41 +02:00
<theme_item name= "current_line_color" data_type= "color" type= "Color" default= "Color(0.25, 0.25, 0.26, 0.8)" >
Background [Color] of the line containing the caret.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-12-30 17:22:06 +01:00
<theme_item name= "font_color" data_type= "color" type= "Color" default= "Color(0.875, 0.875, 0.875, 1)" >
2019-06-25 12:57:35 +02:00
Sets the font [Color].
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-04 18:54:41 +02:00
<theme_item name= "font_outline_color" data_type= "color" type= "Color" default= "Color(1, 1, 1, 1)" >
2020-12-25 22:45:28 +01:00
The tint of text outline of the [TextEdit].
</theme_item>
2021-12-30 17:22:06 +01:00
<theme_item name= "font_readonly_color" data_type= "color" type= "Color" default= "Color(0.875, 0.875, 0.875, 0.5)" >
2021-07-10 15:01:25 +02:00
Sets the font [Color] when [member editable] is disabled.
2019-06-26 16:02:47 +02:00
</theme_item>
2021-12-30 17:22:06 +01:00
<theme_item name= "font_selected_color" data_type= "color" type= "Color" default= "Color(1, 1, 1, 1)" >
2020-04-19 23:33:01 +02:00
Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-09-21 21:07:12 +02:00
<theme_item name= "search_result_border_color" data_type= "color" type= "Color" default= "Color(0.3, 0.3, 0.3, 0.4)" >
[Color] of the border around text that matches the search query.
</theme_item>
<theme_item name= "search_result_color" data_type= "color" type= "Color" default= "Color(0.3, 0.3, 0.3, 1)" >
[Color] behind the text that matches the search query.
</theme_item>
2021-12-30 17:22:06 +01:00
<theme_item name= "selection_color" data_type= "color" type= "Color" default= "Color(0.5, 0.5, 0.5, 1)" >
2019-06-25 12:57:35 +02:00
Sets the highlight [Color] of text selections.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-12-30 17:22:06 +01:00
<theme_item name= "word_highlighted_color" data_type= "color" type= "Color" default= "Color(0.5, 0.5, 0.5, 0.25)" >
2021-12-01 19:02:20 +01:00
Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
</theme_item>
2021-11-13 23:06:47 +01:00
<theme_item name= "caret_width" data_type= "constant" type= "int" default= "1" >
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 [code]0[/code] or lower, the caret width is automatically set to 1 pixel and multiplied by the display scaling factor.
</theme_item>
2021-12-01 19:02:20 +01:00
<theme_item name= "line_spacing" data_type= "constant" type= "int" default= "4" >
Sets the spacing between the lines.
</theme_item>
<theme_item name= "outline_size" data_type= "constant" type= "int" default= "0" >
The size of the text outline.
</theme_item>
<theme_item name= "font" data_type= "font" type= "Font" >
Sets the default [Font].
</theme_item>
<theme_item name= "font_size" data_type= "font_size" type= "int" >
Sets default font size.
</theme_item>
2021-08-04 18:54:41 +02:00
<theme_item name= "space" data_type= "icon" type= "Texture2D" >
2020-08-12 13:49:10 +02:00
Sets a custom [Texture2D] for space text characters.
2019-05-21 13:26:37 +02:00
</theme_item>
2021-08-04 18:54:41 +02:00
<theme_item name= "tab" data_type= "icon" type= "Texture2D" >
2020-02-12 09:59:06 +01:00
Sets a custom [Texture2D] for tab text characters.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-12-01 19:02:20 +01:00
<theme_item name= "focus" data_type= "style" type= "StyleBox" >
2021-11-20 17:43:34 +01:00
Sets the [StyleBox] when in focus. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
2021-12-01 19:02:20 +01:00
</theme_item>
<theme_item name= "normal" data_type= "style" type= "StyleBox" >
Sets the [StyleBox] of this [TextEdit].
</theme_item>
<theme_item name= "read_only" data_type= "style" type= "StyleBox" >
Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled.
2017-09-12 22:42:36 +02:00
</theme_item>
</theme_items>
</class>