2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2021-04-26 13:14:51 +02:00
<class name= "TextEdit" inherits= "Control" version= "3.4" >
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 [code]Alt[/code], 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 >
<method name= "add_color_region" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "begin_key" type= "String" />
<argument index= "1" name= "end_key" type= "String" />
<argument index= "2" name= "color" type= "Color" />
<argument index= "3" name= "line_only" type= "bool" default= "false" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Adds color region (given the delimiters) and its colors.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "add_keyword_color" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "keyword" type= "String" />
<argument index= "1" name= "color" type= "Color" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Adds a [code]keyword[/code] and its [Color].
2017-09-12 22:42:36 +02:00
</description>
</method>
2017-11-24 09:16:27 +01:00
<method name= "can_fold" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "line" type= "int" />
2017-11-24 09:16:27 +01:00
<description >
2019-04-24 09:59:17 +02:00
Returns if the given line is foldable, that is, it has indented lines right below it.
2017-11-24 09:16:27 +01:00
</description>
</method>
2019-06-24 10:39:59 +02:00
<method name= "center_viewport_to_cursor" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2019-06-24 10:39:59 +02:00
<description >
2020-07-03 12:39:17 +02: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 10:39:59 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "clear_colors" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
2019-10-20 14:37:36 +02:00
Clears all custom syntax coloring information previously added with [method add_color_region] or [method add_keyword_color].
2017-09-12 22:42:36 +02:00
</description>
</method>
<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 >
2019-06-13 11:12:52 +02:00
Copy's the current text selection.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "cursor_get_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 column the editing cursor is at.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "cursor_get_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 line the editing cursor is at.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "cursor_set_column" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "column" type= "int" />
<argument index= "1" name= "adjust_viewport" type= "bool" default= "true" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-13 11:12:52 +02:00
Moves the cursor at the specified [code]column[/code] index.
2019-11-02 12:14:15 +01: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 22:42:36 +02:00
</description>
</method>
<method name= "cursor_set_line" >
2021-07-30 15:28:05 +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" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-13 11:12:52 +02:00
Moves the cursor at the specified [code]line[/code] index.
2019-11-02 12:14:15 +01: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 22:42:36 +02:00
</description>
</method>
<method name= "cut" >
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
Cut's the current selection.
2017-09-12 22:42:36 +02:00
</description>
</method>
2017-12-16 20:34:16 +01:00
<method name= "deselect" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-12-16 20:34:16 +01:00
<description >
2019-06-13 11:12:52 +02:00
Deselects the current selection.
2017-12-16 20:34:16 +01:00
</description>
</method>
2017-11-24 09:16:27 +01:00
<method name= "fold_all_lines" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-11-24 09:16:27 +01:00
<description >
2019-04-24 09:59:17 +02:00
Folds all lines that are possible to be folded (see [method can_fold]).
2017-11-24 09:16:27 +01:00
</description>
</method>
<method name= "fold_line" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
2017-11-24 09:16:27 +01:00
<description >
2019-04-24 09:59:17 +02:00
Folds the given line, if possible (see [method can_fold]).
2017-11-24 09:16:27 +01:00
</description>
</method>
2018-05-30 14:02:51 +02:00
<method name= "get_breakpoints" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Array" />
2018-05-30 14:02:51 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns an array containing the line number of each breakpoint.
2018-05-30 14:02:51 +02:00
</description>
</method>
2018-04-10 10:12:42 +02:00
<method name= "get_keyword_color" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Color" />
<argument index= "0" name= "keyword" type= "String" />
2018-04-10 10:12:42 +02:00
<description >
2019-06-13 11:12:52 +02:00
Returns the [Color] of the specified [code]keyword[/code].
2018-04-10 10:12:42 +02:00
</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>
<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>
<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 22:10:07 +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 CanvasItem.visible] property.
2017-09-12 22:42:36 +02:00
</description>
</method>
<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>
<method name= "get_selection_text" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the text inside the selection.
2017-09-12 22:42:36 +02:00
</description>
</method>
<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>
<method name= "get_word_under_cursor" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
2017-09-12 22:42:36 +02:00
<description >
2020-11-13 15:57:18 +01:00
Returns a [String] text with the word under the caret (text cursor) location.
2017-09-12 22:42:36 +02:00
</description>
</method>
2018-04-10 10:12:42 +02:00
<method name= "has_keyword_color" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "keyword" type= "String" />
2018-04-10 10:12:42 +02:00
<description >
2019-06-13 11:12:52 +02:00
Returns whether the specified [code]keyword[/code] has a color set to it or not.
2018-04-10 10:12:42 +02:00
</description>
</method>
2021-08-17 05:41:49 +02:00
<method name= "has_redo" qualifiers= "const" >
<return type= "bool" />
<description >
Returns [code]true[/code] if a "redo" action is available.
</description>
</method>
<method name= "has_undo" qualifiers= "const" >
<return type= "bool" />
<description >
Returns [code]true[/code] if an "undo" action is available.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "insert_text_at_cursor" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "text" type= "String" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-13 11:12:52 +02:00
Insert the specified text at the cursor position.
2017-09-12 22:42:36 +02:00
</description>
</method>
2017-11-24 09:16:27 +01:00
<method name= "is_folded" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "line" type= "int" />
2017-11-24 09:16:27 +01:00
<description >
2019-06-13 11:12:52 +02:00
Returns whether the line at the specified index is folded or not.
2017-11-24 09:16:27 +01:00
</description>
</method>
<method name= "is_line_hidden" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "line" type= "int" />
2017-11-24 09:16:27 +01:00
<description >
2019-06-13 11:12:52 +02:00
Returns whether the line at the specified index is hidden or not.
2017-11-24 09:16:27 +01:00
</description>
</method>
2021-01-27 22:25:45 +01:00
<method name= "is_line_set_as_bookmark" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "line" type= "int" />
2021-01-27 22:25:45 +01:00
<description >
Returns [code]true[/code] when the specified [code]line[/code] is bookmarked.
</description>
</method>
<method name= "is_line_set_as_breakpoint" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "line" type= "int" />
2021-01-27 22:25:45 +01:00
<description >
Returns [code]true[/code] when the specified [code]line[/code] has a breakpoint.
</description>
</method>
<method name= "is_line_set_as_safe" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "line" type= "int" />
2021-01-27 22:25:45 +01:00
<description >
Returns [code]true[/code] when the specified [code]line[/code] is marked as safe.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "is_selection_active" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns [code]true[/code] if the selection is active.
2017-09-12 22:42:36 +02:00
</description>
</method>
<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>
<method name= "paste" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
Paste the current selection.
</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>
2018-05-30 14:02:51 +02:00
<method name= "remove_breakpoints" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2018-05-30 14:02:51 +02:00
<description >
2019-06-22 01:04:47 +02:00
Removes all the breakpoints. This will not fire the [signal breakpoint_toggled] signal.
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-30 15:28:05 +02:00
<return type= "PoolIntArray" />
<argument index= "0" name= "key" type= "String" />
<argument index= "1" name= "flags" type= "int" />
<argument index= "2" name= "from_line" type= "int" />
<argument index= "3" name= "from_column" 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.
Returns an empty [code]PoolIntArray[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g:
2019-10-31 12:35:23 +01:00
[codeblock]
var result = search(key, flags, line, column)
2019-11-08 08:33:48 +01:00
if result.size() > 0:
2020-01-23 18:41:49 +01:00
# Result found.
2019-10-31 12:35:23 +01:00
var res_line = result[TextEdit.SEARCH_RESULT_LINE]
var res_column = result[TextEdit.SEARCH_RESULT_COLUMN]
[/codeblock]
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>
2020-05-07 13:47:06 +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-07 13:47:06 +02:00
Sets the text for a specific line.
2017-11-24 09:16:27 +01:00
</description>
</method>
2021-01-27 22:25:45 +01:00
<method name= "set_line_as_bookmark" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "bookmark" type= "bool" />
2021-01-27 22:25:45 +01:00
<description >
Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes the bookmark if [code]bookmark[/code] is false.
Bookmarks are shown in the [member breakpoint_gutter].
</description>
</method>
<method name= "set_line_as_breakpoint" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "breakpoint" type= "bool" />
2021-01-27 22:25:45 +01:00
<description >
Adds or removes the breakpoint in [code]line[/code]. Breakpoints are shown in the [member breakpoint_gutter].
</description>
</method>
2020-05-07 13:47:06 +02:00
<method name= "set_line_as_hidden" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "enable" type= "bool" />
2020-05-01 14:24:49 +02:00
<description >
2020-05-07 13:47:06 +02:00
If [code]true[/code], hides the line of the specified index.
2020-05-01 14:24:49 +02:00
</description>
</method>
2021-01-27 22:25:45 +01:00
<method name= "set_line_as_safe" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
<argument index= "1" name= "safe" type= "bool" />
2021-01-27 22:25:45 +01:00
<description >
If [code]true[/code], marks the [code]line[/code] as safe.
This will show the line number with the color provided in the [code]safe_line_number_color[/code] theme property.
</description>
</method>
2017-12-10 00:43:30 +01:00
<method name= "toggle_fold_line" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
2017-12-10 00:43:30 +01:00
<description >
Toggle the folding of the code block at the given line.
</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>
2017-11-24 09:16:27 +01:00
<method name= "unfold_line" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "line" type= "int" />
2017-11-24 09:16:27 +01:00
<description >
2019-04-24 09:59:17 +02:00
Unfolds the given line, if folded.
2017-11-24 09:16:27 +01:00
</description>
</method>
<method name= "unhide_all_lines" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-11-24 09:16:27 +01:00
<description >
2019-06-18 15:07:31 +02:00
Unhide all lines that were previously set to hidden by [method set_line_as_hidden].
2017-11-24 09:16:27 +01:00
</description>
</method>
2017-09-12 22:42:36 +02:00
</methods>
<members >
2021-11-21 14:34:30 +01:00
<member name= "bookmark_gutter" type= "bool" setter= "set_bookmark_gutter_enabled" getter= "is_bookmark_gutter_enabled" default= "false" >
If [code]true[/code], the bookmark gutter is visible.
</member>
2019-06-29 12:38:01 +02:00
<member name= "breakpoint_gutter" type= "bool" setter= "set_breakpoint_gutter_enabled" getter= "is_breakpoint_gutter_enabled" default= "false" >
2018-12-20 13:46:54 +01:00
If [code]true[/code], the breakpoint gutter is visible.
2018-05-30 14:02:51 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "caret_blink" type= "bool" setter= "cursor_set_blink_enabled" getter= "cursor_get_blink_enabled" default= "false" >
2018-12-20 13:46:54 +01:00
If [code]true[/code], the caret (visual cursor) blinks.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "caret_blink_speed" type= "float" setter= "cursor_set_blink_speed" getter= "cursor_get_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>
2019-06-29 12:38:01 +02:00
<member name= "caret_block_mode" type= "bool" setter= "cursor_set_block_mode" getter= "cursor_is_block_mode" default= "false" >
2018-12-20 13:46:54 +01:00
If [code]true[/code], the caret displays as a rectangle.
If [code]false[/code], the caret displays as a bar.
2017-12-20 02:36:47 +01:00
</member>
2019-06-29 12:38:01 +02: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-22 01:04:47 +02:00
If [code]true[/code], a right-click moves the cursor 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>
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>
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>
2019-09-24 13:34:03 +02: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 12:38:01 +02:00
<member name= "fold_gutter" type= "bool" setter= "set_draw_fold_gutter" getter= "is_drawing_fold_gutter" default= "false" >
2019-04-24 09:59:17 +02:00
If [code]true[/code], the fold gutter is visible. This enables folding groups of indented lines.
</member>
2019-06-29 12:38:01 +02:00
<member name= "hiding_enabled" type= "bool" setter= "set_hiding_enabled" getter= "is_hiding_enabled" default= "false" >
2019-06-18 15:07:31 +02: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 09:16:27 +01:00
</member>
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>
2019-08-22 14:49:30 +02:00
<member name= "minimap_draw" type= "bool" setter= "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>
2019-09-24 13:34:03 +02: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 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-04-19 23:33:01 +02:00
If [code]true[/code], custom [code]font_color_selected[/code] will be used for selected text.
2017-10-21 12:02:08 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "readonly" type= "bool" setter= "set_readonly" getter= "is_readonly" default= "false" >
2018-12-20 13:46:54 +01:00
If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
2017-09-12 22:42:36 +02:00
</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>
<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>
2019-06-29 12:38:01 +02:00
<member name= "show_line_numbers" type= "bool" setter= "set_show_line_numbers" getter= "is_show_line_numbers_enabled" default= "false" >
2018-12-20 13:46:54 +01:00
If [code]true[/code], line numbers are displayed to the left of the text.
2017-11-09 21:46:29 +01:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "smooth_scrolling" type= "bool" setter= "set_smooth_scroll_enable" getter= "is_smooth_scroll_enabled" default= "false" >
2019-06-13 11:12:52 +02: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 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "syntax_highlighting" type= "bool" setter= "set_syntax_coloring" getter= "is_syntax_coloring_enabled" default= "false" >
2019-06-13 11:12:52 +02:00
If [code]true[/code], any custom color properties that have been set for this [TextEdit] will be visible.
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>
2019-06-29 12:38:01 +02:00
<member name= "v_scroll_speed" type= "float" setter= "set_v_scroll_speed" getter= "get_v_scroll_speed" default= "80.0" >
2019-04-12 14:04:15 +02:00
Vertical scroll sensitivity.
2018-01-11 23:38:35 +01:00
</member>
2020-08-09 16:15:37 +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>
2019-06-29 12:38:01 +02:00
<member name= "wrap_enabled" type= "bool" setter= "set_wrap_enabled" getter= "is_wrap_enabled" default= "false" >
2019-04-12 14:04:15 +02:00
If [code]true[/code], enables text wrapping when it goes beyond the edge of what is visible.
2017-09-12 22:42:36 +02:00
</member>
</members>
<signals >
<signal name= "breakpoint_toggled" >
2021-07-30 15:28:05 +02:00
<argument index= "0" name= "row" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
Emitted when a breakpoint is placed via the breakpoint gutter.
</description>
</signal>
<signal name= "cursor_changed" >
<description >
Emitted when the cursor changes.
</description>
</signal>
2019-04-23 21:39:09 +02:00
<signal name= "info_clicked" >
2021-07-30 15:28:05 +02:00
<argument index= "0" name= "row" type= "int" />
<argument index= "1" name= "info" type= "String" />
2019-04-23 21:39:09 +02:00
<description >
2019-06-13 11:12:52 +02:00
Emitted when the info icon is clicked.
2019-04-23 21:39:09 +02:00
</description>
</signal>
2017-09-12 22:42:36 +02:00
<signal name= "request_completion" >
<description >
</description>
</signal>
<signal name= "symbol_lookup" >
2021-07-30 15:28:05 +02:00
<argument index= "0" name= "symbol" type= "String" />
<argument index= "1" name= "row" type= "int" />
<argument index= "2" name= "column" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
</description>
</signal>
<signal name= "text_changed" >
<description >
Emitted when the text changes.
</description>
</signal>
</signals>
<constants >
2017-11-24 23:16:30 +01:00
<constant name= "SEARCH_MATCH_CASE" value= "1" enum= "SearchFlags" >
2017-09-12 22:42:36 +02:00
Match case when searching.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "SEARCH_WHOLE_WORDS" value= "2" enum= "SearchFlags" >
2017-09-12 22:42:36 +02:00
Match whole words when searching.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "SEARCH_BACKWARDS" value= "4" enum= "SearchFlags" >
2017-09-12 22:42:36 +02:00
Search from end to beginning.
</constant>
2019-10-31 12:35:23 +01:00
<constant name= "SEARCH_RESULT_COLUMN" value= "0" enum= "SearchResult" >
2019-11-08 08:33:48 +01:00
Used to access the result column from [method search].
2019-10-31 12:35:23 +01:00
</constant>
<constant name= "SEARCH_RESULT_LINE" value= "1" enum= "SearchResult" >
2019-11-08 08:33:48 +01:00
Used to access the result line from [method search].
2019-10-31 12:35:23 +01:00
</constant>
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>
<constant name= "MENU_MAX" value= "7" 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>
</constants>
<theme_items >
2021-08-06 17:07:21 +02:00
<theme_item name= "background_color" data_type= "color" type= "Color" default= "Color( 0, 0, 0, 0 )" >
2019-06-25 12:57:35 +02:00
Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "bookmark_color" data_type= "color" type= "Color" default= "Color( 0.08, 0.49, 0.98, 1 )" >
2019-06-25 12:57:35 +02:00
Sets the [Color] of the bookmark marker. [member syntax_highlighting] has to be enabled.
2019-05-21 13:26:37 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "brace_mismatch_color" data_type= "color" type= "Color" default= "Color( 1, 0.2, 0.2, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "breakpoint_color" data_type= "color" type= "Color" default= "Color( 0.8, 0.8, 0.4, 0.2 )" >
2019-06-25 12:57:35 +02:00
Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "caret_background_color" data_type= "color" type= "Color" default= "Color( 0, 0, 0, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "caret_color" data_type= "color" type= "Color" default= "Color( 0.88, 0.88, 0.88, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "code_folding_color" data_type= "color" type= "Color" default= "Color( 0.8, 0.8, 0.8, 0.8 )" >
2017-12-10 00:43:30 +01:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "completion" data_type= "style" type= "StyleBox" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "completion_background_color" data_type= "color" type= "Color" default= "Color( 0.17, 0.16, 0.2, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "completion_existing_color" data_type= "color" type= "Color" default= "Color( 0.87, 0.87, 0.87, 0.13 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "completion_font_color" data_type= "color" type= "Color" default= "Color( 0.67, 0.67, 0.67, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "completion_lines" data_type= "constant" type= "int" default= "7" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "completion_max_width" data_type= "constant" type= "int" default= "50" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "completion_scroll_color" data_type= "color" type= "Color" default= "Color( 1, 1, 1, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "completion_scroll_width" data_type= "constant" type= "int" default= "3" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "completion_selected_color" data_type= "color" type= "Color" default= "Color( 0.26, 0.26, 0.27, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "current_line_color" data_type= "color" type= "Color" default= "Color( 0.25, 0.25, 0.26, 0.8 )" >
2019-06-25 12:57:35 +02:00
Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "executing_line_color" data_type= "color" type= "Color" default= "Color( 0.2, 0.8, 0.2, 0.4 )" >
2019-04-30 14:23:59 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "focus" data_type= "style" type= "StyleBox" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "fold" data_type= "icon" type= "Texture" >
2019-04-30 14:23:59 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "folded" data_type= "icon" type= "Texture" >
2019-04-30 14:23:59 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "font" data_type= "font" type= "Font" >
2019-06-25 12:57:35 +02:00
Sets the default [Font].
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "font_color" data_type= "color" type= "Color" default= "Color( 0.88, 0.88, 0.88, 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-06 17:07:21 +02:00
<theme_item name= "font_color_readonly" data_type= "color" type= "Color" default= "Color( 0.88, 0.88, 0.88, 0.5 )" >
2019-06-26 16:02:47 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "font_color_selected" data_type= "color" type= "Color" default= "Color( 0, 0, 0, 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-08-06 17:07:21 +02:00
<theme_item name= "function_color" data_type= "color" type= "Color" default= "Color( 0.4, 0.64, 0.81, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "line_number_color" data_type= "color" type= "Color" default= "Color( 0.67, 0.67, 0.67, 0.4 )" >
2019-06-25 12:57:35 +02:00
Sets the [Color] of the line numbers. [member show_line_numbers] has to be enabled.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "line_spacing" data_type= "constant" type= "int" default= "4" >
2019-06-25 12:57:35 +02:00
Sets the spacing between the lines.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "mark_color" data_type= "color" type= "Color" default= "Color( 1, 0.4, 0.4, 0.4 )" >
2019-06-25 12:57:35 +02:00
Sets the [Color] of marked text.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "member_variable_color" data_type= "color" type= "Color" default= "Color( 0.9, 0.31, 0.35, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "normal" data_type= "style" type= "StyleBox" >
2019-06-25 12:57:35 +02:00
Sets the [StyleBox] of this [TextEdit].
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "number_color" data_type= "color" type= "Color" default= "Color( 0.92, 0.58, 0.2, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "read_only" data_type= "style" type= "StyleBox" >
2019-06-25 12:57:35 +02:00
Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled.
2017-12-07 08:23:08 +01:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "safe_line_number_color" data_type= "color" type= "Color" default= "Color( 0.67, 0.78, 0.67, 0.6 )" >
2018-07-26 11:56:21 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "selection_color" data_type= "color" type= "Color" default= "Color( 0.49, 0.49, 0.49, 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-08-06 17:07:21 +02:00
<theme_item name= "space" data_type= "icon" type= "Texture" >
2019-05-21 13:26:37 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "symbol_color" data_type= "color" type= "Color" default= "Color( 0.94, 0.94, 0.94, 1 )" >
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "tab" data_type= "icon" type= "Texture" >
2019-06-25 12:57:35 +02:00
Sets a custom [Texture] for tab text characters.
2017-09-12 22:42:36 +02:00
</theme_item>
2021-08-06 17:07:21 +02:00
<theme_item name= "word_highlighted_color" data_type= "color" type= "Color" default= "Color( 0.8, 0.9, 0.9, 0.15 )" >
2019-06-25 12:57:35 +02:00
Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
2017-09-12 22:42:36 +02:00
</theme_item>
</theme_items>
</class>