Document TextEdit node

(cherry picked from commit 1f81981b3d)
This commit is contained in:
Zak 2019-06-13 12:12:52 +03:00 committed by Rémi Verschelde
parent 040e1dd411
commit b279f225c0
1 changed files with 38 additions and 9 deletions

View File

@ -32,7 +32,7 @@
<argument index="1" name="color" type="Color"> <argument index="1" name="color" type="Color">
</argument> </argument>
<description> <description>
Add a keyword and its color. Add a [code]keyword[/code] and its [Color].
</description> </description>
</method> </method>
<method name="can_fold" qualifiers="const"> <method name="can_fold" qualifiers="const">
@ -47,21 +47,21 @@
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Clear all the syntax coloring information. Clears all the syntax coloring information.
</description> </description>
</method> </method>
<method name="clear_undo_history"> <method name="clear_undo_history">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Clear the undo history. Clears the undo history.
</description> </description>
</method> </method>
<method name="copy"> <method name="copy">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Copy the current selection. Copy's the current text selection.
</description> </description>
</method> </method>
<method name="cursor_get_column" qualifiers="const"> <method name="cursor_get_column" qualifiers="const">
@ -86,6 +86,8 @@
<argument index="1" name="adjust_viewport" type="bool" default="true"> <argument index="1" name="adjust_viewport" type="bool" default="true">
</argument> </argument>
<description> <description>
Moves the cursor at the specified [code]column[/code] index.
If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. Default value is [code]true[/code].
</description> </description>
</method> </method>
<method name="cursor_set_line"> <method name="cursor_set_line">
@ -100,20 +102,23 @@
<argument index="3" name="wrap_index" type="int" default="0"> <argument index="3" name="wrap_index" type="int" default="0">
</argument> </argument>
<description> <description>
Moves the cursor at the specified [code]line[/code] index.
If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. Default value is [code]true[/code].
If [code]can_be_hidden[/code] is set to true, the specified [code]line[/code] can be hidden using [member set_line_as_hidden]. Default value is [code]true[/code].
</description> </description>
</method> </method>
<method name="cut"> <method name="cut">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Cut the current selection. Cut's the current selection.
</description> </description>
</method> </method>
<method name="deselect"> <method name="deselect">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Clears the current selection. Deselects the current selection.
</description> </description>
</method> </method>
<method name="fold_all_lines"> <method name="fold_all_lines">
@ -143,6 +148,7 @@
<argument index="0" name="keyword" type="String"> <argument index="0" name="keyword" type="String">
</argument> </argument>
<description> <description>
Returns the [Color] of the specified [code]keyword[/code].
</description> </description>
</method> </method>
<method name="get_line" qualifiers="const"> <method name="get_line" qualifiers="const">
@ -206,6 +212,7 @@
<return type="String"> <return type="String">
</return> </return>
<description> <description>
Returns a [String] text with the word under the mouse cursor location.
</description> </description>
</method> </method>
<method name="has_keyword_color" qualifiers="const"> <method name="has_keyword_color" qualifiers="const">
@ -214,6 +221,7 @@
<argument index="0" name="keyword" type="String"> <argument index="0" name="keyword" type="String">
</argument> </argument>
<description> <description>
Returns whether the specified [code]keyword[/code] has a color set to it or not.
</description> </description>
</method> </method>
<method name="insert_text_at_cursor"> <method name="insert_text_at_cursor">
@ -222,7 +230,7 @@
<argument index="0" name="text" type="String"> <argument index="0" name="text" type="String">
</argument> </argument>
<description> <description>
Insert a given text at the cursor position. Insert the specified text at the cursor position.
</description> </description>
</method> </method>
<method name="is_folded" qualifiers="const"> <method name="is_folded" qualifiers="const">
@ -231,6 +239,7 @@
<argument index="0" name="line" type="int"> <argument index="0" name="line" type="int">
</argument> </argument>
<description> <description>
Returns whether the line at the specified index is folded or not.
</description> </description>
</method> </method>
<method name="is_line_hidden" qualifiers="const"> <method name="is_line_hidden" qualifiers="const">
@ -239,6 +248,7 @@
<argument index="0" name="line" type="int"> <argument index="0" name="line" type="int">
</argument> </argument>
<description> <description>
Returns whether the line at the specified index is hidden or not.
</description> </description>
</method> </method>
<method name="is_selection_active" qualifiers="const"> <method name="is_selection_active" qualifiers="const">
@ -254,6 +264,7 @@
<argument index="0" name="option" type="int"> <argument index="0" name="option" type="int">
</argument> </argument>
<description> <description>
Triggers a right click menu action by the specified index. See [enum MenuItems] for a list of available indexes.
</description> </description>
</method> </method>
<method name="paste"> <method name="paste">
@ -322,6 +333,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], hides the line of the specified index.
</description> </description>
</method> </method>
<method name="toggle_fold_line"> <method name="toggle_fold_line">
@ -352,6 +364,7 @@
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Unhide all lines that were previously set to hidden by [member set_line_as_hidden].
</description> </description>
</method> </method>
</methods> </methods>
@ -376,9 +389,8 @@
<member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled"> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled">
If [code]true[/code], a right click displays the context menu. If [code]true[/code], a right click displays the context menu.
</member> </member>
<member name="hiding_enabled" type="int" setter="set_hiding_enabled" getter="is_hiding_enabled">
</member>
<member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled"> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled">
If [code]true[/code], all occurrences of the selected text will be highlighted.
</member> </member>
<member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled"> <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled">
If [code]true[/code], the line containing the cursor is highlighted. If [code]true[/code], the line containing the cursor is highlighted.
@ -392,8 +404,10 @@
If [code]true[/code], line numbers are displayed to the left of the text. If [code]true[/code], line numbers are displayed to the left of the text.
</member> </member>
<member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled"> <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled">
If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling.
</member> </member>
<member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled"> <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled">
If [code]true[/code], any custom color properties that have been set for this [TextEdit] will be visible.
</member> </member>
<member name="text" type="String" setter="set_text" getter="get_text"> <member name="text" type="String" setter="set_text" getter="get_text">
String value of the [TextEdit]. String value of the [TextEdit].
@ -467,16 +481,20 @@
Undoes the previous action. Undoes the previous action.
</constant> </constant>
<constant name="MENU_REDO" value="6" enum="MenuItems"> <constant name="MENU_REDO" value="6" enum="MenuItems">
Redoes the previous action.
</constant> </constant>
<constant name="MENU_MAX" value="7" enum="MenuItems"> <constant name="MENU_MAX" value="7" enum="MenuItems">
Represents the size of the [enum MenuItems] enum.
</constant> </constant>
</constants> </constants>
<theme_items> <theme_items>
<theme_item name="background_color" type="Color"> <theme_item name="background_color" type="Color">
Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled.
</theme_item> </theme_item>
<theme_item name="brace_mismatch_color" type="Color"> <theme_item name="brace_mismatch_color" type="Color">
</theme_item> </theme_item>
<theme_item name="breakpoint_color" type="Color"> <theme_item name="breakpoint_color" type="Color">
Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled.
</theme_item> </theme_item>
<theme_item name="caret_background_color" type="Color"> <theme_item name="caret_background_color" type="Color">
</theme_item> </theme_item>
@ -503,40 +521,51 @@
<theme_item name="completion_selected_color" type="Color"> <theme_item name="completion_selected_color" type="Color">
</theme_item> </theme_item>
<theme_item name="current_line_color" type="Color"> <theme_item name="current_line_color" type="Color">
Sets the current line highlight [Color]. [member highlight_current_line] has to be enabled.
</theme_item> </theme_item>
<theme_item name="focus" type="StyleBox"> <theme_item name="focus" type="StyleBox">
</theme_item> </theme_item>
<theme_item name="font" type="Font"> <theme_item name="font" type="Font">
Sets the default [Font].
</theme_item> </theme_item>
<theme_item name="font_color" type="Color"> <theme_item name="font_color" type="Color">
Sets the font [Color].
</theme_item> </theme_item>
<theme_item name="font_color_selected" type="Color"> <theme_item name="font_color_selected" type="Color">
</theme_item> </theme_item>
<theme_item name="function_color" type="Color"> <theme_item name="function_color" type="Color">
</theme_item> </theme_item>
<theme_item name="line_number_color" type="Color"> <theme_item name="line_number_color" type="Color">
Sets the [Color] of the line numbers. [member show_line_numbers] has to be enabled.
</theme_item> </theme_item>
<theme_item name="line_spacing" type="int"> <theme_item name="line_spacing" type="int">
Sets the spacing between the lines.
</theme_item> </theme_item>
<theme_item name="mark_color" type="Color"> <theme_item name="mark_color" type="Color">
Sets the [Color] of marked text.
</theme_item> </theme_item>
<theme_item name="member_variable_color" type="Color"> <theme_item name="member_variable_color" type="Color">
</theme_item> </theme_item>
<theme_item name="normal" type="StyleBox"> <theme_item name="normal" type="StyleBox">
Sets the [StyleBox] of this [TextEdit].
</theme_item> </theme_item>
<theme_item name="number_color" type="Color"> <theme_item name="number_color" type="Color">
</theme_item> </theme_item>
<theme_item name="read_only" type="StyleBox"> <theme_item name="read_only" type="StyleBox">
Sets the [StyleBox] of this [TextEdit] when [member read_only] is enabled.
</theme_item> </theme_item>
<theme_item name="safe_line_number_color" type="Color"> <theme_item name="safe_line_number_color" type="Color">
</theme_item> </theme_item>
<theme_item name="selection_color" type="Color"> <theme_item name="selection_color" type="Color">
Sets the highlight [Color] of text selections.
</theme_item> </theme_item>
<theme_item name="symbol_color" type="Color"> <theme_item name="symbol_color" type="Color">
</theme_item> </theme_item>
<theme_item name="tab" type="Texture"> <theme_item name="tab" type="Texture">
Sets a custom [Texture] for tab text characters.
</theme_item> </theme_item>
<theme_item name="word_highlighted_color" type="Color"> <theme_item name="word_highlighted_color" type="Color">
Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
</theme_item> </theme_item>
</theme_items> </theme_items>
</class> </class>