class_textedit.rst 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the TextEdit.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_TextEdit:
  5. TextEdit
  6. ========
  7. **Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Multiline text editing control.
  12. Member Functions
  13. ----------------
  14. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`add_color_region<class_TextEdit_add_color_region>` **(** :ref:`String<class_string>` begin_key, :ref:`String<class_string>` end_key, :ref:`Color<class_color>` color, :ref:`bool<class_bool>` line_only=false **)** |
  16. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`add_keyword_color<class_TextEdit_add_keyword_color>` **(** :ref:`String<class_string>` keyword, :ref:`Color<class_color>` color **)** |
  18. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`clear_colors<class_TextEdit_clear_colors>` **(** **)** |
  20. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`clear_undo_history<class_TextEdit_clear_undo_history>` **(** **)** |
  22. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`copy<class_TextEdit_copy>` **(** **)** |
  24. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`cursor_get_blink_enabled<class_TextEdit_cursor_get_blink_enabled>` **(** **)** const |
  26. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`float<class_float>` | :ref:`cursor_get_blink_speed<class_TextEdit_cursor_get_blink_speed>` **(** **)** const |
  28. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | :ref:`cursor_get_column<class_TextEdit_cursor_get_column>` **(** **)** const |
  30. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`int<class_int>` | :ref:`cursor_get_line<class_TextEdit_cursor_get_line>` **(** **)** const |
  32. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`cursor_is_block_mode<class_TextEdit_cursor_is_block_mode>` **(** **)** const |
  34. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`cursor_set_blink_enabled<class_TextEdit_cursor_set_blink_enabled>` **(** :ref:`bool<class_bool>` enable **)** |
  36. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`cursor_set_blink_speed<class_TextEdit_cursor_set_blink_speed>` **(** :ref:`float<class_float>` blink_speed **)** |
  38. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`cursor_set_block_mode<class_TextEdit_cursor_set_block_mode>` **(** :ref:`bool<class_bool>` enable **)** |
  40. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`cursor_set_column<class_TextEdit_cursor_set_column>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true **)** |
  42. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`cursor_set_line<class_TextEdit_cursor_set_line>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` adjust_viewport=true **)** |
  44. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`cut<class_TextEdit_cut>` **(** **)** |
  46. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`String<class_string>` | :ref:`get_line<class_TextEdit_get_line>` **(** :ref:`int<class_int>` line **)** const |
  48. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`int<class_int>` | :ref:`get_line_count<class_TextEdit_get_line_count>` **(** **)** const |
  50. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`PopupMenu<class_popupmenu>` | :ref:`get_menu<class_TextEdit_get_menu>` **(** **)** const |
  52. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`int<class_int>` | :ref:`get_selection_from_column<class_TextEdit_get_selection_from_column>` **(** **)** const |
  54. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`int<class_int>` | :ref:`get_selection_from_line<class_TextEdit_get_selection_from_line>` **(** **)** const |
  56. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`String<class_string>` | :ref:`get_selection_text<class_TextEdit_get_selection_text>` **(** **)** const |
  58. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`int<class_int>` | :ref:`get_selection_to_column<class_TextEdit_get_selection_to_column>` **(** **)** const |
  60. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`int<class_int>` | :ref:`get_selection_to_line<class_TextEdit_get_selection_to_line>` **(** **)** const |
  62. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`String<class_string>` | :ref:`get_text<class_TextEdit_get_text>` **(** **)** |
  64. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`float<class_float>` | :ref:`get_v_scroll_speed<class_TextEdit_get_v_scroll_speed>` **(** **)** const |
  66. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`String<class_string>` | :ref:`get_word_under_cursor<class_TextEdit_get_word_under_cursor>` **(** **)** const |
  68. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | void | :ref:`insert_text_at_cursor<class_TextEdit_insert_text_at_cursor>` **(** :ref:`String<class_string>` text **)** |
  70. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`bool<class_bool>` | :ref:`is_highlight_all_occurrences_enabled<class_TextEdit_is_highlight_all_occurrences_enabled>` **(** **)** const |
  72. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`bool<class_bool>` | :ref:`is_highlight_current_line_enabled<class_TextEdit_is_highlight_current_line_enabled>` **(** **)** const |
  74. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`bool<class_bool>` | :ref:`is_overriding_selected_font_color<class_TextEdit_is_overriding_selected_font_color>` **(** **)** const |
  76. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`bool<class_bool>` | :ref:`is_selection_active<class_TextEdit_is_selection_active>` **(** **)** const |
  78. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`bool<class_bool>` | :ref:`is_show_line_numbers_enabled<class_TextEdit_is_show_line_numbers_enabled>` **(** **)** const |
  80. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`bool<class_bool>` | :ref:`is_smooth_scroll_enabled<class_TextEdit_is_smooth_scroll_enabled>` **(** **)** const |
  82. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`bool<class_bool>` | :ref:`is_syntax_coloring_enabled<class_TextEdit_is_syntax_coloring_enabled>` **(** **)** const |
  84. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`menu_option<class_TextEdit_menu_option>` **(** :ref:`int<class_int>` option **)** |
  86. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`paste<class_TextEdit_paste>` **(** **)** |
  88. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`redo<class_TextEdit_redo>` **(** **)** |
  90. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`PoolIntArray<class_poolintarray>` | :ref:`search<class_TextEdit_search>` **(** :ref:`String<class_string>` key, :ref:`int<class_int>` flags, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column **)** const |
  92. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`select<class_TextEdit_select>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column **)** |
  94. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`select_all<class_TextEdit_select_all>` **(** **)** |
  96. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | void | :ref:`set_highlight_all_occurrences<class_TextEdit_set_highlight_all_occurrences>` **(** :ref:`bool<class_bool>` enable **)** |
  98. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | void | :ref:`set_highlight_current_line<class_TextEdit_set_highlight_current_line>` **(** :ref:`bool<class_bool>` enabled **)** |
  100. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | void | :ref:`set_max_chars<class_TextEdit_set_max_chars>` **(** :ref:`int<class_int>` amount **)** |
  102. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | void | :ref:`set_override_selected_font_color<class_TextEdit_set_override_selected_font_color>` **(** :ref:`bool<class_bool>` override **)** |
  104. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | void | :ref:`set_readonly<class_TextEdit_set_readonly>` **(** :ref:`bool<class_bool>` enable **)** |
  106. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | void | :ref:`set_show_line_numbers<class_TextEdit_set_show_line_numbers>` **(** :ref:`bool<class_bool>` enable **)** |
  108. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | void | :ref:`set_smooth_scroll_enable<class_TextEdit_set_smooth_scroll_enable>` **(** :ref:`bool<class_bool>` enable **)** |
  110. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | void | :ref:`set_syntax_coloring<class_TextEdit_set_syntax_coloring>` **(** :ref:`bool<class_bool>` enable **)** |
  112. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | void | :ref:`set_text<class_TextEdit_set_text>` **(** :ref:`String<class_string>` text **)** |
  114. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | void | :ref:`set_v_scroll_speed<class_TextEdit_set_v_scroll_speed>` **(** :ref:`float<class_float>` speed **)** |
  116. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | void | :ref:`set_wrap<class_TextEdit_set_wrap>` **(** :ref:`bool<class_bool>` enable **)** |
  118. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | void | :ref:`undo<class_TextEdit_undo>` **(** **)** |
  120. +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. Signals
  122. -------
  123. .. _class_TextEdit_breakpoint_toggled:
  124. - **breakpoint_toggled** **(** :ref:`int<class_int>` row **)**
  125. Emitted when a breakpoint is placed via the breakpoint gutter.
  126. .. _class_TextEdit_cursor_changed:
  127. - **cursor_changed** **(** **)**
  128. Emitted when the cursor changes.
  129. .. _class_TextEdit_request_completion:
  130. - **request_completion** **(** **)**
  131. .. _class_TextEdit_symbol_lookup:
  132. - **symbol_lookup** **(** :ref:`String<class_string>` symbol, :ref:`int<class_int>` row, :ref:`int<class_int>` column **)**
  133. .. _class_TextEdit_text_changed:
  134. - **text_changed** **(** **)**
  135. Emitted when the text changes.
  136. Member Variables
  137. ----------------
  138. .. _class_TextEdit_caret_blink:
  139. - :ref:`bool<class_bool>` **caret_blink**
  140. .. _class_TextEdit_caret_blink_speed:
  141. - :ref:`float<class_float>` **caret_blink_speed**
  142. .. _class_TextEdit_caret_block_mode:
  143. - :ref:`bool<class_bool>` **caret_block_mode**
  144. .. _class_TextEdit_highlight_all_occurrences:
  145. - :ref:`bool<class_bool>` **highlight_all_occurrences**
  146. .. _class_TextEdit_highlight_current_line:
  147. - :ref:`bool<class_bool>` **highlight_current_line**
  148. .. _class_TextEdit_override_selected_font_color:
  149. - :ref:`bool<class_bool>` **override_selected_font_color**
  150. .. _class_TextEdit_show_line_numbers:
  151. - :ref:`bool<class_bool>` **show_line_numbers**
  152. .. _class_TextEdit_smooth_scrolling:
  153. - :ref:`bool<class_bool>` **smooth_scrolling**
  154. .. _class_TextEdit_syntax_highlighting:
  155. - :ref:`bool<class_bool>` **syntax_highlighting**
  156. .. _class_TextEdit_v_scroll_speed:
  157. - :ref:`float<class_float>` **v_scroll_speed**
  158. Numeric Constants
  159. -----------------
  160. - **SEARCH_MATCH_CASE** = **1** --- Match case when searching.
  161. - **SEARCH_WHOLE_WORDS** = **2** --- Match whole words when searching.
  162. - **SEARCH_BACKWARDS** = **4** --- Search from end to beginning.
  163. - **MENU_CUT** = **0**
  164. - **MENU_COPY** = **1**
  165. - **MENU_PASTE** = **2**
  166. - **MENU_CLEAR** = **3**
  167. - **MENU_SELECT_ALL** = **4**
  168. - **MENU_UNDO** = **5**
  169. - **MENU_MAX** = **6**
  170. Description
  171. -----------
  172. TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
  173. Member Function Description
  174. ---------------------------
  175. .. _class_TextEdit_add_color_region:
  176. - void **add_color_region** **(** :ref:`String<class_string>` begin_key, :ref:`String<class_string>` end_key, :ref:`Color<class_color>` color, :ref:`bool<class_bool>` line_only=false **)**
  177. Add color region (given the delimiters) and its colors.
  178. .. _class_TextEdit_add_keyword_color:
  179. - void **add_keyword_color** **(** :ref:`String<class_string>` keyword, :ref:`Color<class_color>` color **)**
  180. Add a keyword and its color.
  181. .. _class_TextEdit_clear_colors:
  182. - void **clear_colors** **(** **)**
  183. Clear all the syntax coloring information.
  184. .. _class_TextEdit_clear_undo_history:
  185. - void **clear_undo_history** **(** **)**
  186. Clear the undo history.
  187. .. _class_TextEdit_copy:
  188. - void **copy** **(** **)**
  189. Copy the current selection.
  190. .. _class_TextEdit_cursor_get_blink_enabled:
  191. - :ref:`bool<class_bool>` **cursor_get_blink_enabled** **(** **)** const
  192. Gets whether the text editor caret is blinking.
  193. .. _class_TextEdit_cursor_get_blink_speed:
  194. - :ref:`float<class_float>` **cursor_get_blink_speed** **(** **)** const
  195. Gets the text editor caret blink speed.
  196. .. _class_TextEdit_cursor_get_column:
  197. - :ref:`int<class_int>` **cursor_get_column** **(** **)** const
  198. Return the column the editing cursor is at.
  199. .. _class_TextEdit_cursor_get_line:
  200. - :ref:`int<class_int>` **cursor_get_line** **(** **)** const
  201. Return the line the editing cursor is at.
  202. .. _class_TextEdit_cursor_is_block_mode:
  203. - :ref:`bool<class_bool>` **cursor_is_block_mode** **(** **)** const
  204. Gets whether the text editor caret is in block mode.
  205. .. _class_TextEdit_cursor_set_blink_enabled:
  206. - void **cursor_set_blink_enabled** **(** :ref:`bool<class_bool>` enable **)**
  207. Set the text editor caret to blink.
  208. .. _class_TextEdit_cursor_set_blink_speed:
  209. - void **cursor_set_blink_speed** **(** :ref:`float<class_float>` blink_speed **)**
  210. Set the text editor caret blink speed. Cannot be less then or equal to 0.
  211. .. _class_TextEdit_cursor_set_block_mode:
  212. - void **cursor_set_block_mode** **(** :ref:`bool<class_bool>` enable **)**
  213. Set the text editor caret to block mode.
  214. .. _class_TextEdit_cursor_set_column:
  215. - void **cursor_set_column** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true **)**
  216. .. _class_TextEdit_cursor_set_line:
  217. - void **cursor_set_line** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` adjust_viewport=true **)**
  218. .. _class_TextEdit_cut:
  219. - void **cut** **(** **)**
  220. Cut the current selection.
  221. .. _class_TextEdit_get_line:
  222. - :ref:`String<class_string>` **get_line** **(** :ref:`int<class_int>` line **)** const
  223. Return the text of a specific line.
  224. .. _class_TextEdit_get_line_count:
  225. - :ref:`int<class_int>` **get_line_count** **(** **)** const
  226. Return the amount of total lines in the text.
  227. .. _class_TextEdit_get_menu:
  228. - :ref:`PopupMenu<class_popupmenu>` **get_menu** **(** **)** const
  229. .. _class_TextEdit_get_selection_from_column:
  230. - :ref:`int<class_int>` **get_selection_from_column** **(** **)** const
  231. Return the selection begin column.
  232. .. _class_TextEdit_get_selection_from_line:
  233. - :ref:`int<class_int>` **get_selection_from_line** **(** **)** const
  234. Return the selection begin line.
  235. .. _class_TextEdit_get_selection_text:
  236. - :ref:`String<class_string>` **get_selection_text** **(** **)** const
  237. Return the text inside the selection.
  238. .. _class_TextEdit_get_selection_to_column:
  239. - :ref:`int<class_int>` **get_selection_to_column** **(** **)** const
  240. Return the selection end column.
  241. .. _class_TextEdit_get_selection_to_line:
  242. - :ref:`int<class_int>` **get_selection_to_line** **(** **)** const
  243. Return the selection end line.
  244. .. _class_TextEdit_get_text:
  245. - :ref:`String<class_string>` **get_text** **(** **)**
  246. Return the whole text.
  247. .. _class_TextEdit_get_v_scroll_speed:
  248. - :ref:`float<class_float>` **get_v_scroll_speed** **(** **)** const
  249. .. _class_TextEdit_get_word_under_cursor:
  250. - :ref:`String<class_string>` **get_word_under_cursor** **(** **)** const
  251. .. _class_TextEdit_insert_text_at_cursor:
  252. - void **insert_text_at_cursor** **(** :ref:`String<class_string>` text **)**
  253. Insert a given text at the cursor position.
  254. .. _class_TextEdit_is_highlight_all_occurrences_enabled:
  255. - :ref:`bool<class_bool>` **is_highlight_all_occurrences_enabled** **(** **)** const
  256. Returns true if highlight all occurrences is enabled.
  257. .. _class_TextEdit_is_highlight_current_line_enabled:
  258. - :ref:`bool<class_bool>` **is_highlight_current_line_enabled** **(** **)** const
  259. .. _class_TextEdit_is_overriding_selected_font_color:
  260. - :ref:`bool<class_bool>` **is_overriding_selected_font_color** **(** **)** const
  261. .. _class_TextEdit_is_selection_active:
  262. - :ref:`bool<class_bool>` **is_selection_active** **(** **)** const
  263. Return true if the selection is active.
  264. .. _class_TextEdit_is_show_line_numbers_enabled:
  265. - :ref:`bool<class_bool>` **is_show_line_numbers_enabled** **(** **)** const
  266. Returns true if line numbers are enabled.
  267. .. _class_TextEdit_is_smooth_scroll_enabled:
  268. - :ref:`bool<class_bool>` **is_smooth_scroll_enabled** **(** **)** const
  269. .. _class_TextEdit_is_syntax_coloring_enabled:
  270. - :ref:`bool<class_bool>` **is_syntax_coloring_enabled** **(** **)** const
  271. Return true if the syntax coloring is enabled.
  272. .. _class_TextEdit_menu_option:
  273. - void **menu_option** **(** :ref:`int<class_int>` option **)**
  274. .. _class_TextEdit_paste:
  275. - void **paste** **(** **)**
  276. Paste the current selection.
  277. .. _class_TextEdit_redo:
  278. - void **redo** **(** **)**
  279. Perform redo operation.
  280. .. _class_TextEdit_search:
  281. - :ref:`PoolIntArray<class_poolintarray>` **search** **(** :ref:`String<class_string>` key, :ref:`int<class_int>` flags, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column **)** const
  282. Perform a search inside the text. Search flags can be specified in the SEARCH\_\* enum.
  283. .. _class_TextEdit_select:
  284. - void **select** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column **)**
  285. Perform selection, from line/column to line/column.
  286. .. _class_TextEdit_select_all:
  287. - void **select_all** **(** **)**
  288. Select all the text.
  289. .. _class_TextEdit_set_highlight_all_occurrences:
  290. - void **set_highlight_all_occurrences** **(** :ref:`bool<class_bool>` enable **)**
  291. Set to enable highlighting all occurrences of the current selection.
  292. .. _class_TextEdit_set_highlight_current_line:
  293. - void **set_highlight_current_line** **(** :ref:`bool<class_bool>` enabled **)**
  294. .. _class_TextEdit_set_max_chars:
  295. - void **set_max_chars** **(** :ref:`int<class_int>` amount **)**
  296. Set the maximum amount of characters editable.
  297. .. _class_TextEdit_set_override_selected_font_color:
  298. - void **set_override_selected_font_color** **(** :ref:`bool<class_bool>` override **)**
  299. .. _class_TextEdit_set_readonly:
  300. - void **set_readonly** **(** :ref:`bool<class_bool>` enable **)**
  301. Set the text editor as read-only. Text can be displayed but not edited.
  302. .. _class_TextEdit_set_show_line_numbers:
  303. - void **set_show_line_numbers** **(** :ref:`bool<class_bool>` enable **)**
  304. Set to enable showing line numbers.
  305. .. _class_TextEdit_set_smooth_scroll_enable:
  306. - void **set_smooth_scroll_enable** **(** :ref:`bool<class_bool>` enable **)**
  307. .. _class_TextEdit_set_syntax_coloring:
  308. - void **set_syntax_coloring** **(** :ref:`bool<class_bool>` enable **)**
  309. Set to enable the syntax coloring.
  310. .. _class_TextEdit_set_text:
  311. - void **set_text** **(** :ref:`String<class_string>` text **)**
  312. Set the entire text.
  313. .. _class_TextEdit_set_v_scroll_speed:
  314. - void **set_v_scroll_speed** **(** :ref:`float<class_float>` speed **)**
  315. .. _class_TextEdit_set_wrap:
  316. - void **set_wrap** **(** :ref:`bool<class_bool>` enable **)**
  317. Enable text wrapping when it goes beyond he edge of what is visible.
  318. .. _class_TextEdit_undo:
  319. - void **undo** **(** **)**
  320. Perform undo operation.