2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2020-02-01 01:03:48 +00:00
<class name= "TextEdit" inherits= "Control" version= "4.0" >
2017-09-12 20:42:36 +00: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-09 23:27:54 +00: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 20:42:36 +00:00
</description>
<tutorials >
</tutorials>
<methods >
2020-09-11 10:22:10 +00:00
<method name= "add_gutter" >
<return type= "void" >
</return>
<argument index= "0" name= "at" type= "int" default= "-1" >
</argument>
<description >
</description>
</method>
2017-11-24 08:16:27 +00:00
<method name= "can_fold" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<description >
2019-04-24 07:59:17 +00:00
Returns if the given line is foldable, that is, it has indented lines right below it.
2017-11-24 08:16:27 +00:00
</description>
</method>
2019-06-24 08:39:59 +00:00
<method name= "center_viewport_to_cursor" >
<return type= "void" >
</return>
<description >
2020-07-03 10:39:17 +00:00
Centers the viewport on the line the editing cursor is at. This also resets the [member scroll_horizontal] value to [code]0[/code].
2019-06-24 08:39:59 +00:00
</description>
</method>
2020-08-12 11:49:10 +00:00
<method name= "clear_opentype_features" >
<return type= "void" >
</return>
<description >
Removes all OpenType features.
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "clear_undo_history" >
<return type= "void" >
</return>
<description >
2019-06-13 09:12:52 +00:00
Clears the undo history.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "copy" >
<return type= "void" >
</return>
<description >
2019-06-13 09:12:52 +00:00
Copy's the current text selection.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "cursor_get_column" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-05-24 02:15:43 +00:00
Returns the column the editing cursor is at.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "cursor_get_line" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-05-24 02:15:43 +00:00
Returns the line the editing cursor is at.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "cursor_set_column" >
<return type= "void" >
</return>
<argument index= "0" name= "column" type= "int" >
</argument>
<argument index= "1" name= "adjust_viewport" type= "bool" default= "true" >
</argument>
<description >
2019-06-13 09:12:52 +00:00
Moves the cursor at the specified [code]column[/code] index.
2019-11-02 11:14:15 +00:00
If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "cursor_set_line" >
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "adjust_viewport" type= "bool" default= "true" >
</argument>
2017-11-24 08:16:27 +00:00
<argument index= "2" name= "can_be_hidden" type= "bool" default= "true" >
</argument>
2018-05-15 19:53:42 +00:00
<argument index= "3" name= "wrap_index" type= "int" default= "0" >
</argument>
2017-09-12 20:42:36 +00:00
<description >
2019-06-13 09:12:52 +00:00
Moves the cursor at the specified [code]line[/code] index.
2019-11-02 11:14:15 +00:00
If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs.
If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden using [method set_line_as_hidden].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "cut" >
<return type= "void" >
</return>
<description >
2019-06-13 09:12:52 +00:00
Cut's the current selection.
2017-09-12 20:42:36 +00:00
</description>
</method>
2017-12-16 19:34:16 +00:00
<method name= "deselect" >
<return type= "void" >
</return>
<description >
2019-06-13 09:12:52 +00:00
Deselects the current selection.
2017-12-16 19:34:16 +00:00
</description>
</method>
2017-11-24 08:16:27 +00:00
<method name= "fold_all_lines" >
<return type= "void" >
</return>
<description >
2019-04-24 07:59:17 +00:00
Folds all lines that are possible to be folded (see [method can_fold]).
2017-11-24 08:16:27 +00:00
</description>
</method>
<method name= "fold_line" >
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<description >
2019-04-24 07:59:17 +00:00
Folds the given line, if possible (see [method can_fold]).
2017-11-24 08:16:27 +00:00
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "get_gutter_count" qualifiers= "const" >
<return type= "int" >
</return>
<description >
</description>
</method>
<method name= "get_gutter_name" qualifiers= "const" >
<return type= "String" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
<method name= "get_gutter_type" qualifiers= "const" >
<return type= "int" enum= "TextEdit.GutterType" >
2018-05-30 12:02:51 +00:00
</return>
2020-09-11 10:22:10 +00:00
<argument index= "0" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
<method name= "get_gutter_width" qualifiers= "const" >
<return type= "int" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
2018-05-30 12:02:51 +00:00
<description >
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "get_line" qualifiers= "const" >
<return type= "String" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<description >
2019-05-24 02:15:43 +00:00
Returns the text of a specific line.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_line_count" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-05-24 02:15:43 +00:00
Returns the amount of total lines in the text.
2017-09-12 20:42:36 +00:00
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "get_line_gutter_icon" qualifiers= "const" >
<return type= "Texture2D" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
<method name= "get_line_gutter_item_color" >
<return type= "Color" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
<method name= "get_line_gutter_metadata" qualifiers= "const" >
<return type= "Variant" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
<method name= "get_line_gutter_text" qualifiers= "const" >
<return type= "String" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "get_menu" qualifiers= "const" >
<return type= "PopupMenu" >
</return>
<description >
2019-04-24 07:59:17 +00:00
Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit].
2017-09-12 20:42:36 +00:00
</description>
</method>
2020-08-12 11:49:10 +00:00
<method name= "get_opentype_feature" qualifiers= "const" >
<return type= "int" >
</return>
<argument index= "0" name= "tag" type= "String" >
</argument>
<description >
Returns OpenType feature [code]tag[/code].
</description>
</method>
2020-11-04 14:38:26 +00:00
<method name= "get_selection_column" qualifiers= "const" >
<return type= "int" >
</return>
<description >
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "get_selection_from_column" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-05-24 02:15:43 +00:00
Returns the selection begin column.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_selection_from_line" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-05-24 02:15:43 +00:00
Returns the selection begin line.
2017-09-12 20:42:36 +00:00
</description>
</method>
2020-11-04 14:38:26 +00:00
<method name= "get_selection_line" qualifiers= "const" >
<return type= "int" >
</return>
<description >
</description>
</method>
<method name= "get_selection_mode" qualifiers= "const" >
<return type= "int" enum= "TextEdit.SelectionMode" >
</return>
<description >
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "get_selection_text" qualifiers= "const" >
<return type= "String" >
</return>
<description >
2019-05-24 02:15:43 +00:00
Returns the text inside the selection.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_selection_to_column" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-05-24 02:15:43 +00:00
Returns the selection end column.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_selection_to_line" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-05-24 02:15:43 +00:00
Returns the selection end line.
2017-09-12 20:42:36 +00:00
</description>
</method>
2021-05-07 09:21:04 +00:00
<method name= "get_visible_line_count" qualifiers= "const" >
<return type= "int" >
</return>
<description >
Returns the number of visible lines, including wrapped text.
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "get_word_under_cursor" qualifiers= "const" >
<return type= "String" >
</return>
<description >
2020-11-13 14:57:18 +00:00
Returns a [String] text with the word under the caret (text cursor) location.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "insert_text_at_cursor" >
<return type= "void" >
</return>
<argument index= "0" name= "text" type= "String" >
</argument>
<description >
2019-06-13 09:12:52 +00:00
Insert the specified text at the cursor position.
2017-09-12 20:42:36 +00:00
</description>
</method>
2017-11-24 08:16:27 +00:00
<method name= "is_folded" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<description >
2019-06-13 09:12:52 +00:00
Returns whether the line at the specified index is folded or not.
2017-11-24 08:16:27 +00:00
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "is_gutter_clickable" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
<method name= "is_gutter_drawn" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
<method name= "is_gutter_overwritable" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
<method name= "is_line_gutter_clickable" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<description >
</description>
</method>
2017-11-24 08:16:27 +00:00
<method name= "is_line_hidden" qualifiers= "const" >
<return type= "bool" >
</return>
2018-01-03 12:45:03 +00:00
<argument index= "0" name= "line" type= "int" >
2017-11-24 08:16:27 +00:00
</argument>
<description >
2019-06-13 09:12:52 +00:00
Returns whether the line at the specified index is hidden or not.
2017-11-24 08:16:27 +00:00
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "is_selection_active" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
2019-05-24 02:15:43 +00:00
Returns [code]true[/code] if the selection is active.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "menu_option" >
<return type= "void" >
</return>
<argument index= "0" name= "option" type= "int" >
</argument>
<description >
2019-06-21 23:04:47 +00:00
Triggers a right-click menu action by the specified index. See [enum MenuItems] for a list of available indexes.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "paste" >
<return type= "void" >
</return>
<description >
Paste the current selection.
</description>
</method>
<method name= "redo" >
<return type= "void" >
</return>
<description >
Perform redo operation.
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "remove_gutter" >
2018-05-30 12:02:51 +00:00
<return type= "void" >
</return>
2020-09-11 10:22:10 +00:00
<argument index= "0" name= "gutter" type= "int" >
</argument>
2018-05-30 12:02:51 +00:00
<description >
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "search" qualifiers= "const" >
2020-05-16 21:23:46 +00:00
<return type= "Dictionary" >
2017-09-12 20:42:36 +00:00
</return>
<argument index= "0" name= "key" type= "String" >
</argument>
<argument index= "1" name= "flags" type= "int" >
</argument>
<argument index= "2" name= "from_line" type= "int" >
</argument>
<argument index= "3" name= "from_column" type= "int" >
</argument>
<description >
2019-11-08 07:33:48 +00:00
Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
2020-05-16 21:23:46 +00:00
Returns an empty [code]Dictionary[/code] if no result was found. Otherwise, returns a [code]Dictionary[/code] containing [code]line[/code] and [code]column[/code] entries, e.g:
2020-11-27 23:33:15 +00:00
[codeblocks]
[gdscript]
var result = search("print", SEARCH_WHOLE_WORDS, 0, 0)
if !result.empty():
2020-01-23 17:41:49 +00:00
# Result found.
2020-05-16 21:23:46 +00:00
var line_number = result.line
var column_number = result.column
2020-11-27 23:33:15 +00:00
[/gdscript]
[csharp]
int[] result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0);
2021-03-10 09:54:21 +00:00
if (result.Length > 0)
2020-11-27 23:33:15 +00:00
{
// Result found.
int lineNumber = result[(int)TextEdit.SearchResult.Line];
int columnNumber = result[(int)TextEdit.SearchResult.Column];
}
[/csharp]
[/codeblocks]
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "select" >
<return type= "void" >
</return>
<argument index= "0" name= "from_line" type= "int" >
</argument>
<argument index= "1" name= "from_column" type= "int" >
</argument>
<argument index= "2" name= "to_line" type= "int" >
</argument>
<argument index= "3" name= "to_column" type= "int" >
</argument>
<description >
Perform selection, from line/column to line/column.
2020-07-03 11:44:34 +00:00
If [member selecting_enabled] is [code]false[/code], no selection will occur.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "select_all" >
<return type= "void" >
</return>
<description >
Select all the text.
2020-07-03 11:44:34 +00:00
If [member selecting_enabled] is [code]false[/code], no selection will occur.
2017-09-12 20:42:36 +00:00
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "set_gutter_clickable" >
<return type= "void" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<argument index= "1" name= "clickable" type= "bool" >
</argument>
<description >
</description>
</method>
<method name= "set_gutter_custom_draw" >
<return type= "void" >
</return>
<argument index= "0" name= "column" type= "int" >
</argument>
<argument index= "1" name= "object" type= "Object" >
</argument>
<argument index= "2" name= "callback" type= "StringName" >
</argument>
<description >
</description>
</method>
<method name= "set_gutter_draw" >
<return type= "void" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<argument index= "1" name= "draw" type= "bool" >
</argument>
<description >
</description>
</method>
<method name= "set_gutter_name" >
<return type= "void" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<argument index= "1" name= "name" type= "String" >
</argument>
<description >
</description>
</method>
<method name= "set_gutter_overwritable" >
<return type= "void" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<argument index= "1" name= "overwritable" type= "bool" >
</argument>
<description >
</description>
</method>
<method name= "set_gutter_type" >
<return type= "void" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<argument index= "1" name= "type" type= "int" enum= "TextEdit.GutterType" >
</argument>
<description >
</description>
</method>
<method name= "set_gutter_width" >
<return type= "void" >
</return>
<argument index= "0" name= "gutter" type= "int" >
</argument>
<argument index= "1" name= "width" type= "int" >
</argument>
<description >
</description>
</method>
2020-05-11 11:23:39 +00:00
<method name= "set_line" >
2017-11-24 08:16:27 +00:00
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
2020-05-11 11:23:39 +00:00
<argument index= "1" name= "new_text" type= "String" >
2017-11-24 08:16:27 +00:00
</argument>
<description >
2020-05-11 11:23:39 +00:00
Sets the text for a specific line.
2017-11-24 08:16:27 +00:00
</description>
</method>
2020-05-11 11:23:39 +00:00
<method name= "set_line_as_hidden" >
2020-05-01 12:24:49 +00:00
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
2020-05-11 11:23:39 +00:00
<argument index= "1" name= "enable" type= "bool" >
2020-05-01 12:24:49 +00:00
</argument>
<description >
2020-05-11 11:23:39 +00:00
If [code]true[/code], hides the line of the specified index.
2020-05-01 12:24:49 +00:00
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "set_line_gutter_clickable" >
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<argument index= "2" name= "clickable" type= "bool" >
</argument>
<description >
</description>
</method>
<method name= "set_line_gutter_icon" >
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<argument index= "2" name= "icon" type= "Texture2D" >
</argument>
<description >
</description>
</method>
<method name= "set_line_gutter_item_color" >
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<argument index= "2" name= "color" type= "Color" >
</argument>
<description >
</description>
</method>
<method name= "set_line_gutter_metadata" >
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<argument index= "2" name= "metadata" type= "Variant" >
</argument>
<description >
</description>
</method>
<method name= "set_line_gutter_text" >
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<argument index= "1" name= "gutter" type= "int" >
</argument>
<argument index= "2" name= "text" type= "String" >
</argument>
<description >
</description>
</method>
2020-08-12 11:49:10 +00:00
<method name= "set_opentype_feature" >
<return type= "void" >
</return>
<argument index= "0" name= "tag" type= "String" >
</argument>
<argument index= "1" name= "value" type= "int" >
</argument>
<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>
2020-11-04 14:38:26 +00:00
<method name= "set_selection_mode" >
<return type= "void" >
</return>
<argument index= "0" name= "mode" type= "int" enum= "TextEdit.SelectionMode" >
</argument>
<argument index= "1" name= "line" type= "int" default= "-1" >
</argument>
<argument index= "2" name= "column" type= "int" default= "-1" >
</argument>
<description >
</description>
</method>
2017-12-09 23:43:30 +00:00
<method name= "toggle_fold_line" >
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<description >
Toggle the folding of the code block at the given line.
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "undo" >
<return type= "void" >
</return>
<description >
Perform undo operation.
</description>
</method>
2017-11-24 08:16:27 +00:00
<method name= "unfold_line" >
<return type= "void" >
</return>
<argument index= "0" name= "line" type= "int" >
</argument>
<description >
2019-04-24 07:59:17 +00:00
Unfolds the given line, if folded.
2017-11-24 08:16:27 +00:00
</description>
</method>
<method name= "unhide_all_lines" >
<return type= "void" >
</return>
<description >
2019-06-18 13:07:31 +00:00
Unhide all lines that were previously set to hidden by [method set_line_as_hidden].
2017-11-24 08:16:27 +00:00
</description>
</method>
2017-09-12 20:42:36 +00:00
</methods>
<members >
2019-06-29 10:38:01 +00:00
<member name= "caret_blink" type= "bool" setter= "cursor_set_blink_enabled" getter= "cursor_get_blink_enabled" default= "false" >
2018-12-20 12:46:54 +00:00
If [code]true[/code], the caret (visual cursor) blinks.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "caret_blink_speed" type= "float" setter= "cursor_set_blink_speed" getter= "cursor_get_blink_speed" default= "0.65" >
2017-12-20 01:36:47 +00:00
Duration (in seconds) of a caret's blinking cycle.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "caret_block_mode" type= "bool" setter= "cursor_set_block_mode" getter= "cursor_is_block_mode" default= "false" >
2018-12-20 12:46:54 +00:00
If [code]true[/code], the caret displays as a rectangle.
If [code]false[/code], the caret displays as a bar.
2017-12-20 01:36:47 +00:00
</member>
2020-08-12 11:49:10 +00:00
<member name= "caret_mid_grapheme" type= "bool" setter= "set_mid_grapheme_caret_enabled" getter= "get_mid_grapheme_caret_enabled" default= "false" >
Allow moving caret, selecting and removing the individual composite character components.
Note: [kbd]Backspace[/kbd] is always removing individual composite character components.
</member>
2019-06-29 10:38:01 +00:00
<member name= "caret_moving_by_right_click" type= "bool" setter= "set_right_click_moves_caret" getter= "is_right_click_moving_caret" default= "true" >
2019-06-21 23:04:47 +00:00
If [code]true[/code], a right-click moves the cursor at the mouse position before displaying the context menu.
2018-12-20 12:46:54 +00:00
If [code]false[/code], the context menu disregards mouse location.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "context_menu_enabled" type= "bool" setter= "set_context_menu_enabled" getter= "is_context_menu_enabled" default= "true" >
2019-06-21 23:04:47 +00:00
If [code]true[/code], a right-click displays the context menu.
2017-11-13 08:24:36 +00:00
</member>
2020-08-12 11:49:10 +00: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 10:38:01 +00:00
<member name= "draw_spaces" type= "bool" setter= "set_draw_spaces" getter= "is_drawing_spaces" default= "false" >
2019-05-01 09:31:10 +00:00
If [code]true[/code], the "space" character will have a visible representation.
</member>
2019-06-29 10:38:01 +00:00
<member name= "draw_tabs" type= "bool" setter= "set_draw_tabs" getter= "is_drawing_tabs" default= "false" >
2019-05-21 11:26:37 +00:00
If [code]true[/code], the "tab" character will have a visible representation.
</member>
2019-09-24 11:34:03 +00:00
<member name= "focus_mode" type= "int" setter= "set_focus_mode" getter= "get_focus_mode" override= "true" enum= "Control.FocusMode" default= "2" />
2019-06-29 10:38:01 +00:00
<member name= "hiding_enabled" type= "bool" setter= "set_hiding_enabled" getter= "is_hiding_enabled" default= "false" >
2019-06-18 13:07:31 +00:00
If [code]true[/code], all lines that have been set to hidden by [method set_line_as_hidden], will not be visible.
2017-11-24 08:16:27 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "highlight_all_occurrences" type= "bool" setter= "set_highlight_all_occurrences" getter= "is_highlight_all_occurrences_enabled" default= "false" >
2019-06-13 09:12:52 +00:00
If [code]true[/code], all occurrences of the selected text will be highlighted.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "highlight_current_line" type= "bool" setter= "set_highlight_current_line" getter= "is_highlight_current_line_enabled" default= "false" >
2018-12-20 12:46:54 +00:00
If [code]true[/code], the line containing the cursor is highlighted.
2017-10-24 17:22:37 +00:00
</member>
2020-08-12 11:49:10 +00: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>
2019-08-22 12:49:30 +00:00
<member name= "minimap_draw" type= "bool" setter= "draw_minimap" getter= "is_drawing_minimap" default= "false" >
2020-07-03 12:42:43 +00:00
If [code]true[/code], a minimap is shown, providing an outline of your source code.
2019-08-22 12:49:30 +00:00
</member>
<member name= "minimap_width" type= "int" setter= "set_minimap_width" getter= "get_minimap_width" default= "80" >
2020-07-03 12:42:43 +00:00
The width, in pixels, of the minimap.
2019-08-22 12:49:30 +00:00
</member>
2019-09-24 11:34:03 +00:00
<member name= "mouse_default_cursor_shape" type= "int" setter= "set_default_cursor_shape" getter= "get_default_cursor_shape" override= "true" enum= "Control.CursorShape" default= "1" />
2019-06-29 10:38:01 +00: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 13:11:45 +00:00
If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text.
2017-10-21 10:02:08 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "readonly" type= "bool" setter= "set_readonly" getter= "is_readonly" default= "false" >
2018-12-20 12:46:54 +00:00
If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
2017-09-12 20:42:36 +00:00
</member>
2020-01-12 13:30:21 +00:00
<member name= "scroll_horizontal" type= "int" setter= "set_h_scroll" getter= "get_h_scroll" default= "0" >
2021-05-09 23:27:54 +00:00
If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
2020-01-12 13:30:21 +00:00
</member>
<member name= "scroll_vertical" type= "float" setter= "set_v_scroll" getter= "get_v_scroll" default= "0.0" >
2021-05-09 23:27:54 +00: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 13:30:21 +00:00
</member>
2019-09-24 09:44:48 +00:00
<member name= "selecting_enabled" type= "bool" setter= "set_selecting_enabled" getter= "is_selecting_enabled" default= "true" >
2020-07-03 11:24:40 +00: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 09:44:48 +00:00
</member>
<member name= "shortcut_keys_enabled" type= "bool" setter= "set_shortcut_keys_enabled" getter= "is_shortcut_keys_enabled" default= "true" >
2020-07-03 08:03:56 +00:00
If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled.
2019-09-24 09:44:48 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "smooth_scrolling" type= "bool" setter= "set_smooth_scroll_enable" getter= "is_smooth_scroll_enabled" default= "false" >
2019-06-13 09:12:52 +00:00
If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling.
2017-09-12 20:42:36 +00:00
</member>
2020-08-12 11:49:10 +00: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>
<member name= "structured_text_bidi_override_options" type= "Array" setter= "set_structured_text_bidi_override_options" getter= "get_structured_text_bidi_override_options" default= "[ ]" >
Set additional options for BiDi override.
</member>
2020-07-15 06:43:21 +00:00
<member name= "syntax_highlighter" type= "SyntaxHighlighter" setter= "set_syntax_highlighter" getter= "get_syntax_highlighter" >
2020-10-11 16:07:33 +00:00
Sets the [SyntaxHighlighter] to use.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "text" type= "String" setter= "set_text" getter= "get_text" default= """" >
2017-11-13 08:24:36 +00:00
String value of the [TextEdit].
</member>
2020-08-12 11:49:10 +00: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>
2019-06-29 10:38:01 +00:00
<member name= "v_scroll_speed" type= "float" setter= "set_v_scroll_speed" getter= "get_v_scroll_speed" default= "80.0" >
2019-04-12 12:04:15 +00:00
Vertical scroll sensitivity.
2018-01-11 22:38:35 +00:00
</member>
2020-08-09 09:06:36 +00: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>
2019-06-29 10:38:01 +00:00
<member name= "wrap_enabled" type= "bool" setter= "set_wrap_enabled" getter= "is_wrap_enabled" default= "false" >
2019-04-12 12:04:15 +00:00
If [code]true[/code], enables text wrapping when it goes beyond the edge of what is visible.
2017-09-12 20:42:36 +00:00
</member>
</members>
<signals >
2020-09-11 10:22:10 +00:00
<signal name= "cursor_changed" >
2017-09-12 20:42:36 +00:00
<description >
2020-09-11 10:22:10 +00:00
Emitted when the cursor changes.
2017-09-12 20:42:36 +00:00
</description>
</signal>
2020-09-11 10:22:10 +00:00
<signal name= "gutter_added" >
2017-09-12 20:42:36 +00:00
<description >
</description>
</signal>
2020-09-11 10:22:10 +00:00
<signal name= "gutter_clicked" >
<argument index= "0" name= "line" type= "int" >
2019-04-23 19:39:09 +00:00
</argument>
2020-09-11 10:22:10 +00:00
<argument index= "1" name= "gutter" type= "int" >
2019-04-23 19:39:09 +00:00
</argument>
<description >
</description>
</signal>
2020-09-11 10:22:10 +00:00
<signal name= "gutter_removed" >
<description >
</description>
</signal>
<signal name= "lines_edited_from" >
<argument index= "0" name= "from_line" type= "int" >
</argument>
<argument index= "1" name= "to_line" type= "int" >
2020-07-15 06:43:21 +00:00
</argument>
<description >
</description>
</signal>
2017-09-12 20:42:36 +00:00
<signal name= "request_completion" >
<description >
</description>
</signal>
<signal name= "symbol_lookup" >
<argument index= "0" name= "symbol" type= "String" >
</argument>
<argument index= "1" name= "row" type= "int" >
</argument>
<argument index= "2" name= "column" type= "int" >
</argument>
<description >
</description>
</signal>
2020-03-13 16:16:44 +00:00
<signal name= "symbol_validate" >
<argument index= "0" name= "symbol" type= "String" >
</argument>
<description >
</description>
</signal>
2017-09-12 20:42:36 +00:00
<signal name= "text_changed" >
<description >
Emitted when the text changes.
</description>
</signal>
</signals>
<constants >
2017-11-24 22:16:30 +00:00
<constant name= "SEARCH_MATCH_CASE" value= "1" enum= "SearchFlags" >
2017-09-12 20:42:36 +00:00
Match case when searching.
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "SEARCH_WHOLE_WORDS" value= "2" enum= "SearchFlags" >
2017-09-12 20:42:36 +00:00
Match whole words when searching.
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "SEARCH_BACKWARDS" value= "4" enum= "SearchFlags" >
2017-09-12 20:42:36 +00:00
Search from end to beginning.
</constant>
2020-11-04 14:38:26 +00:00
<constant name= "SELECTION_MODE_NONE" value= "0" enum= "SelectionMode" >
</constant>
<constant name= "SELECTION_MODE_SHIFT" value= "1" enum= "SelectionMode" >
</constant>
<constant name= "SELECTION_MODE_POINTER" value= "2" enum= "SelectionMode" >
</constant>
<constant name= "SELECTION_MODE_WORD" value= "3" enum= "SelectionMode" >
</constant>
<constant name= "SELECTION_MODE_LINE" value= "4" enum= "SelectionMode" >
</constant>
2020-09-11 10:22:10 +00:00
<constant name= "GUTTER_TYPE_STRING" value= "0" enum= "GutterType" >
</constant>
<constant name= "GUTTER_TPYE_ICON" value= "1" enum= "GutterType" >
</constant>
<constant name= "GUTTER_TPYE_CUSTOM" value= "2" enum= "GutterType" >
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "MENU_CUT" value= "0" enum= "MenuItems" >
2019-11-08 07:33:48 +00:00
Cuts (copies and clears) the selected text.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "MENU_COPY" value= "1" enum= "MenuItems" >
2017-12-20 01:36:47 +00:00
Copies the selected text.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "MENU_PASTE" value= "2" enum= "MenuItems" >
2017-12-20 01:36:47 +00:00
Pastes the clipboard text over the selected text (or at the cursor's position).
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "MENU_CLEAR" value= "3" enum= "MenuItems" >
2017-12-20 01:36:47 +00:00
Erases the whole [TextEdit] text.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "MENU_SELECT_ALL" value= "4" enum= "MenuItems" >
2017-12-20 01:36:47 +00:00
Selects the whole [TextEdit] text.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "MENU_UNDO" value= "5" enum= "MenuItems" >
2017-12-20 01:36:47 +00:00
Undoes the previous action.
2017-09-12 20:42:36 +00:00
</constant>
2018-12-04 20:57:07 +00:00
<constant name= "MENU_REDO" value= "6" enum= "MenuItems" >
2019-06-13 09:12:52 +00:00
Redoes the previous action.
2018-12-04 20:57:07 +00:00
</constant>
2020-08-12 11:49:10 +00: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 09:12:52 +00:00
Represents the size of the [enum MenuItems] enum.
2017-09-12 20:42:36 +00:00
</constant>
</constants>
<theme_items >
2019-10-26 14:40:31 +00:00
<theme_item name= "background_color" type= "Color" default= "Color( 0, 0, 0, 0 )" >
2020-10-11 16:07:33 +00:00
Sets the background [Color] of this [TextEdit].
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "brace_mismatch_color" type= "Color" default= "Color( 1, 0.2, 0.2, 1 )" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "caret_background_color" type= "Color" default= "Color( 0, 0, 0, 1 )" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-07-09 07:13:00 +00:00
<theme_item name= "caret_color" type= "Color" default= "Color( 0.88, 0.88, 0.88, 1 )" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "code_folding_color" type= "Color" default= "Color( 0.8, 0.8, 0.8, 0.8 )" >
2017-12-09 23:43:30 +00:00
</theme_item>
2017-09-12 20:42:36 +00:00
<theme_item name= "completion" type= "StyleBox" >
</theme_item>
2019-07-09 07:13:00 +00:00
<theme_item name= "completion_background_color" type= "Color" default= "Color( 0.17, 0.16, 0.2, 1 )" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-07-09 07:13:00 +00:00
<theme_item name= "completion_existing_color" type= "Color" default= "Color( 0.87, 0.87, 0.87, 0.13 )" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-07-09 07:13:00 +00:00
<theme_item name= "completion_font_color" type= "Color" default= "Color( 0.67, 0.67, 0.67, 1 )" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "completion_lines" type= "int" default= "7" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "completion_max_width" type= "int" default= "50" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "completion_scroll_color" type= "Color" default= "Color( 1, 1, 1, 1 )" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "completion_scroll_width" type= "int" default= "3" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-07-09 07:13:00 +00:00
<theme_item name= "completion_selected_color" type= "Color" default= "Color( 0.26, 0.26, 0.27, 1 )" >
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "current_line_color" type= "Color" default= "Color( 0.25, 0.25, 0.26, 0.8 )" >
2019-06-25 10:57:35 +00:00
Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled.
2017-09-12 20:42:36 +00:00
</theme_item>
<theme_item name= "focus" type= "StyleBox" >
</theme_item>
<theme_item name= "font" type= "Font" >
2019-06-25 10:57:35 +00:00
Sets the default [Font].
2017-09-12 20:42:36 +00:00
</theme_item>
2019-07-09 07:13:00 +00:00
<theme_item name= "font_color" type= "Color" default= "Color( 0.88, 0.88, 0.88, 1 )" >
2019-06-25 10:57:35 +00:00
Sets the font [Color].
2017-09-12 20:42:36 +00:00
</theme_item>
2020-12-25 21:45:28 +00:00
<theme_item name= "font_outline_color" type= "Color" default= "Color( 1, 1, 1, 1 )" >
The tint of text outline of the [TextEdit].
</theme_item>
2020-12-08 13:11:45 +00:00
<theme_item name= "font_readonly_color" type= "Color" default= "Color( 0.88, 0.88, 0.88, 0.5 )" >
2019-06-26 14:02:47 +00:00
</theme_item>
2020-12-08 13:11:45 +00:00
<theme_item name= "font_selected_color" type= "Color" default= "Color( 0, 0, 0, 1 )" >
2020-04-19 21:33:01 +00:00
Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
2017-09-12 20:42:36 +00:00
</theme_item>
2020-08-12 11:49:10 +00:00
<theme_item name= "font_size" type= "int" >
Sets default font size.
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "line_spacing" type= "int" default= "4" >
2019-06-25 10:57:35 +00:00
Sets the spacing between the lines.
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "mark_color" type= "Color" default= "Color( 1, 0.4, 0.4, 0.4 )" >
2019-06-25 10:57:35 +00:00
Sets the [Color] of marked text.
2017-09-12 20:42:36 +00:00
</theme_item>
<theme_item name= "normal" type= "StyleBox" >
2019-06-25 10:57:35 +00:00
Sets the [StyleBox] of this [TextEdit].
2017-09-12 20:42:36 +00:00
</theme_item>
2020-12-25 21:45:28 +00:00
<theme_item name= "outline_size" type= "int" default= "0" >
The size of the text outline.
</theme_item>
2017-12-07 07:23:08 +00:00
<theme_item name= "read_only" type= "StyleBox" >
2019-06-25 10:57:35 +00:00
Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled.
2017-12-07 07:23:08 +00:00
</theme_item>
2019-07-09 07:13:00 +00:00
<theme_item name= "selection_color" type= "Color" default= "Color( 0.49, 0.49, 0.49, 1 )" >
2019-06-25 10:57:35 +00:00
Sets the highlight [Color] of text selections.
2017-09-12 20:42:36 +00:00
</theme_item>
2020-02-12 08:59:06 +00:00
<theme_item name= "space" type= "Texture2D" >
2020-08-12 11:49:10 +00:00
Sets a custom [Texture2D] for space text characters.
2019-05-21 11:26:37 +00:00
</theme_item>
2020-02-12 08:59:06 +00:00
<theme_item name= "tab" type= "Texture2D" >
Sets a custom [Texture2D] for tab text characters.
2017-09-12 20:42:36 +00:00
</theme_item>
2019-06-29 10:38:01 +00:00
<theme_item name= "word_highlighted_color" type= "Color" default= "Color( 0.8, 0.9, 0.9, 0.15 )" >
2019-06-25 10:57:35 +00:00
Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
2017-09-12 20:42:36 +00:00
</theme_item>
</theme_items>
</class>