TextEdit.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="TextEdit" inherits="Control" category="Core" version="3.0.alpha.custom_build">
  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. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="add_color_region">
  15. <return type="void">
  16. </return>
  17. <argument index="0" name="begin_key" type="String">
  18. </argument>
  19. <argument index="1" name="end_key" type="String">
  20. </argument>
  21. <argument index="2" name="color" type="Color">
  22. </argument>
  23. <argument index="3" name="line_only" type="bool" default="false">
  24. </argument>
  25. <description>
  26. Add color region (given the delimiters) and its colors.
  27. </description>
  28. </method>
  29. <method name="add_keyword_color">
  30. <return type="void">
  31. </return>
  32. <argument index="0" name="keyword" type="String">
  33. </argument>
  34. <argument index="1" name="color" type="Color">
  35. </argument>
  36. <description>
  37. Add a keyword and its color.
  38. </description>
  39. </method>
  40. <method name="clear_colors">
  41. <return type="void">
  42. </return>
  43. <description>
  44. Clear all the syntax coloring information.
  45. </description>
  46. </method>
  47. <method name="clear_undo_history">
  48. <return type="void">
  49. </return>
  50. <description>
  51. Clear the undo history.
  52. </description>
  53. </method>
  54. <method name="copy">
  55. <return type="void">
  56. </return>
  57. <description>
  58. Copy the current selection.
  59. </description>
  60. </method>
  61. <method name="cursor_get_blink_enabled" qualifiers="const">
  62. <return type="bool">
  63. </return>
  64. <description>
  65. Gets whether the text editor caret is blinking.
  66. </description>
  67. </method>
  68. <method name="cursor_get_blink_speed" qualifiers="const">
  69. <return type="float">
  70. </return>
  71. <description>
  72. Gets the text editor caret blink speed.
  73. </description>
  74. </method>
  75. <method name="cursor_get_column" qualifiers="const">
  76. <return type="int">
  77. </return>
  78. <description>
  79. Return the column the editing cursor is at.
  80. </description>
  81. </method>
  82. <method name="cursor_get_line" qualifiers="const">
  83. <return type="int">
  84. </return>
  85. <description>
  86. Return the line the editing cursor is at.
  87. </description>
  88. </method>
  89. <method name="cursor_is_block_mode" qualifiers="const">
  90. <return type="bool">
  91. </return>
  92. <description>
  93. Gets whether the text editor caret is in block mode.
  94. </description>
  95. </method>
  96. <method name="cursor_set_blink_enabled">
  97. <return type="void">
  98. </return>
  99. <argument index="0" name="enable" type="bool">
  100. </argument>
  101. <description>
  102. Set the text editor caret to blink.
  103. </description>
  104. </method>
  105. <method name="cursor_set_blink_speed">
  106. <return type="void">
  107. </return>
  108. <argument index="0" name="blink_speed" type="float">
  109. </argument>
  110. <description>
  111. Set the text editor caret blink speed. Cannot be less then or equal to 0.
  112. </description>
  113. </method>
  114. <method name="cursor_set_block_mode">
  115. <return type="void">
  116. </return>
  117. <argument index="0" name="enable" type="bool">
  118. </argument>
  119. <description>
  120. Set the text editor caret to block mode.
  121. </description>
  122. </method>
  123. <method name="cursor_set_column">
  124. <return type="void">
  125. </return>
  126. <argument index="0" name="column" type="int">
  127. </argument>
  128. <argument index="1" name="adjust_viewport" type="bool" default="true">
  129. </argument>
  130. <description>
  131. </description>
  132. </method>
  133. <method name="cursor_set_line">
  134. <return type="void">
  135. </return>
  136. <argument index="0" name="line" type="int">
  137. </argument>
  138. <argument index="1" name="adjust_viewport" type="bool" default="true">
  139. </argument>
  140. <description>
  141. </description>
  142. </method>
  143. <method name="cut">
  144. <return type="void">
  145. </return>
  146. <description>
  147. Cut the current selection.
  148. </description>
  149. </method>
  150. <method name="get_line" qualifiers="const">
  151. <return type="String">
  152. </return>
  153. <argument index="0" name="line" type="int">
  154. </argument>
  155. <description>
  156. Return the text of a specific line.
  157. </description>
  158. </method>
  159. <method name="get_line_count" qualifiers="const">
  160. <return type="int">
  161. </return>
  162. <description>
  163. Return the amount of total lines in the text.
  164. </description>
  165. </method>
  166. <method name="get_menu" qualifiers="const">
  167. <return type="PopupMenu">
  168. </return>
  169. <description>
  170. </description>
  171. </method>
  172. <method name="get_selection_from_column" qualifiers="const">
  173. <return type="int">
  174. </return>
  175. <description>
  176. Return the selection begin column.
  177. </description>
  178. </method>
  179. <method name="get_selection_from_line" qualifiers="const">
  180. <return type="int">
  181. </return>
  182. <description>
  183. Return the selection begin line.
  184. </description>
  185. </method>
  186. <method name="get_selection_text" qualifiers="const">
  187. <return type="String">
  188. </return>
  189. <description>
  190. Return the text inside the selection.
  191. </description>
  192. </method>
  193. <method name="get_selection_to_column" qualifiers="const">
  194. <return type="int">
  195. </return>
  196. <description>
  197. Return the selection end column.
  198. </description>
  199. </method>
  200. <method name="get_selection_to_line" qualifiers="const">
  201. <return type="int">
  202. </return>
  203. <description>
  204. Return the selection end line.
  205. </description>
  206. </method>
  207. <method name="get_text">
  208. <return type="String">
  209. </return>
  210. <description>
  211. Return the whole text.
  212. </description>
  213. </method>
  214. <method name="get_v_scroll_speed" qualifiers="const">
  215. <return type="float">
  216. </return>
  217. <description>
  218. </description>
  219. </method>
  220. <method name="get_word_under_cursor" qualifiers="const">
  221. <return type="String">
  222. </return>
  223. <description>
  224. </description>
  225. </method>
  226. <method name="insert_text_at_cursor">
  227. <return type="void">
  228. </return>
  229. <argument index="0" name="text" type="String">
  230. </argument>
  231. <description>
  232. Insert a given text at the cursor position.
  233. </description>
  234. </method>
  235. <method name="is_highlight_all_occurrences_enabled" qualifiers="const">
  236. <return type="bool">
  237. </return>
  238. <description>
  239. Returns true if highlight all occurrences is enabled.
  240. </description>
  241. </method>
  242. <method name="is_highlight_current_line_enabled" qualifiers="const">
  243. <return type="bool">
  244. </return>
  245. <description>
  246. </description>
  247. </method>
  248. <method name="is_overriding_selected_font_color" qualifiers="const">
  249. <return type="bool">
  250. </return>
  251. <description>
  252. </description>
  253. </method>
  254. <method name="is_selection_active" qualifiers="const">
  255. <return type="bool">
  256. </return>
  257. <description>
  258. Return true if the selection is active.
  259. </description>
  260. </method>
  261. <method name="is_show_line_numbers_enabled" qualifiers="const">
  262. <return type="bool">
  263. </return>
  264. <description>
  265. Returns true if line numbers are enabled.
  266. </description>
  267. </method>
  268. <method name="is_smooth_scroll_enabled" qualifiers="const">
  269. <return type="bool">
  270. </return>
  271. <description>
  272. </description>
  273. </method>
  274. <method name="is_syntax_coloring_enabled" qualifiers="const">
  275. <return type="bool">
  276. </return>
  277. <description>
  278. Return true if the syntax coloring is enabled.
  279. </description>
  280. </method>
  281. <method name="menu_option">
  282. <return type="void">
  283. </return>
  284. <argument index="0" name="option" type="int">
  285. </argument>
  286. <description>
  287. </description>
  288. </method>
  289. <method name="paste">
  290. <return type="void">
  291. </return>
  292. <description>
  293. Paste the current selection.
  294. </description>
  295. </method>
  296. <method name="redo">
  297. <return type="void">
  298. </return>
  299. <description>
  300. Perform redo operation.
  301. </description>
  302. </method>
  303. <method name="search" qualifiers="const">
  304. <return type="PoolIntArray">
  305. </return>
  306. <argument index="0" name="key" type="String">
  307. </argument>
  308. <argument index="1" name="flags" type="int">
  309. </argument>
  310. <argument index="2" name="from_line" type="int">
  311. </argument>
  312. <argument index="3" name="from_column" type="int">
  313. </argument>
  314. <description>
  315. Perform a search inside the text. Search flags can be specified in the SEARCH_* enum.
  316. </description>
  317. </method>
  318. <method name="select">
  319. <return type="void">
  320. </return>
  321. <argument index="0" name="from_line" type="int">
  322. </argument>
  323. <argument index="1" name="from_column" type="int">
  324. </argument>
  325. <argument index="2" name="to_line" type="int">
  326. </argument>
  327. <argument index="3" name="to_column" type="int">
  328. </argument>
  329. <description>
  330. Perform selection, from line/column to line/column.
  331. </description>
  332. </method>
  333. <method name="select_all">
  334. <return type="void">
  335. </return>
  336. <description>
  337. Select all the text.
  338. </description>
  339. </method>
  340. <method name="set_highlight_all_occurrences">
  341. <return type="void">
  342. </return>
  343. <argument index="0" name="enable" type="bool">
  344. </argument>
  345. <description>
  346. Set to enable highlighting all occurrences of the current selection.
  347. </description>
  348. </method>
  349. <method name="set_highlight_current_line">
  350. <return type="void">
  351. </return>
  352. <argument index="0" name="enabled" type="bool">
  353. </argument>
  354. <description>
  355. </description>
  356. </method>
  357. <method name="set_max_chars">
  358. <return type="void">
  359. </return>
  360. <argument index="0" name="amount" type="int">
  361. </argument>
  362. <description>
  363. Set the maximum amount of characters editable.
  364. </description>
  365. </method>
  366. <method name="set_override_selected_font_color">
  367. <return type="void">
  368. </return>
  369. <argument index="0" name="override" type="bool">
  370. </argument>
  371. <description>
  372. </description>
  373. </method>
  374. <method name="set_readonly">
  375. <return type="void">
  376. </return>
  377. <argument index="0" name="enable" type="bool">
  378. </argument>
  379. <description>
  380. Set the text editor as read-only. Text can be displayed but not edited.
  381. </description>
  382. </method>
  383. <method name="set_show_line_numbers">
  384. <return type="void">
  385. </return>
  386. <argument index="0" name="enable" type="bool">
  387. </argument>
  388. <description>
  389. Set to enable showing line numbers.
  390. </description>
  391. </method>
  392. <method name="set_smooth_scroll_enable">
  393. <return type="void">
  394. </return>
  395. <argument index="0" name="enable" type="bool">
  396. </argument>
  397. <description>
  398. </description>
  399. </method>
  400. <method name="set_syntax_coloring">
  401. <return type="void">
  402. </return>
  403. <argument index="0" name="enable" type="bool">
  404. </argument>
  405. <description>
  406. Set to enable the syntax coloring.
  407. </description>
  408. </method>
  409. <method name="set_text">
  410. <return type="void">
  411. </return>
  412. <argument index="0" name="text" type="String">
  413. </argument>
  414. <description>
  415. Set the entire text.
  416. </description>
  417. </method>
  418. <method name="set_v_scroll_speed">
  419. <return type="void">
  420. </return>
  421. <argument index="0" name="speed" type="float">
  422. </argument>
  423. <description>
  424. </description>
  425. </method>
  426. <method name="set_wrap">
  427. <return type="void">
  428. </return>
  429. <argument index="0" name="enable" type="bool">
  430. </argument>
  431. <description>
  432. Enable text wrapping when it goes beyond he edge of what is visible.
  433. </description>
  434. </method>
  435. <method name="undo">
  436. <return type="void">
  437. </return>
  438. <description>
  439. Perform undo operation.
  440. </description>
  441. </method>
  442. </methods>
  443. <members>
  444. <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled">
  445. </member>
  446. <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed">
  447. </member>
  448. <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode">
  449. </member>
  450. <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled">
  451. </member>
  452. <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled">
  453. </member>
  454. <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color">
  455. </member>
  456. <member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled">
  457. </member>
  458. <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled">
  459. </member>
  460. <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled">
  461. </member>
  462. <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed">
  463. </member>
  464. </members>
  465. <signals>
  466. <signal name="breakpoint_toggled">
  467. <argument index="0" name="row" type="int">
  468. </argument>
  469. <description>
  470. Emitted when a breakpoint is placed via the breakpoint gutter.
  471. </description>
  472. </signal>
  473. <signal name="cursor_changed">
  474. <description>
  475. Emitted when the cursor changes.
  476. </description>
  477. </signal>
  478. <signal name="request_completion">
  479. <description>
  480. </description>
  481. </signal>
  482. <signal name="symbol_lookup">
  483. <argument index="0" name="symbol" type="String">
  484. </argument>
  485. <argument index="1" name="row" type="int">
  486. </argument>
  487. <argument index="2" name="column" type="int">
  488. </argument>
  489. <description>
  490. </description>
  491. </signal>
  492. <signal name="text_changed">
  493. <description>
  494. Emitted when the text changes.
  495. </description>
  496. </signal>
  497. </signals>
  498. <constants>
  499. <constant name="SEARCH_MATCH_CASE" value="1">
  500. Match case when searching.
  501. </constant>
  502. <constant name="SEARCH_WHOLE_WORDS" value="2">
  503. Match whole words when searching.
  504. </constant>
  505. <constant name="SEARCH_BACKWARDS" value="4">
  506. Search from end to beginning.
  507. </constant>
  508. <constant name="MENU_CUT" value="0">
  509. </constant>
  510. <constant name="MENU_COPY" value="1">
  511. </constant>
  512. <constant name="MENU_PASTE" value="2">
  513. </constant>
  514. <constant name="MENU_CLEAR" value="3">
  515. </constant>
  516. <constant name="MENU_SELECT_ALL" value="4">
  517. </constant>
  518. <constant name="MENU_UNDO" value="5">
  519. </constant>
  520. <constant name="MENU_MAX" value="6">
  521. </constant>
  522. </constants>
  523. <theme_items>
  524. <theme_item name="background_color" type="Color">
  525. </theme_item>
  526. <theme_item name="brace_mismatch_color" type="Color">
  527. </theme_item>
  528. <theme_item name="breakpoint_color" type="Color">
  529. </theme_item>
  530. <theme_item name="caret_background_color" type="Color">
  531. </theme_item>
  532. <theme_item name="caret_color" type="Color">
  533. </theme_item>
  534. <theme_item name="completion" type="StyleBox">
  535. </theme_item>
  536. <theme_item name="completion_background_color" type="Color">
  537. </theme_item>
  538. <theme_item name="completion_existing_color" type="Color">
  539. </theme_item>
  540. <theme_item name="completion_font_color" type="Color">
  541. </theme_item>
  542. <theme_item name="completion_lines" type="int">
  543. </theme_item>
  544. <theme_item name="completion_max_width" type="int">
  545. </theme_item>
  546. <theme_item name="completion_scroll_color" type="Color">
  547. </theme_item>
  548. <theme_item name="completion_scroll_width" type="int">
  549. </theme_item>
  550. <theme_item name="completion_selected_color" type="Color">
  551. </theme_item>
  552. <theme_item name="current_line_color" type="Color">
  553. </theme_item>
  554. <theme_item name="focus" type="StyleBox">
  555. </theme_item>
  556. <theme_item name="font" type="Font">
  557. </theme_item>
  558. <theme_item name="font_color" type="Color">
  559. </theme_item>
  560. <theme_item name="font_color_selected" type="Color">
  561. </theme_item>
  562. <theme_item name="function_color" type="Color">
  563. </theme_item>
  564. <theme_item name="line_number_color" type="Color">
  565. </theme_item>
  566. <theme_item name="line_spacing" type="int">
  567. </theme_item>
  568. <theme_item name="mark_color" type="Color">
  569. </theme_item>
  570. <theme_item name="member_variable_color" type="Color">
  571. </theme_item>
  572. <theme_item name="normal" type="StyleBox">
  573. </theme_item>
  574. <theme_item name="number_color" type="Color">
  575. </theme_item>
  576. <theme_item name="selection_color" type="Color">
  577. </theme_item>
  578. <theme_item name="symbol_color" type="Color">
  579. </theme_item>
  580. <theme_item name="tab" type="Texture">
  581. </theme_item>
  582. <theme_item name="word_highlighted_color" type="Color">
  583. </theme_item>
  584. </theme_items>
  585. </class>