TextEdit.xml 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="TextEdit" inherits="Control" version="4.0">
  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 [kbd]Alt[/kbd], 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="_backspace" qualifiers="virtual">
  14. <return type="void" />
  15. <description>
  16. Override this method to define what happens when the user presses the backspace key.
  17. </description>
  18. </method>
  19. <method name="_copy" qualifiers="virtual">
  20. <return type="void" />
  21. <description>
  22. Override this method to define what happens when the user performs a copy operation.
  23. </description>
  24. </method>
  25. <method name="_cut" qualifiers="virtual">
  26. <return type="void" />
  27. <description>
  28. Override this method to define what happens when the user performs a cut operation.
  29. </description>
  30. </method>
  31. <method name="_handle_unicode_input" qualifiers="virtual">
  32. <return type="void" />
  33. <argument index="0" name="unicode_char" type="int" />
  34. <description>
  35. Override this method to define what happens when the types in the provided key [code]unicode[/code].
  36. </description>
  37. </method>
  38. <method name="_paste" qualifiers="virtual">
  39. <return type="void" />
  40. <description>
  41. Override this method to define what happens when the user performs a paste operation.
  42. </description>
  43. </method>
  44. <method name="_paste_primary_clipboard" qualifiers="virtual">
  45. <return type="void" />
  46. <description>
  47. Override this method to define what happens when the user performs a paste operation with middle mouse button.
  48. [b]Note:[/b] This method is only implemented on Linux.
  49. </description>
  50. </method>
  51. <method name="add_gutter">
  52. <return type="void" />
  53. <argument index="0" name="at" type="int" default="-1" />
  54. <description>
  55. Register a new gutter to this [TextEdit]. Use [code]at[/code] to have a specific gutter order. A value of [code]-1[/code] appends the gutter to the right.
  56. </description>
  57. </method>
  58. <method name="adjust_viewport_to_caret">
  59. <return type="void" />
  60. <description>
  61. Adjust the viewport so the caret is visible.
  62. </description>
  63. </method>
  64. <method name="backspace">
  65. <return type="void" />
  66. <description>
  67. Called when the user presses the backspace key. Can be overridden with [method _backspace].
  68. </description>
  69. </method>
  70. <method name="begin_complex_operation">
  71. <return type="void" />
  72. <description>
  73. Starts a multipart edit. All edits will be treated as one action until [method end_complex_operation] is called.
  74. </description>
  75. </method>
  76. <method name="center_viewport_to_caret">
  77. <return type="void" />
  78. <description>
  79. Centers the viewport on the line the editing caret is at. This also resets the [member scroll_horizontal] value to [code]0[/code].
  80. </description>
  81. </method>
  82. <method name="clear">
  83. <return type="void" />
  84. <description>
  85. Performs a full reset of [TextEdit], including undo history.
  86. </description>
  87. </method>
  88. <method name="clear_opentype_features">
  89. <return type="void" />
  90. <description>
  91. Removes all OpenType features.
  92. </description>
  93. </method>
  94. <method name="clear_undo_history">
  95. <return type="void" />
  96. <description>
  97. Clears the undo history.
  98. </description>
  99. </method>
  100. <method name="copy">
  101. <return type="void" />
  102. <description>
  103. Copies the current text selection. Can be overridden with [method _copy].
  104. </description>
  105. </method>
  106. <method name="cut">
  107. <return type="void" />
  108. <description>
  109. Cut's the current selection. Can be overridden with [method _cut].
  110. </description>
  111. </method>
  112. <method name="delete_selection">
  113. <return type="void" />
  114. <description>
  115. Deletes the selected text.
  116. </description>
  117. </method>
  118. <method name="deselect">
  119. <return type="void" />
  120. <description>
  121. Deselects the current selection.
  122. </description>
  123. </method>
  124. <method name="end_complex_operation">
  125. <return type="void" />
  126. <description>
  127. Ends a multipart edit, started with [method begin_complex_operation]. If called outside a complex operation, the current operation is pushed onto the undo/redo stack.
  128. </description>
  129. </method>
  130. <method name="get_caret_column" qualifiers="const">
  131. <return type="int" />
  132. <description>
  133. Returns the column the editing caret is at.
  134. </description>
  135. </method>
  136. <method name="get_caret_draw_pos" qualifiers="const">
  137. <return type="Vector2" />
  138. <description>
  139. Returns the caret pixel draw position.
  140. </description>
  141. </method>
  142. <method name="get_caret_line" qualifiers="const">
  143. <return type="int" />
  144. <description>
  145. Returns the line the editing caret is on.
  146. </description>
  147. </method>
  148. <method name="get_caret_wrap_index" qualifiers="const">
  149. <return type="int" />
  150. <description>
  151. Returns the wrap index the editing caret is on.
  152. </description>
  153. </method>
  154. <method name="get_first_non_whitespace_column" qualifiers="const">
  155. <return type="int" />
  156. <argument index="0" name="line" type="int" />
  157. <description>
  158. Returns the first column containing a non-whitespace character.
  159. </description>
  160. </method>
  161. <method name="get_first_visible_line" qualifiers="const">
  162. <return type="int" />
  163. <description>
  164. Returns the first visible line.
  165. </description>
  166. </method>
  167. <method name="get_gutter_count" qualifiers="const">
  168. <return type="int" />
  169. <description>
  170. Returns the total amount of gutters registered.
  171. </description>
  172. </method>
  173. <method name="get_gutter_name" qualifiers="const">
  174. <return type="String" />
  175. <argument index="0" name="gutter" type="int" />
  176. <description>
  177. Returns the name of the gutter at the given index.
  178. </description>
  179. </method>
  180. <method name="get_gutter_type" qualifiers="const">
  181. <return type="int" enum="TextEdit.GutterType" />
  182. <argument index="0" name="gutter" type="int" />
  183. <description>
  184. Returns the type of the gutter at the given index.
  185. </description>
  186. </method>
  187. <method name="get_gutter_width" qualifiers="const">
  188. <return type="int" />
  189. <argument index="0" name="gutter" type="int" />
  190. <description>
  191. Returns the width of the gutter at the given index.
  192. </description>
  193. </method>
  194. <method name="get_indent_level" qualifiers="const">
  195. <return type="int" />
  196. <argument index="0" name="line" type="int" />
  197. <description>
  198. Returns the amount of spaces and [code]tab * tab_size[/code] before the first char.
  199. </description>
  200. </method>
  201. <method name="get_last_full_visible_line" qualifiers="const">
  202. <return type="int" />
  203. <description>
  204. Return the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index.
  205. </description>
  206. </method>
  207. <method name="get_last_full_visible_line_wrap_index" qualifiers="const">
  208. <return type="int" />
  209. <description>
  210. Returns the last visible wrap index of the last visible line.
  211. </description>
  212. </method>
  213. <method name="get_last_unhidden_line" qualifiers="const">
  214. <return type="int" />
  215. <description>
  216. Returns the last unhidden line in the entire [TextEdit].
  217. </description>
  218. </method>
  219. <method name="get_line" qualifiers="const">
  220. <return type="String" />
  221. <argument index="0" name="line" type="int" />
  222. <description>
  223. Returns the text of a specific line.
  224. </description>
  225. </method>
  226. <method name="get_line_background_color" qualifiers="const">
  227. <return type="Color" />
  228. <argument index="0" name="line" type="int" />
  229. <description>
  230. Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set.
  231. </description>
  232. </method>
  233. <method name="get_line_column_at_pos" qualifiers="const">
  234. <return type="Vector2i" />
  235. <argument index="0" name="position" type="Vector2i" />
  236. <description>
  237. 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.
  238. </description>
  239. </method>
  240. <method name="get_line_count" qualifiers="const">
  241. <return type="int" />
  242. <description>
  243. Returns the amount of total lines in the text.
  244. </description>
  245. </method>
  246. <method name="get_line_gutter_icon" qualifiers="const">
  247. <return type="Texture2D" />
  248. <argument index="0" name="line" type="int" />
  249. <argument index="1" name="gutter" type="int" />
  250. <description>
  251. Returns the icon currently in [code]gutter[/code] at [code]line[/code].
  252. </description>
  253. </method>
  254. <method name="get_line_gutter_item_color" qualifiers="const">
  255. <return type="Color" />
  256. <argument index="0" name="line" type="int" />
  257. <argument index="1" name="gutter" type="int" />
  258. <description>
  259. Returns the color currently in [code]gutter[/code] at [code]line[/code].
  260. </description>
  261. </method>
  262. <method name="get_line_gutter_metadata" qualifiers="const">
  263. <return type="Variant" />
  264. <argument index="0" name="line" type="int" />
  265. <argument index="1" name="gutter" type="int" />
  266. <description>
  267. Returns the metadata currently in [code]gutter[/code] at [code]line[/code].
  268. </description>
  269. </method>
  270. <method name="get_line_gutter_text" qualifiers="const">
  271. <return type="String" />
  272. <argument index="0" name="line" type="int" />
  273. <argument index="1" name="gutter" type="int" />
  274. <description>
  275. Returns the text currently in [code]gutter[/code] at [code]line[/code].
  276. </description>
  277. </method>
  278. <method name="get_line_height" qualifiers="const">
  279. <return type="int" />
  280. <description>
  281. Returns the height of a largest line.
  282. </description>
  283. </method>
  284. <method name="get_line_width" qualifiers="const">
  285. <return type="int" />
  286. <argument index="0" name="line" type="int" />
  287. <argument index="1" name="wrap_index" type="int" default="-1" />
  288. <description>
  289. Returns the width in pixels of the [code]wrap_index[/code] on [code]line[/code].
  290. </description>
  291. </method>
  292. <method name="get_line_wrap_count" qualifiers="const">
  293. <return type="int" />
  294. <argument index="0" name="line" type="int" />
  295. <description>
  296. Returns the number of times the given line is wrapped.
  297. </description>
  298. </method>
  299. <method name="get_line_wrap_index_at_column" qualifiers="const">
  300. <return type="int" />
  301. <argument index="0" name="line" type="int" />
  302. <argument index="1" name="column" type="int" />
  303. <description>
  304. Returns the wrap index of the given line column.
  305. </description>
  306. </method>
  307. <method name="get_line_wrapped_text" qualifiers="const">
  308. <return type="PackedStringArray" />
  309. <argument index="0" name="line" type="int" />
  310. <description>
  311. Returns an array of [String]s representing each wrapped index.
  312. </description>
  313. </method>
  314. <method name="get_local_mouse_pos" qualifiers="const">
  315. <return type="Vector2" />
  316. <description>
  317. Returns the local mouse position adjusted for the text direction.
  318. </description>
  319. </method>
  320. <method name="get_menu" qualifiers="const">
  321. <return type="PopupMenu" />
  322. <description>
  323. Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit].
  324. [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 Window.visible] property.
  325. </description>
  326. </method>
  327. <method name="get_minimap_line_at_pos" qualifiers="const">
  328. <return type="int" />
  329. <argument index="0" name="position" type="Vector2i" />
  330. <description>
  331. Returns the equivalent minimap line at [code]position[/code]
  332. </description>
  333. </method>
  334. <method name="get_minimap_visible_lines" qualifiers="const">
  335. <return type="int" />
  336. <description>
  337. Returns the total amount of lines that can be draw on the minimap.
  338. </description>
  339. </method>
  340. <method name="get_next_visible_line_index_offset_from" qualifiers="const">
  341. <return type="Vector2i" />
  342. <argument index="0" name="line" type="int" />
  343. <argument index="1" name="wrap_index" type="int" />
  344. <argument index="2" name="visible_amount" type="int" />
  345. <description>
  346. Similar to [method get_next_visible_line_offset_from], but takes into account the line wrap indexes. In the returned vector, [code]x[/code] is the line, [code]y[/code] is the wrap index.
  347. </description>
  348. </method>
  349. <method name="get_next_visible_line_offset_from" qualifiers="const">
  350. <return type="int" />
  351. <argument index="0" name="line" type="int" />
  352. <argument index="1" name="visible_amount" type="int" />
  353. <description>
  354. Returns the count to the next visible line from [code]line[/code] to [code]line + visible_amount[/code]. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with [code]line = 1, visible_amount = 1[/code] would return 3.
  355. </description>
  356. </method>
  357. <method name="get_opentype_feature" qualifiers="const">
  358. <return type="int" />
  359. <argument index="0" name="tag" type="String" />
  360. <description>
  361. Returns OpenType feature [code]tag[/code].
  362. </description>
  363. </method>
  364. <method name="get_saved_version" qualifiers="const">
  365. <return type="int" />
  366. <description>
  367. Returns the last tagged saved version from [method tag_saved_version]
  368. </description>
  369. </method>
  370. <method name="get_scroll_pos_for_line" qualifiers="const">
  371. <return type="float" />
  372. <argument index="0" name="line" type="int" />
  373. <argument index="1" name="wrap_index" type="int" default="0" />
  374. <description>
  375. Returns the scroll position for [code]wrap_index[/code] of [code]line[/code].
  376. </description>
  377. </method>
  378. <method name="get_selected_text" qualifiers="const">
  379. <return type="String" />
  380. <description>
  381. Returns the text inside the selection.
  382. </description>
  383. </method>
  384. <method name="get_selection_column" qualifiers="const">
  385. <return type="int" />
  386. <description>
  387. Returns the original start column of the selection.
  388. </description>
  389. </method>
  390. <method name="get_selection_from_column" qualifiers="const">
  391. <return type="int" />
  392. <description>
  393. Returns the selection begin column.
  394. </description>
  395. </method>
  396. <method name="get_selection_from_line" qualifiers="const">
  397. <return type="int" />
  398. <description>
  399. Returns the selection begin line.
  400. </description>
  401. </method>
  402. <method name="get_selection_line" qualifiers="const">
  403. <return type="int" />
  404. <description>
  405. Returns the original start line of the selection.
  406. </description>
  407. </method>
  408. <method name="get_selection_mode" qualifiers="const">
  409. <return type="int" enum="TextEdit.SelectionMode" />
  410. <description>
  411. Returns the current selection mode.
  412. </description>
  413. </method>
  414. <method name="get_selection_to_column" qualifiers="const">
  415. <return type="int" />
  416. <description>
  417. Returns the selection end column.
  418. </description>
  419. </method>
  420. <method name="get_selection_to_line" qualifiers="const">
  421. <return type="int" />
  422. <description>
  423. Returns the selection end line.
  424. </description>
  425. </method>
  426. <method name="get_tab_size" qualifiers="const">
  427. <return type="int" />
  428. <description>
  429. Returns the [TextEdit]'s' tab size.
  430. </description>
  431. </method>
  432. <method name="get_total_gutter_width" qualifiers="const">
  433. <return type="int" />
  434. <description>
  435. Returns the total width of all gutters and internal padding.
  436. </description>
  437. </method>
  438. <method name="get_total_visible_line_count" qualifiers="const">
  439. <return type="int" />
  440. <description>
  441. Returns the total amount of lines that could be draw.
  442. </description>
  443. </method>
  444. <method name="get_version" qualifiers="const">
  445. <return type="int" />
  446. <description>
  447. Returns the current version of the [TextEdit]. The version is a count of recorded operations by the undo/redo history.
  448. </description>
  449. </method>
  450. <method name="get_visible_line_count" qualifiers="const">
  451. <return type="int" />
  452. <description>
  453. Returns the number of visible lines, including wrapped text.
  454. </description>
  455. </method>
  456. <method name="get_word_at_pos" qualifiers="const">
  457. <return type="String" />
  458. <argument index="0" name="position" type="Vector2" />
  459. <description>
  460. Returns the word at [code]position[/code].
  461. </description>
  462. </method>
  463. <method name="get_word_under_caret" qualifiers="const">
  464. <return type="String" />
  465. <description>
  466. Returns a [String] text with the word under the caret's location.
  467. </description>
  468. </method>
  469. <method name="has_ime_text" qualifiers="const">
  470. <return type="bool" />
  471. <description>
  472. Returns if the user has IME text.
  473. </description>
  474. </method>
  475. <method name="has_redo" qualifiers="const">
  476. <return type="bool" />
  477. <description>
  478. Returns [code]true[/code] if a "redo" action is available.
  479. </description>
  480. </method>
  481. <method name="has_selection" qualifiers="const">
  482. <return type="bool" />
  483. <description>
  484. Returns [code]true[/code] if the user has selected text.
  485. </description>
  486. </method>
  487. <method name="has_undo" qualifiers="const">
  488. <return type="bool" />
  489. <description>
  490. Returns [code]true[/code] if an "undo" action is available.
  491. </description>
  492. </method>
  493. <method name="insert_line_at">
  494. <return type="void" />
  495. <argument index="0" name="line" type="int" />
  496. <argument index="1" name="text" type="String" />
  497. <description>
  498. Inserts a new line with [code]text[/code] at [code]line[/code].
  499. </description>
  500. </method>
  501. <method name="insert_text_at_caret">
  502. <return type="void" />
  503. <argument index="0" name="text" type="String" />
  504. <description>
  505. Insert the specified text at the caret position.
  506. </description>
  507. </method>
  508. <method name="is_caret_visible" qualifiers="const">
  509. <return type="bool" />
  510. <description>
  511. Returns [code]true[/code] if the caret is visible on the screen.
  512. </description>
  513. </method>
  514. <method name="is_dragging_cursor" qualifiers="const">
  515. <return type="bool" />
  516. <description>
  517. Returns [code]true[/code] if the user is dragging their mouse for scrolling or selecting.
  518. </description>
  519. </method>
  520. <method name="is_gutter_clickable" qualifiers="const">
  521. <return type="bool" />
  522. <argument index="0" name="gutter" type="int" />
  523. <description>
  524. Returns whether the gutter is clickable.
  525. </description>
  526. </method>
  527. <method name="is_gutter_drawn" qualifiers="const">
  528. <return type="bool" />
  529. <argument index="0" name="gutter" type="int" />
  530. <description>
  531. Returns whether the gutter is currently drawn.
  532. </description>
  533. </method>
  534. <method name="is_gutter_overwritable" qualifiers="const">
  535. <return type="bool" />
  536. <argument index="0" name="gutter" type="int" />
  537. <description>
  538. Returns whether the gutter is overwritable.
  539. </description>
  540. </method>
  541. <method name="is_line_gutter_clickable" qualifiers="const">
  542. <return type="bool" />
  543. <argument index="0" name="line" type="int" />
  544. <argument index="1" name="gutter" type="int" />
  545. <description>
  546. Returns whether the gutter on the given line is clickable.
  547. </description>
  548. </method>
  549. <method name="is_line_wrapped" qualifiers="const">
  550. <return type="bool" />
  551. <argument index="0" name="line" type="int" />
  552. <description>
  553. Returns if the given line is wrapped.
  554. </description>
  555. </method>
  556. <method name="is_menu_visible" qualifiers="const">
  557. <return type="bool" />
  558. <description>
  559. Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided).
  560. </description>
  561. </method>
  562. <method name="is_overtype_mode_enabled" qualifiers="const">
  563. <return type="bool" />
  564. <description>
  565. Returns whether the user is in overtype mode.
  566. </description>
  567. </method>
  568. <method name="menu_option">
  569. <return type="void" />
  570. <argument index="0" name="option" type="int" />
  571. <description>
  572. Triggers a right-click menu action by the specified index. See [enum MenuItems] for a list of available indexes.
  573. </description>
  574. </method>
  575. <method name="merge_gutters">
  576. <return type="void" />
  577. <argument index="0" name="from_line" type="int" />
  578. <argument index="1" name="to_line" type="int" />
  579. <description>
  580. Merge the gutters from [code]from_line[/code] into [code]to_line[/code]. Only overwritable gutters will be copied.
  581. </description>
  582. </method>
  583. <method name="paste">
  584. <return type="void" />
  585. <description>
  586. Paste at the current location. Can be overridden with [method _paste].
  587. </description>
  588. </method>
  589. <method name="redo">
  590. <return type="void" />
  591. <description>
  592. Perform redo operation.
  593. </description>
  594. </method>
  595. <method name="remove_gutter">
  596. <return type="void" />
  597. <argument index="0" name="gutter" type="int" />
  598. <description>
  599. Removes the gutter from this [TextEdit].
  600. </description>
  601. </method>
  602. <method name="remove_text">
  603. <return type="void" />
  604. <argument index="0" name="from_line" type="int" />
  605. <argument index="1" name="from_column" type="int" />
  606. <argument index="2" name="to_line" type="int" />
  607. <argument index="3" name="to_column" type="int" />
  608. <description>
  609. Removes text between the given positions.
  610. [b]Note:[/b] This does not adjust the caret or selection, which as a result it can end up in an invalid position.
  611. </description>
  612. </method>
  613. <method name="search" qualifiers="const">
  614. <return type="Vector2i" />
  615. <argument index="0" name="text" type="String" />
  616. <argument index="1" name="flags" type="int" />
  617. <argument index="2" name="from_line" type="int" />
  618. <argument index="3" name="from_colum" type="int" />
  619. <description>
  620. Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
  621. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If no results are found, both are equal to [code]-1[/code].
  622. [codeblocks]
  623. [gdscript]
  624. var result = search("print", SEARCH_WHOLE_WORDS, 0, 0)
  625. if result.x != -1:
  626. # Result found.
  627. var line_number = result.y
  628. var column_number = result.x
  629. [/gdscript]
  630. [csharp]
  631. Vector2i result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0);
  632. if (result.Length &gt; 0)
  633. {
  634. // Result found.
  635. int lineNumber = result.y;
  636. int columnNumber = result.x;
  637. }
  638. [/csharp]
  639. [/codeblocks]
  640. </description>
  641. </method>
  642. <method name="select">
  643. <return type="void" />
  644. <argument index="0" name="from_line" type="int" />
  645. <argument index="1" name="from_column" type="int" />
  646. <argument index="2" name="to_line" type="int" />
  647. <argument index="3" name="to_column" type="int" />
  648. <description>
  649. Perform selection, from line/column to line/column.
  650. If [member selecting_enabled] is [code]false[/code], no selection will occur.
  651. </description>
  652. </method>
  653. <method name="select_all">
  654. <return type="void" />
  655. <description>
  656. Select all the text.
  657. If [member selecting_enabled] is [code]false[/code], no selection will occur.
  658. </description>
  659. </method>
  660. <method name="select_word_under_caret">
  661. <return type="void" />
  662. <description>
  663. Selects the word under the caret.
  664. </description>
  665. </method>
  666. <method name="set_caret_column">
  667. <return type="void" />
  668. <argument index="0" name="column" type="int" />
  669. <argument index="1" name="adjust_viewport" type="bool" default="true" />
  670. <description>
  671. Moves the caret to the specified [code]column[/code] index.
  672. If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs.
  673. </description>
  674. </method>
  675. <method name="set_caret_line">
  676. <return type="void" />
  677. <argument index="0" name="line" type="int" />
  678. <argument index="1" name="adjust_viewport" type="bool" default="true" />
  679. <argument index="2" name="can_be_hidden" type="bool" default="true" />
  680. <argument index="3" name="wrap_index" type="int" default="0" />
  681. <description>
  682. Moves the caret to the specified [code]line[/code] index.
  683. If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs.
  684. If [code]can_be_hidden[/code] is [code]true[/code], the specified [code]line[/code] can be hidden.
  685. </description>
  686. </method>
  687. <method name="set_gutter_clickable">
  688. <return type="void" />
  689. <argument index="0" name="gutter" type="int" />
  690. <argument index="1" name="clickable" type="bool" />
  691. <description>
  692. Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter.
  693. </description>
  694. </method>
  695. <method name="set_gutter_custom_draw">
  696. <return type="void" />
  697. <argument index="0" name="column" type="int" />
  698. <argument index="1" name="object" type="Object" />
  699. <argument index="2" name="callback" type="StringName" />
  700. <description>
  701. Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code].
  702. </description>
  703. </method>
  704. <method name="set_gutter_draw">
  705. <return type="void" />
  706. <argument index="0" name="gutter" type="int" />
  707. <argument index="1" name="draw" type="bool" />
  708. <description>
  709. Sets whether the gutter should be drawn.
  710. </description>
  711. </method>
  712. <method name="set_gutter_name">
  713. <return type="void" />
  714. <argument index="0" name="gutter" type="int" />
  715. <argument index="1" name="name" type="String" />
  716. <description>
  717. Sets the name of the gutter.
  718. </description>
  719. </method>
  720. <method name="set_gutter_overwritable">
  721. <return type="void" />
  722. <argument index="0" name="gutter" type="int" />
  723. <argument index="1" name="overwritable" type="bool" />
  724. <description>
  725. Sets the gutter to overwritable. See [method merge_gutters].
  726. </description>
  727. </method>
  728. <method name="set_gutter_type">
  729. <return type="void" />
  730. <argument index="0" name="gutter" type="int" />
  731. <argument index="1" name="type" type="int" enum="TextEdit.GutterType" />
  732. <description>
  733. Sets the type of gutter.
  734. </description>
  735. </method>
  736. <method name="set_gutter_width">
  737. <return type="void" />
  738. <argument index="0" name="gutter" type="int" />
  739. <argument index="1" name="width" type="int" />
  740. <description>
  741. Set the width of the gutter.
  742. </description>
  743. </method>
  744. <method name="set_line">
  745. <return type="void" />
  746. <argument index="0" name="line" type="int" />
  747. <argument index="1" name="new_text" type="String" />
  748. <description>
  749. Sets the text for a specific line.
  750. </description>
  751. </method>
  752. <method name="set_line_as_center_visible">
  753. <return type="void" />
  754. <argument index="0" name="line" type="int" />
  755. <argument index="1" name="wrap_index" type="int" default="0" />
  756. <description>
  757. Positions the [code]wrap_index[/code] of [code]line[/code] at the center of the viewport.
  758. </description>
  759. </method>
  760. <method name="set_line_as_first_visible">
  761. <return type="void" />
  762. <argument index="0" name="line" type="int" />
  763. <argument index="1" name="wrap_index" type="int" default="0" />
  764. <description>
  765. Positions the [code]wrap_index[/code] of [code]line[/code] at the top of the viewport.
  766. </description>
  767. </method>
  768. <method name="set_line_as_last_visible">
  769. <return type="void" />
  770. <argument index="0" name="line" type="int" />
  771. <argument index="1" name="wrap_index" type="int" default="0" />
  772. <description>
  773. Positions the [code]wrap_index[/code] of [code]line[/code] at the bottom of the viewport.
  774. </description>
  775. </method>
  776. <method name="set_line_background_color">
  777. <return type="void" />
  778. <argument index="0" name="line" type="int" />
  779. <argument index="1" name="color" type="Color" />
  780. <description>
  781. Sets the current background color of the line. Set to [code]Color(0, 0, 0, 0)[/code] for no color.
  782. </description>
  783. </method>
  784. <method name="set_line_gutter_clickable">
  785. <return type="void" />
  786. <argument index="0" name="line" type="int" />
  787. <argument index="1" name="gutter" type="int" />
  788. <argument index="2" name="clickable" type="bool" />
  789. <description>
  790. Sets the [code]gutter[/code] on [code]line[/code] as clickable.
  791. </description>
  792. </method>
  793. <method name="set_line_gutter_icon">
  794. <return type="void" />
  795. <argument index="0" name="line" type="int" />
  796. <argument index="1" name="gutter" type="int" />
  797. <argument index="2" name="icon" type="Texture2D" />
  798. <description>
  799. Sets the icon for [code]gutter[/code] on [code]line[/code].
  800. </description>
  801. </method>
  802. <method name="set_line_gutter_item_color">
  803. <return type="void" />
  804. <argument index="0" name="line" type="int" />
  805. <argument index="1" name="gutter" type="int" />
  806. <argument index="2" name="color" type="Color" />
  807. <description>
  808. Sets the color for [code]gutter[/code] on [code]line[/code].
  809. </description>
  810. </method>
  811. <method name="set_line_gutter_metadata">
  812. <return type="void" />
  813. <argument index="0" name="line" type="int" />
  814. <argument index="1" name="gutter" type="int" />
  815. <argument index="2" name="metadata" type="Variant" />
  816. <description>
  817. Sets the metadata for [code]gutter[/code] on [code]line[/code].
  818. </description>
  819. </method>
  820. <method name="set_line_gutter_text">
  821. <return type="void" />
  822. <argument index="0" name="line" type="int" />
  823. <argument index="1" name="gutter" type="int" />
  824. <argument index="2" name="text" type="String" />
  825. <description>
  826. Sets the text for [code]gutter[/code] on [code]line[/code].
  827. </description>
  828. </method>
  829. <method name="set_opentype_feature">
  830. <return type="void" />
  831. <argument index="0" name="tag" type="String" />
  832. <argument index="1" name="value" type="int" />
  833. <description>
  834. Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
  835. </description>
  836. </method>
  837. <method name="set_overtype_mode_enabled">
  838. <return type="void" />
  839. <argument index="0" name="enabled" type="bool" />
  840. <description>
  841. If [code]true[/code], sets the user into overtype mode. When the user types in this mode, it will override existing text.
  842. </description>
  843. </method>
  844. <method name="set_search_flags">
  845. <return type="void" />
  846. <argument index="0" name="flags" type="int" />
  847. <description>
  848. Sets the search flags. This is used with [method set_search_text] to highlight occurrences of the searched text. Search flags can be specified from the [enum SearchFlags] enum.
  849. </description>
  850. </method>
  851. <method name="set_search_text">
  852. <return type="void" />
  853. <argument index="0" name="search_text" type="String" />
  854. <description>
  855. Sets the search text. See [method set_search_flags].
  856. </description>
  857. </method>
  858. <method name="set_selection_mode">
  859. <return type="void" />
  860. <argument index="0" name="mode" type="int" enum="TextEdit.SelectionMode" />
  861. <argument index="1" name="line" type="int" default="-1" />
  862. <argument index="2" name="column" type="int" default="-1" />
  863. <description>
  864. Sets the current selection mode.
  865. </description>
  866. </method>
  867. <method name="set_tab_size">
  868. <return type="void" />
  869. <argument index="0" name="size" type="int" />
  870. <description>
  871. Sets the tab size for the [TextEdit] to use.
  872. </description>
  873. </method>
  874. <method name="set_tooltip_request_func">
  875. <return type="void" />
  876. <argument index="0" name="object" type="Object" />
  877. <argument index="1" name="callback" type="StringName" />
  878. <argument index="2" name="data" type="Variant" />
  879. <description>
  880. Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String, data: Variant[/code]
  881. </description>
  882. </method>
  883. <method name="swap_lines">
  884. <return type="void" />
  885. <argument index="0" name="from_line" type="int" />
  886. <argument index="1" name="to_line" type="int" />
  887. <description>
  888. Swaps the two lines.
  889. </description>
  890. </method>
  891. <method name="tag_saved_version">
  892. <return type="void" />
  893. <description>
  894. Tag the current version as saved.
  895. </description>
  896. </method>
  897. <method name="undo">
  898. <return type="void" />
  899. <description>
  900. Perform undo operation.
  901. </description>
  902. </method>
  903. </methods>
  904. <members>
  905. <member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false">
  906. Sets if the caret should blink.
  907. </member>
  908. <member name="caret_blink_speed" type="float" setter="set_caret_blink_speed" getter="get_caret_blink_speed" default="0.65">
  909. Duration (in seconds) of a caret's blinking cycle.
  910. </member>
  911. <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false">
  912. Allow moving caret, selecting and removing the individual composite character components.
  913. [b]Note:[/b] [kbd]Backspace[/kbd] is always removing individual composite character components.
  914. </member>
  915. <member name="caret_move_on_right_click" type="bool" setter="set_move_caret_on_right_click_enabled" getter="is_move_caret_on_right_click_enabled" default="true">
  916. If [code]true[/code], a right-click moves the caret at the mouse position before displaying the context menu.
  917. If [code]false[/code], the context menu disregards mouse location.
  918. </member>
  919. <member name="caret_type" type="int" setter="set_caret_type" getter="get_caret_type" enum="TextEdit.CaretType" default="0">
  920. Set the type of caret to draw.
  921. </member>
  922. <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true">
  923. If [code]true[/code], a right-click displays the context menu.
  924. </member>
  925. <member name="deselect_on_focus_loss_enabled" type="bool" setter="set_deselect_on_focus_loss_enabled" getter="is_deselect_on_focus_loss_enabled" default="true">
  926. If [code]true[/code], the selected text will be deselected when focus is lost.
  927. </member>
  928. <member name="draw_control_chars" type="bool" setter="set_draw_control_chars" getter="get_draw_control_chars" default="false">
  929. If [code]true[/code], control characters are displayed.
  930. </member>
  931. <member name="draw_spaces" type="bool" setter="set_draw_spaces" getter="is_drawing_spaces" default="false">
  932. If [code]true[/code], the "space" character will have a visible representation.
  933. </member>
  934. <member name="draw_tabs" type="bool" setter="set_draw_tabs" getter="is_drawing_tabs" default="false">
  935. If [code]true[/code], the "tab" character will have a visible representation.
  936. </member>
  937. <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
  938. If [code]false[/code], existing text cannot be modified and new text cannot be added.
  939. </member>
  940. <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
  941. <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false">
  942. If [code]true[/code], all occurrences of the selected text will be highlighted.
  943. </member>
  944. <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled" default="false">
  945. If [code]true[/code], the line containing the cursor is highlighted.
  946. </member>
  947. <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
  948. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  949. </member>
  950. <member name="middle_mouse_paste_enabled" type="bool" setter="set_middle_mouse_paste_enabled" getter="is_middle_mouse_paste_enabled" default="true">
  951. If [code]false[/code], using middle mouse button to paste clipboard will be disabled.
  952. [b]Note:[/b] This method is only implemented on Linux.
  953. </member>
  954. <member name="minimap_draw" type="bool" setter="set_draw_minimap" getter="is_drawing_minimap" default="false">
  955. If [code]true[/code], a minimap is shown, providing an outline of your source code.
  956. </member>
  957. <member name="minimap_width" type="int" setter="set_minimap_width" getter="get_minimap_width" default="80">
  958. The width, in pixels, of the minimap.
  959. </member>
  960. <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" />
  961. <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
  962. If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text.
  963. </member>
  964. <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
  965. If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
  966. </member>
  967. <member name="scroll_past_end_of_file" type="bool" setter="set_scroll_past_end_of_file_enabled" getter="is_scroll_past_end_of_file_enabled" default="false">
  968. Allow scrolling past the last line into "virtual" space.
  969. </member>
  970. <member name="scroll_smooth" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false">
  971. Scroll smoothly over the text rather then jumping to the next location.
  972. </member>
  973. <member name="scroll_v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0">
  974. Sets the scroll speed with the minimap or when [member scroll_smooth] is enabled.
  975. </member>
  976. <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0">
  977. If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line.
  978. </member>
  979. <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true">
  980. If [code]true[/code], text can be selected.
  981. If [code]false[/code], text can not be selected by the user or by the [method select] or [method select_all] methods.
  982. </member>
  983. <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
  984. If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled.
  985. </member>
  986. <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
  987. Set BiDi algorithm override for the structured text.
  988. </member>
  989. <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
  990. Set additional options for BiDi override.
  991. </member>
  992. <member name="syntax_highlighter" type="SyntaxHighlighter" setter="set_syntax_highlighter" getter="get_syntax_highlighter">
  993. Sets the [SyntaxHighlighter] to use.
  994. </member>
  995. <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
  996. String value of the [TextEdit].
  997. </member>
  998. <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
  999. Base text writing direction.
  1000. </member>
  1001. <member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true">
  1002. If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it.
  1003. </member>
  1004. <member name="wrap_mode" type="int" setter="set_line_wrapping_mode" getter="get_line_wrapping_mode" enum="TextEdit.LineWrappingMode" default="0">
  1005. Sets the line wrapping mode to use.
  1006. </member>
  1007. </members>
  1008. <signals>
  1009. <signal name="caret_changed">
  1010. <description>
  1011. Emitted when the caret changes position.
  1012. </description>
  1013. </signal>
  1014. <signal name="gutter_added">
  1015. <description>
  1016. Emitted when a gutter is added.
  1017. </description>
  1018. </signal>
  1019. <signal name="gutter_clicked">
  1020. <argument index="0" name="line" type="int" />
  1021. <argument index="1" name="gutter" type="int" />
  1022. <description>
  1023. Emitted when a gutter is clicked.
  1024. </description>
  1025. </signal>
  1026. <signal name="gutter_removed">
  1027. <description>
  1028. Emitted when a gutter is removed.
  1029. </description>
  1030. </signal>
  1031. <signal name="lines_edited_from">
  1032. <argument index="0" name="from_line" type="int" />
  1033. <argument index="1" name="to_line" type="int" />
  1034. <description>
  1035. Emitted immediately when the text changes.
  1036. When text is added [code]from_line[/code] will be less then [code]to_line[/code]. On a remove [code]to_line[/code] will be less then [code]from_line[/code].
  1037. </description>
  1038. </signal>
  1039. <signal name="text_changed">
  1040. <description>
  1041. Emitted when the text changes.
  1042. </description>
  1043. </signal>
  1044. <signal name="text_set">
  1045. <description>
  1046. Emitted when [method clear] is called or [member text] is set.
  1047. </description>
  1048. </signal>
  1049. </signals>
  1050. <constants>
  1051. <constant name="MENU_CUT" value="0" enum="MenuItems">
  1052. Cuts (copies and clears) the selected text.
  1053. </constant>
  1054. <constant name="MENU_COPY" value="1" enum="MenuItems">
  1055. Copies the selected text.
  1056. </constant>
  1057. <constant name="MENU_PASTE" value="2" enum="MenuItems">
  1058. Pastes the clipboard text over the selected text (or at the cursor's position).
  1059. </constant>
  1060. <constant name="MENU_CLEAR" value="3" enum="MenuItems">
  1061. Erases the whole [TextEdit] text.
  1062. </constant>
  1063. <constant name="MENU_SELECT_ALL" value="4" enum="MenuItems">
  1064. Selects the whole [TextEdit] text.
  1065. </constant>
  1066. <constant name="MENU_UNDO" value="5" enum="MenuItems">
  1067. Undoes the previous action.
  1068. </constant>
  1069. <constant name="MENU_REDO" value="6" enum="MenuItems">
  1070. Redoes the previous action.
  1071. </constant>
  1072. <constant name="MENU_DIR_INHERITED" value="7" enum="MenuItems">
  1073. Sets text direction to inherited.
  1074. </constant>
  1075. <constant name="MENU_DIR_AUTO" value="8" enum="MenuItems">
  1076. Sets text direction to automatic.
  1077. </constant>
  1078. <constant name="MENU_DIR_LTR" value="9" enum="MenuItems">
  1079. Sets text direction to left-to-right.
  1080. </constant>
  1081. <constant name="MENU_DIR_RTL" value="10" enum="MenuItems">
  1082. Sets text direction to right-to-left.
  1083. </constant>
  1084. <constant name="MENU_DISPLAY_UCC" value="11" enum="MenuItems">
  1085. Toggles control character display.
  1086. </constant>
  1087. <constant name="MENU_INSERT_LRM" value="12" enum="MenuItems">
  1088. Inserts left-to-right mark (LRM) character.
  1089. </constant>
  1090. <constant name="MENU_INSERT_RLM" value="13" enum="MenuItems">
  1091. Inserts right-to-left mark (RLM) character.
  1092. </constant>
  1093. <constant name="MENU_INSERT_LRE" value="14" enum="MenuItems">
  1094. Inserts start of left-to-right embedding (LRE) character.
  1095. </constant>
  1096. <constant name="MENU_INSERT_RLE" value="15" enum="MenuItems">
  1097. Inserts start of right-to-left embedding (RLE) character.
  1098. </constant>
  1099. <constant name="MENU_INSERT_LRO" value="16" enum="MenuItems">
  1100. Inserts start of left-to-right override (LRO) character.
  1101. </constant>
  1102. <constant name="MENU_INSERT_RLO" value="17" enum="MenuItems">
  1103. Inserts start of right-to-left override (RLO) character.
  1104. </constant>
  1105. <constant name="MENU_INSERT_PDF" value="18" enum="MenuItems">
  1106. Inserts pop direction formatting (PDF) character.
  1107. </constant>
  1108. <constant name="MENU_INSERT_ALM" value="19" enum="MenuItems">
  1109. Inserts Arabic letter mark (ALM) character.
  1110. </constant>
  1111. <constant name="MENU_INSERT_LRI" value="20" enum="MenuItems">
  1112. Inserts left-to-right isolate (LRI) character.
  1113. </constant>
  1114. <constant name="MENU_INSERT_RLI" value="21" enum="MenuItems">
  1115. Inserts right-to-left isolate (RLI) character.
  1116. </constant>
  1117. <constant name="MENU_INSERT_FSI" value="22" enum="MenuItems">
  1118. Inserts first strong isolate (FSI) character.
  1119. </constant>
  1120. <constant name="MENU_INSERT_PDI" value="23" enum="MenuItems">
  1121. Inserts pop direction isolate (PDI) character.
  1122. </constant>
  1123. <constant name="MENU_INSERT_ZWJ" value="24" enum="MenuItems">
  1124. Inserts zero width joiner (ZWJ) character.
  1125. </constant>
  1126. <constant name="MENU_INSERT_ZWNJ" value="25" enum="MenuItems">
  1127. Inserts zero width non-joiner (ZWNJ) character.
  1128. </constant>
  1129. <constant name="MENU_INSERT_WJ" value="26" enum="MenuItems">
  1130. Inserts word joiner (WJ) character.
  1131. </constant>
  1132. <constant name="MENU_INSERT_SHY" value="27" enum="MenuItems">
  1133. Inserts soft hyphen (SHY) character.
  1134. </constant>
  1135. <constant name="MENU_MAX" value="28" enum="MenuItems">
  1136. Represents the size of the [enum MenuItems] enum.
  1137. </constant>
  1138. <constant name="SEARCH_MATCH_CASE" value="1" enum="SearchFlags">
  1139. Match case when searching.
  1140. </constant>
  1141. <constant name="SEARCH_WHOLE_WORDS" value="2" enum="SearchFlags">
  1142. Match whole words when searching.
  1143. </constant>
  1144. <constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags">
  1145. Search from end to beginning.
  1146. </constant>
  1147. <constant name="CARET_TYPE_LINE" value="0" enum="CaretType">
  1148. Vertical line caret.
  1149. </constant>
  1150. <constant name="CARET_TYPE_BLOCK" value="1" enum="CaretType">
  1151. Block caret.
  1152. </constant>
  1153. <constant name="SELECTION_MODE_NONE" value="0" enum="SelectionMode">
  1154. Not selecting.
  1155. </constant>
  1156. <constant name="SELECTION_MODE_SHIFT" value="1" enum="SelectionMode">
  1157. Select as if [code]shift[/code] is pressed.
  1158. </constant>
  1159. <constant name="SELECTION_MODE_POINTER" value="2" enum="SelectionMode">
  1160. Select single characters as if the user single clicked.
  1161. </constant>
  1162. <constant name="SELECTION_MODE_WORD" value="3" enum="SelectionMode">
  1163. Select whole words as if the user double clicked.
  1164. </constant>
  1165. <constant name="SELECTION_MODE_LINE" value="4" enum="SelectionMode">
  1166. Select whole lines as if the user tripped clicked.
  1167. </constant>
  1168. <constant name="LINE_WRAPPING_NONE" value="0" enum="LineWrappingMode">
  1169. Line wrapping is disabled.
  1170. </constant>
  1171. <constant name="LINE_WRAPPING_BOUNDARY" value="1" enum="LineWrappingMode">
  1172. Line wrapping occurs at the control boundary, beyond what would normally be visible.
  1173. </constant>
  1174. <constant name="GUTTER_TYPE_STRING" value="0" enum="GutterType">
  1175. Draw a string.
  1176. </constant>
  1177. <constant name="GUTTER_TYPE_ICON" value="1" enum="GutterType">
  1178. Draw an icon.
  1179. </constant>
  1180. <constant name="GUTTER_TYPE_CUSTOM" value="2" enum="GutterType">
  1181. Custom draw.
  1182. </constant>
  1183. </constants>
  1184. <theme_items>
  1185. <theme_item name="background_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
  1186. Sets the background [Color] of this [TextEdit].
  1187. </theme_item>
  1188. <theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
  1189. [Color] of the text behind the caret when using a block caret.
  1190. </theme_item>
  1191. <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
  1192. [Color] of the caret.
  1193. </theme_item>
  1194. <theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
  1195. Background [Color] of the line containing the caret.
  1196. </theme_item>
  1197. <theme_item name="focus" data_type="style" type="StyleBox">
  1198. Sets the [StyleBox] when in focus.
  1199. </theme_item>
  1200. <theme_item name="font" data_type="font" type="Font">
  1201. Sets the default [Font].
  1202. </theme_item>
  1203. <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
  1204. Sets the font [Color].
  1205. </theme_item>
  1206. <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
  1207. The tint of text outline of the [TextEdit].
  1208. </theme_item>
  1209. <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
  1210. Sets the font [Color] when [member editable] is disabled.
  1211. </theme_item>
  1212. <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
  1213. Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
  1214. </theme_item>
  1215. <theme_item name="font_size" data_type="font_size" type="int">
  1216. Sets default font size.
  1217. </theme_item>
  1218. <theme_item name="line_spacing" data_type="constant" type="int" default="4">
  1219. Sets the spacing between the lines.
  1220. </theme_item>
  1221. <theme_item name="normal" data_type="style" type="StyleBox">
  1222. Sets the [StyleBox] of this [TextEdit].
  1223. </theme_item>
  1224. <theme_item name="outline_size" data_type="constant" type="int" default="0">
  1225. The size of the text outline.
  1226. </theme_item>
  1227. <theme_item name="read_only" data_type="style" type="StyleBox">
  1228. Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled.
  1229. </theme_item>
  1230. <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
  1231. [Color] of the border around text that matches the search query.
  1232. </theme_item>
  1233. <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
  1234. [Color] behind the text that matches the search query.
  1235. </theme_item>
  1236. <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
  1237. Sets the highlight [Color] of text selections.
  1238. </theme_item>
  1239. <theme_item name="space" data_type="icon" type="Texture2D">
  1240. Sets a custom [Texture2D] for space text characters.
  1241. </theme_item>
  1242. <theme_item name="tab" data_type="icon" type="Texture2D">
  1243. Sets a custom [Texture2D] for tab text characters.
  1244. </theme_item>
  1245. <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
  1246. Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
  1247. </theme_item>
  1248. </theme_items>
  1249. </class>