TextEdit.xml 47 KB

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