summaryrefslogtreecommitdiff
path: root/doc/classes/TextEdit.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/TextEdit.xml')
-rw-r--r--doc/classes/TextEdit.xml26
1 files changed, 20 insertions, 6 deletions
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 27eab85301..75fceac500 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -94,7 +94,7 @@
</argument>
<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.
+ If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs.
</description>
</method>
<method name="cursor_set_line">
@@ -110,8 +110,8 @@
</argument>
<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.
- If [code]can_be_hidden[/code] is set to true, the specified [code]line[/code] can be hidden using [method set_line_as_hidden].
+ 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].
</description>
</method>
<method name="cut">
@@ -310,7 +310,15 @@
<argument index="3" name="from_column" type="int">
</argument>
<description>
- Perform a search inside the text. Search flags can be specified in the[code]SEARCH_*[/code] enum.
+ 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:
+ [codeblock]
+ var result = search(key, flags, line, column)
+ if result.size() &gt; 0:
+ # result found
+ var res_line = result[TextEdit.SEARCH_RESULT_LINE]
+ var res_column = result[TextEdit.SEARCH_RESULT_COLUMN]
+ [/codeblock]
</description>
</method>
<method name="select">
@@ -504,8 +512,14 @@
<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.
+ Cuts (copies and clears) the selected text.
</constant>
<constant name="MENU_COPY" value="1" enum="MenuItems">
Copies the selected text.
@@ -530,7 +544,7 @@
</constant>
</constants>
<theme_items>
- <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )">
Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled.
</theme_item>
<theme_item name="bookmark_color" type="Color" default="Color( 0.08, 0.49, 0.98, 1 )">