TextEdit.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="TextEdit" inherits="Control" version="3.4">
  3. <brief_description>
  4. Multiline text editing control.
  5. </brief_description>
  6. <description>
  7. 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.
  8. [b]Note:[/b] When holding down [code]Alt[/code], the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="add_color_region">
  14. <return type="void" />
  15. <argument index="0" name="begin_key" type="String" />
  16. <argument index="1" name="end_key" type="String" />
  17. <argument index="2" name="color" type="Color" />
  18. <argument index="3" name="line_only" type="bool" default="false" />
  19. <description>
  20. Adds color region (given the delimiters) and its colors.
  21. </description>
  22. </method>
  23. <method name="add_keyword_color">
  24. <return type="void" />
  25. <argument index="0" name="keyword" type="String" />
  26. <argument index="1" name="color" type="Color" />
  27. <description>
  28. Adds a [code]keyword[/code] and its [Color].
  29. </description>
  30. </method>
  31. <method name="can_fold" qualifiers="const">
  32. <return type="bool" />
  33. <argument index="0" name="line" type="int" />
  34. <description>
  35. Returns if the given line is foldable, that is, it has indented lines right below it.
  36. </description>
  37. </method>
  38. <method name="center_viewport_to_cursor">
  39. <return type="void" />
  40. <description>
  41. Centers the viewport on the line the editing cursor is at. This also resets the [member scroll_horizontal] value to [code]0[/code].
  42. </description>
  43. </method>
  44. <method name="clear_colors">
  45. <return type="void" />
  46. <description>
  47. Clears all custom syntax coloring information previously added with [method add_color_region] or [method add_keyword_color].
  48. </description>
  49. </method>
  50. <method name="clear_undo_history">
  51. <return type="void" />
  52. <description>
  53. Clears the undo history.
  54. </description>
  55. </method>
  56. <method name="copy">
  57. <return type="void" />
  58. <description>
  59. Copy's the current text selection.
  60. </description>
  61. </method>
  62. <method name="cursor_get_column" qualifiers="const">
  63. <return type="int" />
  64. <description>
  65. Returns the column the editing cursor is at.
  66. </description>
  67. </method>
  68. <method name="cursor_get_line" qualifiers="const">
  69. <return type="int" />
  70. <description>
  71. Returns the line the editing cursor is at.
  72. </description>
  73. </method>
  74. <method name="cursor_set_column">
  75. <return type="void" />
  76. <argument index="0" name="column" type="int" />
  77. <argument index="1" name="adjust_viewport" type="bool" default="true" />
  78. <description>
  79. Moves the cursor at the specified [code]column[/code] index.
  80. If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs.
  81. </description>
  82. </method>
  83. <method name="cursor_set_line">
  84. <return type="void" />
  85. <argument index="0" name="line" type="int" />
  86. <argument index="1" name="adjust_viewport" type="bool" default="true" />
  87. <argument index="2" name="can_be_hidden" type="bool" default="true" />
  88. <argument index="3" name="wrap_index" type="int" default="0" />
  89. <description>
  90. Moves the cursor at the specified [code]line[/code] index.
  91. If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs.
  92. 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].
  93. </description>
  94. </method>
  95. <method name="cut">
  96. <return type="void" />
  97. <description>
  98. Cut's the current selection.
  99. </description>
  100. </method>
  101. <method name="deselect">
  102. <return type="void" />
  103. <description>
  104. Deselects the current selection.
  105. </description>
  106. </method>
  107. <method name="fold_all_lines">
  108. <return type="void" />
  109. <description>
  110. Folds all lines that are possible to be folded (see [method can_fold]).
  111. </description>
  112. </method>
  113. <method name="fold_line">
  114. <return type="void" />
  115. <argument index="0" name="line" type="int" />
  116. <description>
  117. Folds the given line, if possible (see [method can_fold]).
  118. </description>
  119. </method>
  120. <method name="get_breakpoints" qualifiers="const">
  121. <return type="Array" />
  122. <description>
  123. Returns an array containing the line number of each breakpoint.
  124. </description>
  125. </method>
  126. <method name="get_keyword_color" qualifiers="const">
  127. <return type="Color" />
  128. <argument index="0" name="keyword" type="String" />
  129. <description>
  130. Returns the [Color] of the specified [code]keyword[/code].
  131. </description>
  132. </method>
  133. <method name="get_line" qualifiers="const">
  134. <return type="String" />
  135. <argument index="0" name="line" type="int" />
  136. <description>
  137. Returns the text of a specific line.
  138. </description>
  139. </method>
  140. <method name="get_line_column_at_pos" qualifiers="const">
  141. <return type="Vector2" />
  142. <argument index="0" name="position" type="Vector2" />
  143. <description>
  144. Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line.
  145. </description>
  146. </method>
  147. <method name="get_line_count" qualifiers="const">
  148. <return type="int" />
  149. <description>
  150. Returns the amount of total lines in the text.
  151. </description>
  152. </method>
  153. <method name="get_line_height" qualifiers="const">
  154. <return type="int" />
  155. <description>
  156. Returns the height of a largest line.
  157. </description>
  158. </method>
  159. <method name="get_line_width" qualifiers="const">
  160. <return type="int" />
  161. <argument index="0" name="line" type="int" />
  162. <argument index="1" name="wrap_index" type="int" default="-1" />
  163. <description>
  164. Returns the width in pixels of the [code]wrap_index[/code] on [code]line[/code].
  165. </description>
  166. </method>
  167. <method name="get_line_wrap_count" qualifiers="const">
  168. <return type="int" />
  169. <argument index="0" name="line" type="int" />
  170. <description>
  171. Returns the number of times the given line is wrapped.
  172. </description>
  173. </method>
  174. <method name="get_line_wrapped_text" qualifiers="const">
  175. <return type="PoolStringArray" />
  176. <argument index="0" name="line" type="int" />
  177. <description>
  178. Returns an array of [String]s representing each wrapped index.
  179. </description>
  180. </method>
  181. <method name="get_menu" qualifiers="const">
  182. <return type="PopupMenu" />
  183. <description>
  184. Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit].
  185. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
  186. </description>
  187. </method>
  188. <method name="get_pos_at_line_column" qualifiers="const">
  189. <return type="Vector2" />
  190. <argument index="0" name="line" type="int" />
  191. <argument index="1" name="column" type="int" />
  192. <description>
  193. Returns the local position for the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] of the returned vector equal [code]-1[/code], the position is outside of the viewable area of the control.
  194. [b]Note:[/b] The Y position corresponds to the bottom side of the line. Use [method get_rect_at_line_column] to get the top side position.
  195. </description>
  196. </method>
  197. <method name="get_rect_at_line_column" qualifiers="const">
  198. <return type="Rect2" />
  199. <argument index="0" name="line" type="int" />
  200. <argument index="1" name="column" type="int" />
  201. <description>
  202. Returns the local position and size for the grapheme at the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] position of the returned rect equal [code]-1[/code], the position is outside of the viewable area of the control.
  203. [b]Note:[/b] The Y position of the returned rect corresponds to the top side of the line, unlike [method get_pos_at_line_column] which returns the bottom side.
  204. </description>
  205. </method>
  206. <method name="get_selection_from_column" qualifiers="const">
  207. <return type="int" />
  208. <description>
  209. Returns the selection begin column.
  210. </description>
  211. </method>
  212. <method name="get_selection_from_line" qualifiers="const">
  213. <return type="int" />
  214. <description>
  215. Returns the selection begin line.
  216. </description>
  217. </method>
  218. <method name="get_selection_text" qualifiers="const">
  219. <return type="String" />
  220. <description>
  221. Returns the text inside the selection.
  222. </description>
  223. </method>
  224. <method name="get_selection_to_column" qualifiers="const">
  225. <return type="int" />
  226. <description>
  227. Returns the selection end column.
  228. </description>
  229. </method>
  230. <method name="get_selection_to_line" qualifiers="const">
  231. <return type="int" />
  232. <description>
  233. Returns the selection end line.
  234. </description>
  235. </method>
  236. <method name="get_total_gutter_width" qualifiers="const">
  237. <return type="int" />
  238. <description>
  239. Returns the total width of all gutters and internal padding.
  240. </description>
  241. </method>
  242. <method name="get_word_under_cursor" qualifiers="const">
  243. <return type="String" />
  244. <description>
  245. Returns a [String] text with the word under the caret (text cursor) location.
  246. </description>
  247. </method>
  248. <method name="has_keyword_color" qualifiers="const">
  249. <return type="bool" />
  250. <argument index="0" name="keyword" type="String" />
  251. <description>
  252. Returns whether the specified [code]keyword[/code] has a color set to it or not.
  253. </description>
  254. </method>
  255. <method name="has_redo" qualifiers="const">
  256. <return type="bool" />
  257. <description>
  258. Returns [code]true[/code] if a "redo" action is available.
  259. </description>
  260. </method>
  261. <method name="has_undo" qualifiers="const">
  262. <return type="bool" />
  263. <description>
  264. Returns [code]true[/code] if an "undo" action is available.
  265. </description>
  266. </method>
  267. <method name="insert_text_at_cursor">
  268. <return type="void" />
  269. <argument index="0" name="text" type="String" />
  270. <description>
  271. Insert the specified text at the cursor position.
  272. </description>
  273. </method>
  274. <method name="is_folded" qualifiers="const">
  275. <return type="bool" />
  276. <argument index="0" name="line" type="int" />
  277. <description>
  278. Returns whether the line at the specified index is folded or not.
  279. </description>
  280. </method>
  281. <method name="is_line_hidden" qualifiers="const">
  282. <return type="bool" />
  283. <argument index="0" name="line" type="int" />
  284. <description>
  285. Returns whether the line at the specified index is hidden or not.
  286. </description>
  287. </method>
  288. <method name="is_line_set_as_bookmark" qualifiers="const">
  289. <return type="bool" />
  290. <argument index="0" name="line" type="int" />
  291. <description>
  292. Returns [code]true[/code] when the specified [code]line[/code] is bookmarked.
  293. </description>
  294. </method>
  295. <method name="is_line_set_as_breakpoint" qualifiers="const">
  296. <return type="bool" />
  297. <argument index="0" name="line" type="int" />
  298. <description>
  299. Returns [code]true[/code] when the specified [code]line[/code] has a breakpoint.
  300. </description>
  301. </method>
  302. <method name="is_line_set_as_safe" qualifiers="const">
  303. <return type="bool" />
  304. <argument index="0" name="line" type="int" />
  305. <description>
  306. Returns [code]true[/code] when the specified [code]line[/code] is marked as safe.
  307. </description>
  308. </method>
  309. <method name="is_line_wrapped" qualifiers="const">
  310. <return type="bool" />
  311. <argument index="0" name="line" type="int" />
  312. <description>
  313. Returns if the given line is wrapped.
  314. </description>
  315. </method>
  316. <method name="is_selection_active" qualifiers="const">
  317. <return type="bool" />
  318. <description>
  319. Returns [code]true[/code] if the selection is active.
  320. </description>
  321. </method>
  322. <method name="menu_option">
  323. <return type="void" />
  324. <argument index="0" name="option" type="int" />
  325. <description>
  326. Triggers a right-click menu action by the specified index. See [enum MenuItems] for a list of available indexes.
  327. </description>
  328. </method>
  329. <method name="paste">
  330. <return type="void" />
  331. <description>
  332. Paste the current selection.
  333. </description>
  334. </method>
  335. <method name="redo">
  336. <return type="void" />
  337. <description>
  338. Perform redo operation.
  339. </description>
  340. </method>
  341. <method name="remove_breakpoints">
  342. <return type="void" />
  343. <description>
  344. Removes all the breakpoints. This will not fire the [signal breakpoint_toggled] signal.
  345. </description>
  346. </method>
  347. <method name="search" qualifiers="const">
  348. <return type="PoolIntArray" />
  349. <argument index="0" name="key" type="String" />
  350. <argument index="1" name="flags" type="int" />
  351. <argument index="2" name="from_line" type="int" />
  352. <argument index="3" name="from_column" type="int" />
  353. <description>
  354. Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
  355. 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:
  356. [codeblock]
  357. var result = search(key, flags, line, column)
  358. if result.size() &gt; 0:
  359. # Result found.
  360. var res_line = result[TextEdit.SEARCH_RESULT_LINE]
  361. var res_column = result[TextEdit.SEARCH_RESULT_COLUMN]
  362. [/codeblock]
  363. </description>
  364. </method>
  365. <method name="select">
  366. <return type="void" />
  367. <argument index="0" name="from_line" type="int" />
  368. <argument index="1" name="from_column" type="int" />
  369. <argument index="2" name="to_line" type="int" />
  370. <argument index="3" name="to_column" type="int" />
  371. <description>
  372. Perform selection, from line/column to line/column.
  373. If [member selecting_enabled] is [code]false[/code], no selection will occur.
  374. </description>
  375. </method>
  376. <method name="select_all">
  377. <return type="void" />
  378. <description>
  379. Select all the text.
  380. If [member selecting_enabled] is [code]false[/code], no selection will occur.
  381. </description>
  382. </method>
  383. <method name="set_line">
  384. <return type="void" />
  385. <argument index="0" name="line" type="int" />
  386. <argument index="1" name="new_text" type="String" />
  387. <description>
  388. Sets the text for a specific line.
  389. </description>
  390. </method>
  391. <method name="set_line_as_bookmark">
  392. <return type="void" />
  393. <argument index="0" name="line" type="int" />
  394. <argument index="1" name="bookmark" type="bool" />
  395. <description>
  396. Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes the bookmark if [code]bookmark[/code] is false.
  397. Bookmarks are shown in the [member breakpoint_gutter].
  398. </description>
  399. </method>
  400. <method name="set_line_as_breakpoint">
  401. <return type="void" />
  402. <argument index="0" name="line" type="int" />
  403. <argument index="1" name="breakpoint" type="bool" />
  404. <description>
  405. Adds or removes the breakpoint in [code]line[/code]. Breakpoints are shown in the [member breakpoint_gutter].
  406. </description>
  407. </method>
  408. <method name="set_line_as_hidden">
  409. <return type="void" />
  410. <argument index="0" name="line" type="int" />
  411. <argument index="1" name="enable" type="bool" />
  412. <description>
  413. If [code]true[/code], hides the line of the specified index.
  414. </description>
  415. </method>
  416. <method name="set_line_as_safe">
  417. <return type="void" />
  418. <argument index="0" name="line" type="int" />
  419. <argument index="1" name="safe" type="bool" />
  420. <description>
  421. If [code]true[/code], marks the [code]line[/code] as safe.
  422. This will show the line number with the color provided in the [code]safe_line_number_color[/code] theme property.
  423. </description>
  424. </method>
  425. <method name="toggle_fold_line">
  426. <return type="void" />
  427. <argument index="0" name="line" type="int" />
  428. <description>
  429. Toggle the folding of the code block at the given line.
  430. </description>
  431. </method>
  432. <method name="undo">
  433. <return type="void" />
  434. <description>
  435. Perform undo operation.
  436. </description>
  437. </method>
  438. <method name="unfold_line">
  439. <return type="void" />
  440. <argument index="0" name="line" type="int" />
  441. <description>
  442. Unfolds the given line, if folded.
  443. </description>
  444. </method>
  445. <method name="unhide_all_lines">
  446. <return type="void" />
  447. <description>
  448. Unhide all lines that were previously set to hidden by [method set_line_as_hidden].
  449. </description>
  450. </method>
  451. </methods>
  452. <members>
  453. <member name="bookmark_gutter" type="bool" setter="set_bookmark_gutter_enabled" getter="is_bookmark_gutter_enabled" default="false">
  454. If [code]true[/code], the bookmark gutter is visible.
  455. </member>
  456. <member name="breakpoint_gutter" type="bool" setter="set_breakpoint_gutter_enabled" getter="is_breakpoint_gutter_enabled" default="false">
  457. If [code]true[/code], the breakpoint gutter is visible.
  458. </member>
  459. <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false">
  460. If [code]true[/code], the caret (visual cursor) blinks.
  461. </member>
  462. <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" default="0.65">
  463. Duration (in seconds) of a caret's blinking cycle.
  464. </member>
  465. <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode" default="false">
  466. If [code]true[/code], the caret displays as a rectangle.
  467. If [code]false[/code], the caret displays as a bar.
  468. </member>
  469. <member name="caret_moving_by_right_click" type="bool" setter="set_right_click_moves_caret" getter="is_right_click_moving_caret" default="true">
  470. If [code]true[/code], a right-click moves the cursor at the mouse position before displaying the context menu.
  471. If [code]false[/code], the context menu disregards mouse location.
  472. </member>
  473. <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true">
  474. If [code]true[/code], a right-click displays the context menu.
  475. </member>
  476. <member name="draw_spaces" type="bool" setter="set_draw_spaces" getter="is_drawing_spaces" default="false">
  477. If [code]true[/code], the "space" character will have a visible representation.
  478. </member>
  479. <member name="draw_tabs" type="bool" setter="set_draw_tabs" getter="is_drawing_tabs" default="false">
  480. If [code]true[/code], the "tab" character will have a visible representation.
  481. </member>
  482. <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
  483. <member name="fold_gutter" type="bool" setter="set_draw_fold_gutter" getter="is_drawing_fold_gutter" default="false">
  484. If [code]true[/code], the fold gutter is visible. This enables folding groups of indented lines.
  485. </member>
  486. <member name="hiding_enabled" type="bool" setter="set_hiding_enabled" getter="is_hiding_enabled" default="false">
  487. If [code]true[/code], all lines that have been set to hidden by [method set_line_as_hidden], will not be visible.
  488. </member>
  489. <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false">
  490. If [code]true[/code], all occurrences of the selected text will be highlighted.
  491. </member>
  492. <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled" default="false">
  493. If [code]true[/code], the line containing the cursor is highlighted.
  494. </member>
  495. <member name="minimap_draw" type="bool" setter="draw_minimap" getter="is_drawing_minimap" default="false">
  496. If [code]true[/code], a minimap is shown, providing an outline of your source code.
  497. </member>
  498. <member name="minimap_width" type="int" setter="set_minimap_width" getter="get_minimap_width" default="80">
  499. The width, in pixels, of the minimap.
  500. </member>
  501. <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" />
  502. <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
  503. If [code]true[/code], custom [code]font_color_selected[/code] will be used for selected text.
  504. </member>
  505. <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false">
  506. If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
  507. </member>
  508. <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
  509. If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
  510. </member>
  511. <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0">
  512. If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line.
  513. </member>
  514. <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true">
  515. If [code]true[/code], text can be selected.
  516. If [code]false[/code], text can not be selected by the user or by the [method select] or [method select_all] methods.
  517. </member>
  518. <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
  519. If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled.
  520. </member>
  521. <member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled" default="false">
  522. If [code]true[/code], line numbers are displayed to the left of the text.
  523. </member>
  524. <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false">
  525. If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling.
  526. </member>
  527. <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled" default="false">
  528. If [code]true[/code], any custom color properties that have been set for this [TextEdit] will be visible.
  529. </member>
  530. <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
  531. String value of the [TextEdit].
  532. </member>
  533. <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0">
  534. Vertical scroll sensitivity.
  535. </member>
  536. <member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true">
  537. If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it.
  538. </member>
  539. <member name="wrap_enabled" type="bool" setter="set_wrap_enabled" getter="is_wrap_enabled" default="false">
  540. If [code]true[/code], enables text wrapping when it goes beyond the edge of what is visible.
  541. </member>
  542. </members>
  543. <signals>
  544. <signal name="breakpoint_toggled">
  545. <argument index="0" name="row" type="int" />
  546. <description>
  547. Emitted when a breakpoint is placed via the breakpoint gutter.
  548. </description>
  549. </signal>
  550. <signal name="cursor_changed">
  551. <description>
  552. Emitted when the cursor changes.
  553. </description>
  554. </signal>
  555. <signal name="info_clicked">
  556. <argument index="0" name="row" type="int" />
  557. <argument index="1" name="info" type="String" />
  558. <description>
  559. Emitted when the info icon is clicked.
  560. </description>
  561. </signal>
  562. <signal name="request_completion">
  563. <description>
  564. </description>
  565. </signal>
  566. <signal name="symbol_lookup">
  567. <argument index="0" name="symbol" type="String" />
  568. <argument index="1" name="row" type="int" />
  569. <argument index="2" name="column" type="int" />
  570. <description>
  571. </description>
  572. </signal>
  573. <signal name="text_changed">
  574. <description>
  575. Emitted when the text changes.
  576. </description>
  577. </signal>
  578. </signals>
  579. <constants>
  580. <constant name="SEARCH_MATCH_CASE" value="1" enum="SearchFlags">
  581. Match case when searching.
  582. </constant>
  583. <constant name="SEARCH_WHOLE_WORDS" value="2" enum="SearchFlags">
  584. Match whole words when searching.
  585. </constant>
  586. <constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags">
  587. Search from end to beginning.
  588. </constant>
  589. <constant name="SEARCH_RESULT_COLUMN" value="0" enum="SearchResult">
  590. Used to access the result column from [method search].
  591. </constant>
  592. <constant name="SEARCH_RESULT_LINE" value="1" enum="SearchResult">
  593. Used to access the result line from [method search].
  594. </constant>
  595. <constant name="MENU_CUT" value="0" enum="MenuItems">
  596. Cuts (copies and clears) the selected text.
  597. </constant>
  598. <constant name="MENU_COPY" value="1" enum="MenuItems">
  599. Copies the selected text.
  600. </constant>
  601. <constant name="MENU_PASTE" value="2" enum="MenuItems">
  602. Pastes the clipboard text over the selected text (or at the cursor's position).
  603. </constant>
  604. <constant name="MENU_CLEAR" value="3" enum="MenuItems">
  605. Erases the whole [TextEdit] text.
  606. </constant>
  607. <constant name="MENU_SELECT_ALL" value="4" enum="MenuItems">
  608. Selects the whole [TextEdit] text.
  609. </constant>
  610. <constant name="MENU_UNDO" value="5" enum="MenuItems">
  611. Undoes the previous action.
  612. </constant>
  613. <constant name="MENU_REDO" value="6" enum="MenuItems">
  614. Redoes the previous action.
  615. </constant>
  616. <constant name="MENU_MAX" value="7" enum="MenuItems">
  617. Represents the size of the [enum MenuItems] enum.
  618. </constant>
  619. </constants>
  620. <theme_items>
  621. <theme_item name="background_color" data_type="color" type="Color" default="Color( 0, 0, 0, 0 )">
  622. Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled.
  623. </theme_item>
  624. <theme_item name="bookmark_color" data_type="color" type="Color" default="Color( 0.08, 0.49, 0.98, 1 )">
  625. Sets the [Color] of the bookmark marker. [member syntax_highlighting] has to be enabled.
  626. </theme_item>
  627. <theme_item name="brace_mismatch_color" data_type="color" type="Color" default="Color( 1, 0.2, 0.2, 1 )">
  628. </theme_item>
  629. <theme_item name="breakpoint_color" data_type="color" type="Color" default="Color( 0.8, 0.8, 0.4, 0.2 )">
  630. Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled.
  631. </theme_item>
  632. <theme_item name="caret_background_color" data_type="color" type="Color" default="Color( 0, 0, 0, 1 )">
  633. </theme_item>
  634. <theme_item name="caret_color" data_type="color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
  635. </theme_item>
  636. <theme_item name="code_folding_color" data_type="color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )">
  637. </theme_item>
  638. <theme_item name="completion_background_color" data_type="color" type="Color" default="Color( 0.17, 0.16, 0.2, 1 )">
  639. </theme_item>
  640. <theme_item name="completion_existing_color" data_type="color" type="Color" default="Color( 0.87, 0.87, 0.87, 0.13 )">
  641. </theme_item>
  642. <theme_item name="completion_font_color" data_type="color" type="Color" default="Color( 0.67, 0.67, 0.67, 1 )">
  643. </theme_item>
  644. <theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
  645. </theme_item>
  646. <theme_item name="completion_selected_color" data_type="color" type="Color" default="Color( 0.26, 0.26, 0.27, 1 )">
  647. </theme_item>
  648. <theme_item name="current_line_color" data_type="color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )">
  649. Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled.
  650. </theme_item>
  651. <theme_item name="executing_line_color" data_type="color" type="Color" default="Color( 0.2, 0.8, 0.2, 0.4 )">
  652. </theme_item>
  653. <theme_item name="font_color" data_type="color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
  654. Sets the font [Color].
  655. </theme_item>
  656. <theme_item name="font_color_readonly" data_type="color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
  657. </theme_item>
  658. <theme_item name="font_color_selected" data_type="color" type="Color" default="Color( 0, 0, 0, 1 )">
  659. Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
  660. </theme_item>
  661. <theme_item name="function_color" data_type="color" type="Color" default="Color( 0.4, 0.64, 0.81, 1 )">
  662. </theme_item>
  663. <theme_item name="line_number_color" data_type="color" type="Color" default="Color( 0.67, 0.67, 0.67, 0.4 )">
  664. Sets the [Color] of the line numbers. [member show_line_numbers] has to be enabled.
  665. </theme_item>
  666. <theme_item name="mark_color" data_type="color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )">
  667. Sets the [Color] of marked text.
  668. </theme_item>
  669. <theme_item name="member_variable_color" data_type="color" type="Color" default="Color( 0.9, 0.31, 0.35, 1 )">
  670. </theme_item>
  671. <theme_item name="number_color" data_type="color" type="Color" default="Color( 0.92, 0.58, 0.2, 1 )">
  672. </theme_item>
  673. <theme_item name="safe_line_number_color" data_type="color" type="Color" default="Color( 0.67, 0.78, 0.67, 0.6 )">
  674. </theme_item>
  675. <theme_item name="selection_color" data_type="color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )">
  676. Sets the highlight [Color] of text selections.
  677. </theme_item>
  678. <theme_item name="symbol_color" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  679. </theme_item>
  680. <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )">
  681. Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
  682. </theme_item>
  683. <theme_item name="completion_lines" data_type="constant" type="int" default="7">
  684. </theme_item>
  685. <theme_item name="completion_max_width" data_type="constant" type="int" default="50">
  686. </theme_item>
  687. <theme_item name="completion_scroll_width" data_type="constant" type="int" default="3">
  688. </theme_item>
  689. <theme_item name="line_spacing" data_type="constant" type="int" default="4">
  690. Sets the spacing between the lines.
  691. </theme_item>
  692. <theme_item name="font" data_type="font" type="Font">
  693. Sets the default [Font].
  694. </theme_item>
  695. <theme_item name="fold" data_type="icon" type="Texture">
  696. </theme_item>
  697. <theme_item name="folded" data_type="icon" type="Texture">
  698. </theme_item>
  699. <theme_item name="space" data_type="icon" type="Texture">
  700. </theme_item>
  701. <theme_item name="tab" data_type="icon" type="Texture">
  702. Sets a custom [Texture] for tab text characters.
  703. </theme_item>
  704. <theme_item name="completion" data_type="style" type="StyleBox">
  705. </theme_item>
  706. <theme_item name="focus" data_type="style" type="StyleBox">
  707. </theme_item>
  708. <theme_item name="normal" data_type="style" type="StyleBox">
  709. Sets the [StyleBox] of this [TextEdit].
  710. </theme_item>
  711. <theme_item name="read_only" data_type="style" type="StyleBox">
  712. Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled.
  713. </theme_item>
  714. </theme_items>
  715. </class>