2020-09-11 10:22:10 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "CodeEdit" inherits= "TextEdit" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2020-09-11 10:22:10 +00:00
<brief_description >
2023-04-30 14:26:09 +00:00
A multiline text editor designed for editing code.
2020-09-11 10:22:10 +00:00
</brief_description>
<description >
2023-04-30 14:26:09 +00:00
CodeEdit is a specialized [TextEdit] designed for editing plain text code files. It has many features commonly found in code editors such as line numbers, line folding, code completion, indent management, and string/comment management.
[b]Note:[/b] Regardless of locale, [CodeEdit] will by default always use left-to-right text direction to correctly display source code.
2020-09-11 10:22:10 +00:00
</description>
<tutorials >
</tutorials>
<methods >
2021-05-22 14:11:04 +00:00
<method name= "_confirm_code_completion" qualifiers= "virtual" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "replace" type= "bool" />
2021-05-22 14:11:04 +00:00
<description >
2024-01-22 23:27:19 +00:00
Override this method to define how the selected entry should be inserted. If [param replace] is [code]true[/code], any existing text should be replaced.
2021-05-22 14:11:04 +00:00
</description>
</method>
2021-08-22 01:52:44 +00:00
<method name= "_filter_code_completion_candidates" qualifiers= "virtual const" >
2022-08-05 01:41:48 +00:00
<return type= "Dictionary[]" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "candidates" type= "Dictionary[]" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
Override this method to define what items in [param candidates] should be displayed.
Both [param candidates] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content.
2021-05-22 14:11:04 +00:00
</description>
</method>
<method name= "_request_code_completion" qualifiers= "virtual" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "force" type= "bool" />
2021-05-22 14:11:04 +00:00
<description >
2024-01-22 23:27:19 +00:00
Override this method to define what happens when the user requests code completion. If [param force] is [code]true[/code], any checks should be bypassed.
2021-05-22 14:11:04 +00:00
</description>
</method>
2021-06-28 16:14:44 +00:00
<method name= "add_auto_brace_completion_pair" >
2021-07-01 16:40:59 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
<param index= "1" name= "end_key" type= "String" />
2021-06-28 16:14:44 +00:00
<description >
Adds a brace pair.
Both the start and end keys must be symbols. Only the start key has to be unique.
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "add_code_completion_option" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "type" type= "int" enum= "CodeEdit.CodeCompletionKind" />
<param index= "1" name= "display_text" type= "String" />
<param index= "2" name= "insert_text" type= "String" />
<param index= "3" name= "text_color" type= "Color" default= "Color(1, 1, 1, 1)" />
<param index= "4" name= "icon" type= "Resource" default= "null" />
2024-01-30 20:03:28 +00:00
<param index= "5" name= "value" type= "Variant" default= "null" />
2023-05-23 03:12:34 +00:00
<param index= "6" name= "location" type= "int" default= "1024" />
2021-05-22 14:11:04 +00:00
<description >
Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list.
2023-05-23 03:12:34 +00:00
[param location] indicates location of the option relative to the location of the code completion query. See [enum CodeEdit.CodeCompletionLocation] for how to set this value.
2021-10-05 12:24:34 +00:00
[b]Note:[/b] This list will replace all current candidates.
2021-05-22 14:11:04 +00:00
</description>
</method>
<method name= "add_comment_delimiter" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
<param index= "1" name= "end_key" type= "String" />
<param index= "2" name= "line_only" type= "bool" default= "false" />
2021-05-22 14:11:04 +00:00
<description >
2024-02-29 23:59:28 +00:00
Adds a comment delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters.
If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
2021-05-22 14:11:04 +00:00
</description>
</method>
<method name= "add_string_delimiter" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
<param index= "1" name= "end_key" type= "String" />
<param index= "2" name= "line_only" type= "bool" default= "false" />
2021-05-22 14:11:04 +00:00
<description >
2024-02-29 23:59:28 +00:00
Defines a string delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters.
If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
2021-05-22 14:11:04 +00:00
</description>
</method>
2021-03-13 14:09:49 +00:00
<method name= "can_fold_line" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
2021-03-13 14:09:49 +00:00
<description >
Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block.
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "cancel_code_completion" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-05-22 14:11:04 +00:00
<description >
Cancels the autocomplete menu.
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "clear_bookmarked_lines" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Clears all bookmarked lines.
2020-09-11 10:22:10 +00:00
</description>
</method>
<method name= "clear_breakpointed_lines" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Clears all breakpointed lines.
2020-09-11 10:22:10 +00:00
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "clear_comment_delimiters" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-05-22 14:11:04 +00:00
<description >
Removes all comment delimiters.
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "clear_executing_lines" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Clears all executed lines.
2020-09-11 10:22:10 +00:00
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "clear_string_delimiters" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-05-22 14:11:04 +00:00
<description >
Removes all string delimiters.
</description>
</method>
<method name= "confirm_code_completion" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "replace" type= "bool" default= "false" />
2021-05-22 14:11:04 +00:00
<description >
2024-01-22 23:27:19 +00:00
Inserts the selected entry into the text. If [param replace] is [code]true[/code], any existing text is replaced rather than merged.
2021-05-22 14:11:04 +00:00
</description>
</method>
2023-05-01 20:41:50 +00:00
<method name= "convert_indent" >
<return type= "void" />
<param index= "0" name= "from_line" type= "int" default= "-1" />
<param index= "1" name= "to_line" type= "int" default= "-1" />
<description >
Converts the indents of lines between [param from_line] and [param to_line] to tabs or spaces as set by [member indent_use_spaces].
Values of [code]-1[/code] convert the entire text.
</description>
</method>
2023-03-12 16:48:37 +00:00
<method name= "create_code_region" >
<return type= "void" />
<description >
Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see [method add_comment_delimiter]).
A code region is a part of code that is highlighted when folded and can help organize your script.
Code region start and end tags can be customized (see [method set_code_region_tags]).
Code regions are delimited using start and end tags (respectively [code]region[/code] and [code]endregion[/code] by default) preceded by one line comment delimiter. (eg. [code]#region[/code] and [code]#endregion[/code])
</description>
</method>
2024-01-22 23:27:19 +00:00
<method name= "delete_lines" >
<return type= "void" />
<description >
Deletes all lines that are selected or have a caret on them.
</description>
</method>
2021-06-15 14:05:01 +00:00
<method name= "do_indent" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-06-15 14:05:01 +00:00
<description >
Perform an indent as if the user activated the "ui_text_indent" action.
</description>
</method>
2022-09-28 15:09:45 +00:00
<method name= "duplicate_lines" >
<return type= "void" />
<description >
Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line.
</description>
</method>
2024-01-22 23:27:19 +00:00
<method name= "duplicate_selection" >
<return type= "void" />
<description >
Duplicates all selected text and duplicates all lines with a caret on them.
</description>
</method>
2021-03-13 14:09:49 +00:00
<method name= "fold_all_lines" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-03-13 14:09:49 +00:00
<description >
Folds all lines that are possible to be folded (see [method can_fold_line]).
</description>
</method>
<method name= "fold_line" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
2021-03-13 14:09:49 +00:00
<description >
Folds the given line, if possible (see [method can_fold_line]).
</description>
</method>
2021-06-28 16:14:44 +00:00
<method name= "get_auto_brace_completion_close_key" qualifiers= "const" >
2021-07-01 16:40:59 +00:00
<return type= "String" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "open_key" type= "String" />
2021-06-28 16:14:44 +00:00
<description >
2022-08-12 17:13:27 +00:00
Gets the matching auto brace close key for [param open_key].
2021-06-28 16:14:44 +00:00
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "get_bookmarked_lines" qualifiers= "const" >
2022-08-05 01:41:48 +00:00
<return type= "PackedInt32Array" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Gets all bookmarked lines.
2020-09-11 10:22:10 +00:00
</description>
</method>
<method name= "get_breakpointed_lines" qualifiers= "const" >
2022-08-05 01:41:48 +00:00
<return type= "PackedInt32Array" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Gets all breakpointed lines.
2020-09-11 10:22:10 +00:00
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "get_code_completion_option" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Dictionary" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "index" type= "int" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
Gets the completion option at [param index]. The return [Dictionary] has the following key-values:
2021-05-22 14:11:04 +00:00
[code]kind[/code]: [enum CodeCompletionKind]
[code]display_text[/code]: Text that is shown on the autocomplete menu.
[code]insert_text[/code]: Text that is to be inserted when this item is selected.
[code]font_color[/code]: Color of the text on the autocomplete menu.
[code]icon[/code]: Icon to draw on the autocomplete menu.
[code]default_value[/code]: Value of the symbol.
</description>
</method>
<method name= "get_code_completion_options" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Dictionary[]" />
2021-05-22 14:11:04 +00:00
<description >
Gets all completion options, see [method get_code_completion_option] for return content.
</description>
</method>
<method name= "get_code_completion_selected_index" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2021-05-22 14:11:04 +00:00
<description >
Gets the index of the current selected completion option.
</description>
</method>
2023-03-12 16:48:37 +00:00
<method name= "get_code_region_end_tag" qualifiers= "const" >
<return type= "String" />
<description >
Returns the code region end tag (without comment delimiter).
</description>
</method>
<method name= "get_code_region_start_tag" qualifiers= "const" >
<return type= "String" />
<description >
Returns the code region start tag (without comment delimiter).
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "get_delimiter_end_key" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "delimiter_index" type= "int" />
2021-05-22 14:11:04 +00:00
<description >
Gets the end key for a string or comment region index.
</description>
</method>
2021-06-16 14:15:29 +00:00
<method name= "get_delimiter_end_position" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Vector2" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "column" type= "int" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
If [param line] [param column] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be [code]-1[/code].
2021-05-22 14:11:04 +00:00
</description>
</method>
<method name= "get_delimiter_start_key" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "delimiter_index" type= "int" />
2021-05-22 14:11:04 +00:00
<description >
Gets the start key for a string or comment region index.
</description>
</method>
2021-06-16 14:15:29 +00:00
<method name= "get_delimiter_start_position" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Vector2" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "column" type= "int" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
If [param line] [param column] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be [code]-1[/code].
2021-05-22 14:11:04 +00:00
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "get_executing_lines" qualifiers= "const" >
2022-08-05 01:41:48 +00:00
<return type= "PackedInt32Array" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Gets all executing lines.
2020-09-11 10:22:10 +00:00
</description>
</method>
2021-03-13 14:09:49 +00:00
<method name= "get_folded_lines" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int[]" />
2021-03-13 14:09:49 +00:00
<description >
2022-01-02 17:32:49 +00:00
Returns all lines that are current folded.
2021-03-13 14:09:49 +00:00
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "get_text_for_code_completion" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
2021-05-22 14:11:04 +00:00
<description >
Returns the full text with char [code]0xFFFF[/code] at the caret location.
</description>
</method>
2023-02-13 04:33:10 +00:00
<method name= "get_text_for_symbol_lookup" qualifiers= "const" >
2021-07-01 16:40:59 +00:00
<return type= "String" />
2021-07-01 16:10:54 +00:00
<description >
Returns the full text with char [code]0xFFFF[/code] at the cursor location.
</description>
</method>
2023-02-13 04:33:10 +00:00
<method name= "get_text_with_cursor_char" qualifiers= "const" >
<return type= "String" />
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "column" type= "int" />
<description >
Returns the full text with char [code]0xFFFF[/code] at the specified location.
</description>
</method>
2021-06-28 16:14:44 +00:00
<method name= "has_auto_brace_completion_close_key" qualifiers= "const" >
2021-07-01 16:40:59 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "close_key" type= "String" />
2021-06-28 16:14:44 +00:00
<description >
2022-08-12 17:13:27 +00:00
Returns [code]true[/code] if close key [param close_key] exists.
2021-06-28 16:14:44 +00:00
</description>
</method>
<method name= "has_auto_brace_completion_open_key" qualifiers= "const" >
2021-07-01 16:40:59 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "open_key" type= "String" />
2021-06-28 16:14:44 +00:00
<description >
2022-08-12 17:13:27 +00:00
Returns [code]true[/code] if open key [param open_key] exists.
2021-06-28 16:14:44 +00:00
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "has_comment_delimiter" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
Returns [code]true[/code] if comment [param start_key] exists.
2021-05-22 14:11:04 +00:00
</description>
</method>
<method name= "has_string_delimiter" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
Returns [code]true[/code] if string [param start_key] exists.
2021-05-22 14:11:04 +00:00
</description>
</method>
2021-06-15 14:05:01 +00:00
<method name= "indent_lines" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-06-15 14:05:01 +00:00
<description >
Indents selected lines, or in the case of no selection the caret line by one.
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "is_in_comment" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "column" type= "int" default= "-1" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
Returns delimiter index if [param line] [param column] is in a comment. If [param column] is not provided, will return delimiter index if the entire [param line] is a comment. Otherwise [code]-1[/code].
2021-05-22 14:11:04 +00:00
</description>
</method>
<method name= "is_in_string" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "column" type= "int" default= "-1" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
Returns the delimiter index if [param line] [param column] is in a string. If [param column] is not provided, will return the delimiter index if the entire [param line] is a string. Otherwise [code]-1[/code].
2021-05-22 14:11:04 +00:00
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "is_line_bookmarked" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Returns whether the line at the specified index is bookmarked or not.
2020-09-11 10:22:10 +00:00
</description>
</method>
<method name= "is_line_breakpointed" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Returns whether the line at the specified index is breakpointed or not.
2020-09-11 10:22:10 +00:00
</description>
</method>
2023-03-12 16:48:37 +00:00
<method name= "is_line_code_region_end" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "line" type= "int" />
<description >
Returns whether the line at the specified index is a code region end.
</description>
</method>
<method name= "is_line_code_region_start" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "line" type= "int" />
<description >
Returns whether the line at the specified index is a code region start.
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "is_line_executing" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Returns whether the line at the specified index is marked as executing or not.
2020-09-11 10:22:10 +00:00
</description>
</method>
2021-03-13 14:09:49 +00:00
<method name= "is_line_folded" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
2021-03-13 14:09:49 +00:00
<description >
Returns whether the line at the specified index is folded or not.
</description>
</method>
2024-01-22 23:27:19 +00:00
<method name= "move_lines_down" >
<return type= "void" />
<description >
Moves all lines down that are selected or have a caret on them.
</description>
</method>
<method name= "move_lines_up" >
<return type= "void" />
<description >
Moves all lines up that are selected or have a caret on them.
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "remove_comment_delimiter" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
Removes the comment delimiter with [param start_key].
2021-05-22 14:11:04 +00:00
</description>
</method>
<method name= "remove_string_delimiter" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
2021-05-22 14:11:04 +00:00
<description >
2022-08-12 17:13:27 +00:00
Removes the string delimiter with [param start_key].
2021-05-22 14:11:04 +00:00
</description>
</method>
<method name= "request_code_completion" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "force" type= "bool" default= "false" />
2021-05-22 14:11:04 +00:00
<description >
2024-01-22 23:27:19 +00:00
Emits [signal code_completion_requested], if [param force] is [code]true[/code] will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal.
2021-05-22 14:11:04 +00:00
</description>
</method>
<method name= "set_code_completion_selected_index" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "index" type= "int" />
2021-05-22 14:11:04 +00:00
<description >
Sets the current selected completion option.
</description>
</method>
<method name= "set_code_hint" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "code_hint" type= "String" />
2021-05-22 14:11:04 +00:00
<description >
Sets the code hint text. Pass an empty string to clear.
</description>
</method>
<method name= "set_code_hint_draw_below" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "draw_below" type= "bool" />
2021-05-22 14:11:04 +00:00
<description >
Sets if the code hint should draw below the text.
</description>
</method>
2023-03-12 16:48:37 +00:00
<method name= "set_code_region_tags" >
<return type= "void" />
<param index= "0" name= "start" type= "String" default= ""region"" />
<param index= "1" name= "end" type= "String" default= ""endregion"" />
<description >
Sets the code region start and end tags (without comment delimiter).
</description>
</method>
2020-09-11 10:22:10 +00:00
<method name= "set_line_as_bookmarked" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "bookmarked" type= "bool" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Sets the line as bookmarked.
2020-09-11 10:22:10 +00:00
</description>
</method>
<method name= "set_line_as_breakpoint" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "breakpointed" type= "bool" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Sets the line as breakpointed.
2020-09-11 10:22:10 +00:00
</description>
</method>
<method name= "set_line_as_executing" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "executing" type= "bool" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Sets the line as executing.
2020-09-11 10:22:10 +00:00
</description>
</method>
2021-07-01 16:10:54 +00:00
<method name= "set_symbol_lookup_word_as_valid" >
2021-07-01 16:40:59 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "valid" type= "bool" />
2021-07-01 16:10:54 +00:00
<description >
Sets the symbol emitted by [signal symbol_validate] as a valid lookup.
</description>
</method>
2021-03-13 14:09:49 +00:00
<method name= "toggle_foldable_line" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
2021-03-13 14:09:49 +00:00
<description >
Toggle the folding of the code block at the given line.
</description>
</method>
2024-01-22 23:27:19 +00:00
<method name= "toggle_foldable_lines_at_carets" >
<return type= "void" />
<description >
Toggle the folding of the code block on all lines with a caret on them.
</description>
</method>
2021-03-13 14:09:49 +00:00
<method name= "unfold_all_lines" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-03-13 14:09:49 +00:00
<description >
2021-07-01 16:40:59 +00:00
Unfolds all lines, folded or not.
2021-03-13 14:09:49 +00:00
</description>
</method>
<method name= "unfold_line" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
2021-03-13 14:09:49 +00:00
<description >
Unfolds all lines that were previously folded.
</description>
</method>
2021-06-15 14:05:01 +00:00
<method name= "unindent_lines" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-06-15 14:05:01 +00:00
<description >
2023-01-18 16:05:15 +00:00
Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action.
2021-06-15 14:05:01 +00:00
</description>
</method>
2021-05-22 14:11:04 +00:00
<method name= "update_code_completion_options" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "force" type= "bool" />
2021-05-22 14:11:04 +00:00
<description >
2023-07-19 12:56:06 +00:00
Submits all completion options added with [method add_code_completion_option]. Will try to force the autocomplete menu to popup, if [param force] is [code]true[/code].
2021-10-05 12:24:34 +00:00
[b]Note:[/b] This will replace all current candidates.
2021-05-22 14:11:04 +00:00
</description>
</method>
2020-09-11 10:22:10 +00:00
</methods>
<members >
2021-06-28 16:14:44 +00:00
<member name= "auto_brace_completion_enabled" type= "bool" setter= "set_auto_brace_completion_enabled" getter= "is_auto_brace_completion_enabled" default= "false" >
Sets whether brace pairs should be autocompleted.
</member>
2021-06-30 10:58:13 +00:00
<member name= "auto_brace_completion_highlight_matching" type= "bool" setter= "set_highlight_matching_braces_enabled" getter= "is_highlight_matching_braces_enabled" default= "false" >
Highlight mismatching brace pairs.
</member>
2022-01-18 10:31:15 +00:00
<member name= "auto_brace_completion_pairs" type= "Dictionary" setter= "set_auto_brace_completion_pairs" getter= "get_auto_brace_completion_pairs" default= "{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }" >
2021-06-28 16:14:44 +00:00
Sets the brace pairs to be autocompleted.
</member>
2021-05-22 14:11:04 +00:00
<member name= "code_completion_enabled" type= "bool" setter= "set_code_completion_enabled" getter= "is_code_completion_enabled" default= "false" >
Sets whether code completion is allowed.
</member>
2023-01-06 18:52:19 +00:00
<member name= "code_completion_prefixes" type= "String[]" setter= "set_code_completion_prefixes" getter= "get_code_completion_prefixes" default= "[]" >
2021-05-22 14:11:04 +00:00
Sets prefixes that will trigger code completion.
</member>
2019-09-24 17:45:03 +00:00
<member name= "delimiter_comments" type= "String[]" setter= "set_comment_delimiters" getter= "get_comment_delimiters" default= "[]" >
2021-05-22 14:11:04 +00:00
Sets the comment delimiters. All existing comment delimiters will be removed.
</member>
2021-07-01 16:40:59 +00:00
<member name= "delimiter_strings" type= "String[]" setter= "set_string_delimiters" getter= "get_string_delimiters" default= "["' '", "\" \""]" >
2021-05-22 14:11:04 +00:00
Sets the string delimiters. All existing string delimiters will be removed.
</member>
2021-07-01 16:40:59 +00:00
<member name= "gutters_draw_bookmarks" type= "bool" setter= "set_draw_bookmarks_gutter" getter= "is_drawing_bookmarks_gutter" default= "false" >
Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines.
</member>
<member name= "gutters_draw_breakpoints_gutter" type= "bool" setter= "set_draw_breakpoints_gutter" getter= "is_drawing_breakpoints_gutter" default= "false" >
Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines.
2020-09-11 10:22:10 +00:00
</member>
2021-07-01 16:40:59 +00:00
<member name= "gutters_draw_executing_lines" type= "bool" setter= "set_draw_executing_lines_gutter" getter= "is_drawing_executing_lines_gutter" default= "false" >
Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines.
2020-09-11 10:22:10 +00:00
</member>
2021-07-01 16:40:59 +00:00
<member name= "gutters_draw_fold_gutter" type= "bool" setter= "set_draw_fold_gutter" getter= "is_drawing_fold_gutter" default= "false" >
Sets if foldable lines icons should be drawn in the gutter.
2020-09-11 10:22:10 +00:00
</member>
2021-07-01 16:40:59 +00:00
<member name= "gutters_draw_line_numbers" type= "bool" setter= "set_draw_line_numbers" getter= "is_draw_line_numbers_enabled" default= "false" >
Sets if line numbers should be drawn in the gutter.
2020-09-11 10:22:10 +00:00
</member>
2021-07-01 16:40:59 +00:00
<member name= "gutters_zero_pad_line_numbers" type= "bool" setter= "set_line_numbers_zero_padded" getter= "is_line_numbers_zero_padded" default= "false" >
Sets if line numbers drawn in the gutter are zero padded.
2020-09-11 10:22:10 +00:00
</member>
2021-06-15 14:05:01 +00:00
<member name= "indent_automatic" type= "bool" setter= "set_auto_indent_enabled" getter= "is_auto_indent_enabled" default= "false" >
Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found.
</member>
2022-05-19 15:00:06 +00:00
<member name= "indent_automatic_prefixes" type= "String[]" setter= "set_auto_indent_prefixes" getter= "get_auto_indent_prefixes" default= "[":", "{", "[", "("]" >
2021-06-15 14:05:01 +00:00
Prefixes to trigger an automatic indent.
</member>
<member name= "indent_size" type= "int" setter= "set_indent_size" getter= "get_indent_size" default= "4" >
2023-10-02 18:11:43 +00:00
Size of the tabulation indent (one [kbd]Tab[/kbd] press) in characters. If [member indent_use_spaces] is enabled the number of spaces to use.
2021-06-15 14:05:01 +00:00
</member>
<member name= "indent_use_spaces" type= "bool" setter= "set_indent_using_spaces" getter= "is_indent_using_spaces" default= "false" >
Use spaces instead of tabs for indentation.
</member>
2021-12-02 19:38:49 +00:00
<member name= "layout_direction" type= "int" setter= "set_layout_direction" getter= "get_layout_direction" overrides= "Control" enum= "Control.LayoutDirection" default= "2" />
2021-07-01 16:40:59 +00:00
<member name= "line_folding" type= "bool" setter= "set_line_folding_enabled" getter= "is_line_folding_enabled" default= "false" >
2021-03-13 14:09:49 +00:00
Sets whether line folding is allowed.
</member>
2021-06-30 17:03:32 +00:00
<member name= "line_length_guidelines" type= "int[]" setter= "set_line_length_guidelines" getter= "get_line_length_guidelines" default= "[]" >
2023-02-11 16:18:33 +00:00
Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently.
2021-06-30 17:03:32 +00:00
</member>
2021-07-01 16:10:54 +00:00
<member name= "symbol_lookup_on_click" type= "bool" setter= "set_symbol_lookup_on_click_enabled" getter= "is_symbol_lookup_on_click_enabled" default= "false" >
Set when a validated word from [signal symbol_validate] is clicked, the [signal symbol_lookup] should be emitted.
</member>
2021-12-02 19:38:49 +00:00
<member name= "text_direction" type= "int" setter= "set_text_direction" getter= "get_text_direction" overrides= "TextEdit" enum= "Control.TextDirection" default= "1" />
2020-09-11 10:22:10 +00:00
</members>
<signals >
<signal name= "breakpoint_toggled" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "line" type= "int" />
2020-09-11 10:22:10 +00:00
<description >
2021-07-01 16:40:59 +00:00
Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line.
2020-09-11 10:22:10 +00:00
</description>
</signal>
2022-01-22 12:50:20 +00:00
<signal name= "code_completion_requested" >
2021-05-22 14:11:04 +00:00
<description >
Emitted when the user requests code completion.
</description>
</signal>
2021-07-01 16:10:54 +00:00
<signal name= "symbol_lookup" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "symbol" type= "String" />
<param index= "1" name= "line" type= "int" />
<param index= "2" name= "column" type= "int" />
2021-07-01 16:10:54 +00:00
<description >
Emitted when the user has clicked on a valid symbol.
</description>
</signal>
<signal name= "symbol_validate" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "symbol" type= "String" />
2021-07-01 16:10:54 +00:00
<description >
Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling [method set_symbol_lookup_word_as_valid].
</description>
</signal>
2020-09-11 10:22:10 +00:00
</signals>
<constants >
2021-05-22 14:11:04 +00:00
<constant name= "KIND_CLASS" value= "0" enum= "CodeCompletionKind" >
2021-07-01 16:40:59 +00:00
Marks the option as a class.
2021-05-22 14:11:04 +00:00
</constant>
<constant name= "KIND_FUNCTION" value= "1" enum= "CodeCompletionKind" >
2021-07-01 16:40:59 +00:00
Marks the option as a function.
2021-05-22 14:11:04 +00:00
</constant>
<constant name= "KIND_SIGNAL" value= "2" enum= "CodeCompletionKind" >
2021-07-01 16:40:59 +00:00
Marks the option as a Godot signal.
2021-05-22 14:11:04 +00:00
</constant>
<constant name= "KIND_VARIABLE" value= "3" enum= "CodeCompletionKind" >
2021-07-01 16:40:59 +00:00
Marks the option as a variable.
2021-05-22 14:11:04 +00:00
</constant>
<constant name= "KIND_MEMBER" value= "4" enum= "CodeCompletionKind" >
2021-07-01 16:40:59 +00:00
Marks the option as a member.
2021-05-22 14:11:04 +00:00
</constant>
<constant name= "KIND_ENUM" value= "5" enum= "CodeCompletionKind" >
2023-05-01 22:09:49 +00:00
Marks the option as an enum entry.
2021-05-22 14:11:04 +00:00
</constant>
<constant name= "KIND_CONSTANT" value= "6" enum= "CodeCompletionKind" >
2021-07-01 16:40:59 +00:00
Marks the option as a constant.
2021-05-22 14:11:04 +00:00
</constant>
<constant name= "KIND_NODE_PATH" value= "7" enum= "CodeCompletionKind" >
2021-07-01 16:40:59 +00:00
Marks the option as a Godot node path.
2021-05-22 14:11:04 +00:00
</constant>
<constant name= "KIND_FILE_PATH" value= "8" enum= "CodeCompletionKind" >
2021-07-01 16:40:59 +00:00
Marks the option as a file path.
2021-05-22 14:11:04 +00:00
</constant>
<constant name= "KIND_PLAIN_TEXT" value= "9" enum= "CodeCompletionKind" >
2021-07-01 16:40:59 +00:00
Marks the option as unclassified or plain text.
2021-05-22 14:11:04 +00:00
</constant>
2023-05-23 03:12:34 +00:00
<constant name= "LOCATION_LOCAL" value= "0" enum= "CodeCompletionLocation" >
The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes).
</constant>
<constant name= "LOCATION_PARENT_MASK" value= "256" enum= "CodeCompletionLocation" >
2024-02-29 23:59:28 +00:00
The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. [code]0[/code] for the local class, [code]1[/code] for the parent, [code]2[/code] for the grandparent, etc.) to store the depth of an option in the class or a parent class.
2023-05-23 03:12:34 +00:00
</constant>
<constant name= "LOCATION_OTHER_USER_CODE" value= "512" enum= "CodeCompletionLocation" >
The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons).
</constant>
<constant name= "LOCATION_OTHER" value= "1024" enum= "CodeCompletionLocation" >
The option is from other engine code, not covered by the other enum constants - e.g. built-in classes.
</constant>
2020-09-11 10:22:10 +00:00
</constants>
<theme_items >
2021-08-04 16:54:41 +00:00
<theme_item name= "bookmark_color" data_type= "color" type= "Color" default= "Color(0.5, 0.64, 1, 0.8)" >
2021-07-01 16:40:59 +00:00
[Color] of the bookmark icon for bookmarked lines.
2020-09-11 10:22:10 +00:00
</theme_item>
2021-08-04 16:54:41 +00:00
<theme_item name= "brace_mismatch_color" data_type= "color" type= "Color" default= "Color(1, 0.2, 0.2, 1)" >
2021-07-01 16:40:59 +00:00
[Color] of the text to highlight mismatched braces.
2020-09-11 10:22:10 +00:00
</theme_item>
2021-08-04 16:54:41 +00:00
<theme_item name= "breakpoint_color" data_type= "color" type= "Color" default= "Color(0.9, 0.29, 0.3, 1)" >
2021-07-01 16:40:59 +00:00
[Color] of the breakpoint icon for bookmarked lines.
2020-09-11 10:22:10 +00:00
</theme_item>
2021-08-04 16:54:41 +00:00
<theme_item name= "code_folding_color" data_type= "color" type= "Color" default= "Color(0.8, 0.8, 0.8, 0.8)" >
2021-07-01 16:40:59 +00:00
[Color] for all icons related to line folding.
2020-09-11 10:22:10 +00:00
</theme_item>
2021-08-04 16:54:41 +00:00
<theme_item name= "completion_background_color" data_type= "color" type= "Color" default= "Color(0.17, 0.16, 0.2, 1)" >
2021-07-01 16:40:59 +00:00
Sets the background [Color] for the code completion popup.
2020-09-11 10:22:10 +00:00
</theme_item>
2021-08-04 16:54:41 +00:00
<theme_item name= "completion_existing_color" data_type= "color" type= "Color" default= "Color(0.87, 0.87, 0.87, 0.13)" >
2021-07-01 16:40:59 +00:00
Background highlight [Color] for matching text in code completion options.
2020-09-11 10:22:10 +00:00
</theme_item>
2022-02-14 13:41:22 +00:00
<theme_item name= "completion_scroll_color" data_type= "color" type= "Color" default= "Color(1, 1, 1, 0.29)" >
2021-07-01 16:40:59 +00:00
[Color] of the scrollbar in the code completion popup.
2020-09-11 10:22:10 +00:00
</theme_item>
2022-06-27 09:27:17 +00:00
<theme_item name= "completion_scroll_hovered_color" data_type= "color" type= "Color" default= "Color(1, 1, 1, 0.4)" >
[Color] of the scrollbar in the code completion popup when hovered.
</theme_item>
2021-08-04 16:54:41 +00:00
<theme_item name= "completion_selected_color" data_type= "color" type= "Color" default= "Color(0.26, 0.26, 0.27, 1)" >
2021-07-01 16:40:59 +00:00
Background highlight [Color] for the current selected option item in the code completion popup.
2020-09-11 10:22:10 +00:00
</theme_item>
2021-08-04 16:54:41 +00:00
<theme_item name= "executing_line_color" data_type= "color" type= "Color" default= "Color(0.98, 0.89, 0.27, 1)" >
2021-07-01 16:40:59 +00:00
[Color] of the executing icon for executing lines.
2020-09-11 10:22:10 +00:00
</theme_item>
2023-03-12 16:48:37 +00:00
<theme_item name= "folded_code_region_color" data_type= "color" type= "Color" default= "Color(0.68, 0.46, 0.77, 0.2)" >
[Color] of background line highlight for folded code region.
</theme_item>
2021-08-04 16:54:41 +00:00
<theme_item name= "line_length_guideline_color" data_type= "color" type= "Color" default= "Color(0.3, 0.5, 0.8, 0.1)" >
2021-07-01 16:40:59 +00:00
[Color] of the main line length guideline, secondary guidelines will have 50% alpha applied.
2021-06-30 17:03:32 +00:00
</theme_item>
2021-08-04 16:54:41 +00:00
<theme_item name= "line_number_color" data_type= "color" type= "Color" default= "Color(0.67, 0.67, 0.67, 0.4)" >
2021-07-01 16:40:59 +00:00
Sets the [Color] of line numbers.
2020-09-11 10:22:10 +00:00
</theme_item>
2021-12-01 18:02:20 +00:00
<theme_item name= "completion_lines" data_type= "constant" type= "int" default= "7" >
Max number of options to display in the code completion popup at any one time.
</theme_item>
<theme_item name= "completion_max_width" data_type= "constant" type= "int" default= "50" >
2023-10-03 21:51:48 +00:00
Max width of options in the code completion popup. Options longer than this will be cut off.
2021-12-01 18:02:20 +00:00
</theme_item>
2022-02-14 13:41:22 +00:00
<theme_item name= "completion_scroll_width" data_type= "constant" type= "int" default= "6" >
2021-12-01 18:02:20 +00:00
Width of the scrollbar in the code completion popup.
</theme_item>
<theme_item name= "bookmark" data_type= "icon" type= "Texture2D" >
Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked lines.
2021-09-21 19:07:12 +00:00
</theme_item>
2021-12-01 18:02:20 +00:00
<theme_item name= "breakpoint" data_type= "icon" type= "Texture2D" >
Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed lines.
</theme_item>
<theme_item name= "can_fold" data_type= "icon" type= "Texture2D" >
Sets a custom [Texture2D] to draw in the line folding gutter when a line can be folded.
</theme_item>
2023-03-12 16:48:37 +00:00
<theme_item name= "can_fold_code_region" data_type= "icon" type= "Texture2D" >
Sets a custom [Texture2D] to draw in the line folding gutter when a code region can be folded.
</theme_item>
2021-12-01 18:02:20 +00:00
<theme_item name= "executing_line" data_type= "icon" type= "Texture2D" >
Icon to draw in the executing gutter for executing lines.
</theme_item>
<theme_item name= "folded" data_type= "icon" type= "Texture2D" >
Sets a custom [Texture2D] to draw in the line folding gutter when a line is folded and can be unfolded.
</theme_item>
2023-03-12 16:48:37 +00:00
<theme_item name= "folded_code_region" data_type= "icon" type= "Texture2D" >
Sets a custom [Texture2D] to draw in the line folding gutter when a code region is folded and can be unfolded.
</theme_item>
2021-12-01 18:02:20 +00:00
<theme_item name= "folded_eol_icon" data_type= "icon" type= "Texture2D" >
Sets a custom [Texture2D] to draw at the end of a folded line.
2020-09-11 10:22:10 +00:00
</theme_item>
2021-12-01 18:02:20 +00:00
<theme_item name= "completion" data_type= "style" type= "StyleBox" >
[StyleBox] for the code completion popup.
</theme_item>
2020-09-11 10:22:10 +00:00
</theme_items>
</class>