summaryrefslogtreecommitdiff
path: root/doc/classes/CodeEdit.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/CodeEdit.xml')
-rw-r--r--doc/classes/CodeEdit.xml312
1 files changed, 104 insertions, 208 deletions
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 30fd47cdb6..6a3f38f51e 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -9,62 +9,45 @@
</tutorials>
<methods>
<method name="_confirm_code_completion" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="replace" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="replace" type="bool" />
<description>
Override this method to define how the selected entry should be inserted. If [code]replace[/code] is true, any existing text should be replaced.
</description>
</method>
<method name="_filter_code_completion_candidates" qualifiers="virtual">
- <return type="Array">
- </return>
- <argument index="0" name="candidates" type="Array">
- </argument>
+ <return type="Array" />
+ <argument index="0" name="candidates" type="Array" />
<description>
Override this method to define what items in [code]candidates[/code] should be displayed.
Both [code]candidates[/code] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content.
</description>
</method>
<method name="_request_code_completion" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="force" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="force" type="bool" />
<description>
Override this method to define what happens when the user requests code completion. If [code]force[/code] is true, any checks should be bypassed.
</description>
</method>
<method name="add_code_completion_option">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="CodeEdit.CodeCompletionKind">
- </argument>
- <argument index="1" name="display_text" type="String">
- </argument>
- <argument index="2" name="insert_text" type="String">
- </argument>
- <argument index="3" name="text_color" type="Color" default="Color(1, 1, 1, 1)">
- </argument>
- <argument index="4" name="icon" type="Resource" default="null">
- </argument>
- <argument index="5" name="value" type="Variant" default="0">
- </argument>
+ <return type="void" />
+ <argument index="0" name="type" type="int" enum="CodeEdit.CodeCompletionKind" />
+ <argument index="1" name="display_text" type="String" />
+ <argument index="2" name="insert_text" type="String" />
+ <argument index="3" name="text_color" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="4" name="icon" type="Resource" default="null" />
+ <argument index="5" name="value" type="Variant" default="0" />
<description>
Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list.
[b]Note[/b]: This list will replace all current candidates.
</description>
</method>
<method name="add_comment_delimiter">
- <return type="void">
- </return>
- <argument index="0" name="start_key" type="String">
- </argument>
- <argument index="1" name="end_key" type="String">
- </argument>
- <argument index="2" name="line_only" type="bool" default="false">
- </argument>
+ <return type="void" />
+ <argument index="0" name="start_key" type="String" />
+ <argument index="1" name="end_key" type="String" />
+ <argument index="2" name="line_only" type="bool" default="false" />
<description>
Adds a comment delimiter.
Both the start and end keys must be symbols. Only the start key has to be unique.
@@ -72,14 +55,10 @@
</description>
</method>
<method name="add_string_delimiter">
- <return type="void">
- </return>
- <argument index="0" name="start_key" type="String">
- </argument>
- <argument index="1" name="end_key" type="String">
- </argument>
- <argument index="2" name="line_only" type="bool" default="false">
- </argument>
+ <return type="void" />
+ <argument index="0" name="start_key" type="String" />
+ <argument index="1" name="end_key" type="String" />
+ <argument index="2" name="line_only" type="bool" default="false" />
<description>
Adds a string delimiter.
Both the start and end keys must be symbols. Only the start key has to be unique.
@@ -87,109 +66,90 @@
</description>
</method>
<method name="can_fold_line" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="line" type="int" />
<description>
Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block.
</description>
</method>
<method name="cancel_code_completion">
- <return type="void">
- </return>
+ <return type="void" />
<description>
Cancels the autocomplete menu.
</description>
</method>
<method name="clear_bookmarked_lines">
- <return type="void">
- </return>
+ <return type="void" />
<description>
</description>
</method>
<method name="clear_breakpointed_lines">
- <return type="void">
- </return>
+ <return type="void" />
<description>
</description>
</method>
<method name="clear_comment_delimiters">
- <return type="void">
- </return>
+ <return type="void" />
<description>
Removes all comment delimiters.
</description>
</method>
<method name="clear_executing_lines">
- <return type="void">
- </return>
+ <return type="void" />
<description>
</description>
</method>
<method name="clear_string_delimiters">
- <return type="void">
- </return>
+ <return type="void" />
<description>
Removes all string delimiters.
</description>
</method>
<method name="confirm_code_completion">
- <return type="void">
- </return>
- <argument index="0" name="replace" type="bool" default="false">
- </argument>
+ <return type="void" />
+ <argument index="0" name="replace" type="bool" default="false" />
<description>
Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged.
</description>
</method>
<method name="do_indent">
- <return type="void">
- </return>
+ <return type="void" />
<description>
Perform an indent as if the user activated the "ui_text_indent" action.
</description>
</method>
<method name="do_unindent">
- <return type="void">
- </return>
+ <return type="void" />
<description>
Perform an unindent as if the user activated the "ui_text_unindent" action.
</description>
</method>
<method name="fold_all_lines">
- <return type="void">
- </return>
+ <return type="void" />
<description>
Folds all lines that are possible to be folded (see [method can_fold_line]).
</description>
</method>
<method name="fold_line">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
+ <return type="void" />
+ <argument index="0" name="line" type="int" />
<description>
Folds the given line, if possible (see [method can_fold_line]).
</description>
</method>
<method name="get_bookmarked_lines" qualifiers="const">
- <return type="Array">
- </return>
+ <return type="Array" />
<description>
</description>
</method>
<method name="get_breakpointed_lines" qualifiers="const">
- <return type="Array">
- </return>
+ <return type="Array" />
<description>
</description>
</method>
<method name="get_code_completion_option" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
+ <return type="Dictionary" />
+ <argument index="0" name="index" type="int" />
<description>
Gets the completion option at [code]index[/code]. The return [Dictionary] has the following key-values:
[code]kind[/code]: [enum CodeCompletionKind]
@@ -201,279 +161,216 @@
</description>
</method>
<method name="get_code_completion_options" qualifiers="const">
- <return type="Dictionary[]">
- </return>
+ <return type="Dictionary[]" />
<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">
- <return type="int">
- </return>
+ <return type="int" />
<description>
Gets the index of the current selected completion option.
</description>
</method>
<method name="get_delimiter_end_key" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="delimiter_index" type="int">
- </argument>
+ <return type="String" />
+ <argument index="0" name="delimiter_index" type="int" />
<description>
Gets the end key for a string or comment region index.
</description>
</method>
<method name="get_delimiter_end_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <argument index="1" name="column" type="int">
- </argument>
+ <return type="Vector2" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="column" type="int" />
<description>
If [code]line[/code] [code]column[/code] 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].
</description>
</method>
<method name="get_delimiter_start_key" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="delimiter_index" type="int">
- </argument>
+ <return type="String" />
+ <argument index="0" name="delimiter_index" type="int" />
<description>
Gets the start key for a string or comment region index.
</description>
</method>
<method name="get_delimiter_start_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <argument index="1" name="column" type="int">
- </argument>
+ <return type="Vector2" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="column" type="int" />
<description>
If [code]line[/code] [code]column[/code] 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].
</description>
</method>
<method name="get_executing_lines" qualifiers="const">
- <return type="Array">
- </return>
+ <return type="Array" />
<description>
</description>
</method>
<method name="get_folded_lines" qualifiers="const">
- <return type="int[]">
- </return>
+ <return type="int[]" />
<description>
Return all lines that are current folded.
</description>
</method>
<method name="get_text_for_code_completion" qualifiers="const">
- <return type="String">
- </return>
+ <return type="String" />
<description>
Returns the full text with char [code]0xFFFF[/code] at the caret location.
</description>
</method>
<method name="has_comment_delimiter" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="start_key" type="String">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="start_key" type="String" />
<description>
Returns [code]true[/code] if comment [code]start_key[/code] exists.
</description>
</method>
<method name="has_string_delimiter" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="start_key" type="String">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="start_key" type="String" />
<description>
Returns [code]true[/code] if string [code]start_key[/code] exists.
</description>
</method>
<method name="indent_lines">
- <return type="void">
- </return>
+ <return type="void" />
<description>
Indents selected lines, or in the case of no selection the caret line by one.
</description>
</method>
<method name="is_in_comment" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <argument index="1" name="column" type="int" default="-1">
- </argument>
+ <return type="int" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="column" type="int" default="-1" />
<description>
Return delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code].
</description>
</method>
<method name="is_in_string" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <argument index="1" name="column" type="int" default="-1">
- </argument>
+ <return type="int" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="column" type="int" default="-1" />
<description>
Return the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code].
</description>
</method>
<method name="is_line_bookmarked" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="line" type="int" />
<description>
</description>
</method>
<method name="is_line_breakpointed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="line" type="int" />
<description>
</description>
</method>
<method name="is_line_executing" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="line" type="int" />
<description>
</description>
</method>
<method name="is_line_folded" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="line" type="int" />
<description>
Returns whether the line at the specified index is folded or not.
</description>
</method>
<method name="remove_comment_delimiter">
- <return type="void">
- </return>
- <argument index="0" name="start_key" type="String">
- </argument>
+ <return type="void" />
+ <argument index="0" name="start_key" type="String" />
<description>
Removes the comment delimiter with [code]start_key[/code].
</description>
</method>
<method name="remove_string_delimiter">
- <return type="void">
- </return>
- <argument index="0" name="start_key" type="String">
- </argument>
+ <return type="void" />
+ <argument index="0" name="start_key" type="String" />
<description>
Removes the string delimiter with [code]start_key[/code].
</description>
</method>
<method name="request_code_completion">
- <return type="void">
- </return>
- <argument index="0" name="force" type="bool" default="false">
- </argument>
+ <return type="void" />
+ <argument index="0" name="force" type="bool" default="false" />
<description>
Emits [signal request_code_completion], if [code]force[/code] is true 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.
</description>
</method>
<method name="set_code_completion_selected_index">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
<description>
Sets the current selected completion option.
</description>
</method>
<method name="set_code_hint">
- <return type="void">
- </return>
- <argument index="0" name="code_hint" type="String">
- </argument>
+ <return type="void" />
+ <argument index="0" name="code_hint" type="String" />
<description>
Sets the code hint text. Pass an empty string to clear.
</description>
</method>
<method name="set_code_hint_draw_below">
- <return type="void">
- </return>
- <argument index="0" name="draw_below" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="draw_below" type="bool" />
<description>
Sets if the code hint should draw below the text.
</description>
</method>
<method name="set_line_as_bookmarked">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <argument index="1" name="bookmarked" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="bookmarked" type="bool" />
<description>
</description>
</method>
<method name="set_line_as_breakpoint">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <argument index="1" name="breakpointed" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="breakpointed" type="bool" />
<description>
</description>
</method>
<method name="set_line_as_executing">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <argument index="1" name="executing" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="executing" type="bool" />
<description>
</description>
</method>
<method name="toggle_foldable_line">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
+ <return type="void" />
+ <argument index="0" name="line" type="int" />
<description>
Toggle the folding of the code block at the given line.
</description>
</method>
<method name="unfold_all_lines">
- <return type="void">
- </return>
+ <return type="void" />
<description>
</description>
</method>
<method name="unfold_line">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
+ <return type="void" />
+ <argument index="0" name="line" type="int" />
<description>
Unfolds all lines that were previously folded.
</description>
</method>
<method name="unindent_lines">
- <return type="void">
- </return>
+ <return type="void" />
<description>
Unindents selected lines, or in the case of no selection the caret line by one.
</description>
</method>
<method name="update_code_completion_options">
- <return type="void">
- </return>
- <argument index="0" name="force" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="force" type="bool" />
<description>
Submits all completion options added with [method add_code_completion_option]. Will try to force the autoccomplete menu to popup, if [code]force[/code] is [code]true[/code].
[b]Note[/b]: This will replace all current candidates.
@@ -526,8 +423,7 @@
</members>
<signals>
<signal name="breakpoint_toggled">
- <argument index="0" name="line" type="int">
- </argument>
+ <argument index="0" name="line" type="int" />
<description>
</description>
</signal>