diff options
Diffstat (limited to 'doc/classes/TextEdit.xml')
-rw-r--r-- | doc/classes/TextEdit.xml | 55 |
1 files changed, 37 insertions, 18 deletions
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 75fceac500..0c6615c53b 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextEdit" inherits="Control" category="Core" version="3.2"> +<class name="TextEdit" inherits="Control" version="4.0"> <brief_description> Multiline text editing control. </brief_description> @@ -299,7 +299,7 @@ </description> </method> <method name="search" qualifiers="const"> - <return type="PoolIntArray"> + <return type="Dictionary"> </return> <argument index="0" name="key" type="String"> </argument> @@ -311,13 +311,13 @@ </argument> <description> 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: + Returns an empty [code]Dictionary[/code] if no result was found. Otherwise, returns a [code]Dictionary[/code] containing [code]line[/code] and [code]column[/code] entries, e.g: [codeblock] var result = search(key, flags, line, column) - if result.size() > 0: - # result found - var res_line = result[TextEdit.SEARCH_RESULT_LINE] - var res_column = result[TextEdit.SEARCH_RESULT_COLUMN] + if !result.empty(): + # Result found. + var line_number = result.line + var column_number = result.column [/codeblock] </description> </method> @@ -343,6 +343,17 @@ Select all the text. </description> </method> + <method name="set_line"> + <return type="void"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="new_text" type="String"> + </argument> + <description> + Sets the text for a specific line. + </description> + </method> <method name="set_line_as_hidden"> <return type="void"> </return> @@ -433,10 +444,17 @@ </member> <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" /> <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> + If [code]true[/code], custom [code]font_color_selected[/code] will be used for selected text. </member> <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false"> If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. </member> + <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> + The current horizontal scroll value. + </member> + <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> + The current vertical scroll value. + </member> <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true"> </member> <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true"> @@ -496,6 +514,12 @@ <description> </description> </signal> + <signal name="symbol_validate"> + <argument index="0" name="symbol" type="String"> + </argument> + <description> + </description> + </signal> <signal name="text_changed"> <description> Emitted when the text changes. @@ -512,12 +536,6 @@ <constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags"> Search from end to beginning. </constant> - <constant name="SEARCH_RESULT_COLUMN" value="0" enum="SearchResult"> - Used to access the result column from [method search]. - </constant> - <constant name="SEARCH_RESULT_LINE" value="1" enum="SearchResult"> - Used to access the result line from [method search]. - </constant> <constant name="MENU_CUT" value="0" enum="MenuItems"> Cuts (copies and clears) the selected text. </constant> @@ -586,9 +604,9 @@ </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> - <theme_item name="fold" type="Texture"> + <theme_item name="fold" type="Texture2D"> </theme_item> - <theme_item name="folded" type="Texture"> + <theme_item name="folded" type="Texture2D"> </theme_item> <theme_item name="font" type="Font"> Sets the default [Font]. @@ -599,6 +617,7 @@ <theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> + Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. </theme_item> <theme_item name="function_color" type="Color" default="Color( 0.4, 0.64, 0.81, 1 )"> </theme_item> @@ -626,12 +645,12 @@ <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> Sets the highlight [Color] of text selections. </theme_item> - <theme_item name="space" type="Texture"> + <theme_item name="space" type="Texture2D"> </theme_item> <theme_item name="symbol_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> - <theme_item name="tab" type="Texture"> - Sets a custom [Texture] for tab text characters. + <theme_item name="tab" type="Texture2D"> + Sets a custom [Texture2D] for tab text characters. </theme_item> <theme_item name="word_highlighted_color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )"> Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled. |