2
0

TreeItem.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="TreeItem" inherits="Object" version="4.0">
  3. <brief_description>
  4. Control for a single item inside a [Tree].
  5. </brief_description>
  6. <description>
  7. Control for a single item inside a [Tree]. May have child [TreeItem]s and be styled as well as contain buttons.
  8. You can remove a [TreeItem] by using [method Object.free].
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="add_button">
  14. <return type="void" />
  15. <argument index="0" name="column" type="int" />
  16. <argument index="1" name="button" type="Texture2D" />
  17. <argument index="2" name="button_idx" type="int" default="-1" />
  18. <argument index="3" name="disabled" type="bool" default="false" />
  19. <argument index="4" name="tooltip" type="String" default="&quot;&quot;" />
  20. <description>
  21. Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
  22. </description>
  23. </method>
  24. <method name="call_recursive" qualifiers="vararg">
  25. <return type="Variant" />
  26. <argument index="0" name="method" type="StringName" />
  27. <description>
  28. Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.
  29. </description>
  30. </method>
  31. <method name="clear_custom_bg_color">
  32. <return type="void" />
  33. <argument index="0" name="column" type="int" />
  34. <description>
  35. Resets the background color for the given column to default.
  36. </description>
  37. </method>
  38. <method name="clear_custom_color">
  39. <return type="void" />
  40. <argument index="0" name="column" type="int" />
  41. <description>
  42. Resets the color for the given column to default.
  43. </description>
  44. </method>
  45. <method name="clear_opentype_features">
  46. <return type="void" />
  47. <argument index="0" name="column" type="int" />
  48. <description>
  49. Removes all OpenType features.
  50. </description>
  51. </method>
  52. <method name="create_child">
  53. <return type="TreeItem" />
  54. <argument index="0" name="idx" type="int" default="-1" />
  55. <description>
  56. Creates an item and adds it as a child.
  57. The new item will be inserted as position [code]idx[/code] (the default value [code]-1[/code] means the last position), or it will be the last child if [code]idx[/code] is higher than the child count.
  58. </description>
  59. </method>
  60. <method name="deselect">
  61. <return type="void" />
  62. <argument index="0" name="column" type="int" />
  63. <description>
  64. Deselects the given column.
  65. </description>
  66. </method>
  67. <method name="erase_button">
  68. <return type="void" />
  69. <argument index="0" name="column" type="int" />
  70. <argument index="1" name="button_idx" type="int" />
  71. <description>
  72. Removes the button at index [code]button_idx[/code] in column [code]column[/code].
  73. </description>
  74. </method>
  75. <method name="get_button" qualifiers="const">
  76. <return type="Texture2D" />
  77. <argument index="0" name="column" type="int" />
  78. <argument index="1" name="button_idx" type="int" />
  79. <description>
  80. Returns the [Texture2D] of the button at index [code]button_idx[/code] in column [code]column[/code].
  81. </description>
  82. </method>
  83. <method name="get_button_count" qualifiers="const">
  84. <return type="int" />
  85. <argument index="0" name="column" type="int" />
  86. <description>
  87. Returns the number of buttons in column [code]column[/code]. May be used to get the most recently added button's index, if no index was specified.
  88. </description>
  89. </method>
  90. <method name="get_button_tooltip" qualifiers="const">
  91. <return type="String" />
  92. <argument index="0" name="column" type="int" />
  93. <argument index="1" name="button_idx" type="int" />
  94. <description>
  95. Returns the tooltip string for the button at index [code]button_idx[/code] in column [code]column[/code].
  96. </description>
  97. </method>
  98. <method name="get_cell_mode" qualifiers="const">
  99. <return type="int" enum="TreeItem.TreeCellMode" />
  100. <argument index="0" name="column" type="int" />
  101. <description>
  102. Returns the column's cell mode.
  103. </description>
  104. </method>
  105. <method name="get_child">
  106. <return type="TreeItem" />
  107. <argument index="0" name="idx" type="int" />
  108. <description>
  109. Returns a child item by its index (see [method get_child_count]). This method is often used for iterating all children of an item.
  110. Negative indices access the children from the last one.
  111. </description>
  112. </method>
  113. <method name="get_child_count">
  114. <return type="int" />
  115. <description>
  116. Returns the number of child items.
  117. </description>
  118. </method>
  119. <method name="get_children">
  120. <return type="Array" />
  121. <description>
  122. Returns an array of references to the item's children.
  123. </description>
  124. </method>
  125. <method name="get_custom_bg_color" qualifiers="const">
  126. <return type="Color" />
  127. <argument index="0" name="column" type="int" />
  128. <description>
  129. Returns the custom background color of column [code]column[/code].
  130. </description>
  131. </method>
  132. <method name="get_custom_color" qualifiers="const">
  133. <return type="Color" />
  134. <argument index="0" name="column" type="int" />
  135. <description>
  136. Returns the custom color of column [code]column[/code].
  137. </description>
  138. </method>
  139. <method name="get_custom_font" qualifiers="const">
  140. <return type="Font" />
  141. <argument index="0" name="column" type="int" />
  142. <description>
  143. Returns custom font used to draw text in the column [code]column[/code].
  144. </description>
  145. </method>
  146. <method name="get_custom_font_size" qualifiers="const">
  147. <return type="int" />
  148. <argument index="0" name="column" type="int" />
  149. <description>
  150. Returns custom font size used to draw text in the column [code]column[/code].
  151. </description>
  152. </method>
  153. <method name="get_expand_right" qualifiers="const">
  154. <return type="bool" />
  155. <argument index="0" name="column" type="int" />
  156. <description>
  157. Returns [code]true[/code] if [code]expand_right[/code] is set.
  158. </description>
  159. </method>
  160. <method name="get_first_child" qualifiers="const">
  161. <return type="TreeItem" />
  162. <description>
  163. Returns the TreeItem's first child.
  164. </description>
  165. </method>
  166. <method name="get_icon" qualifiers="const">
  167. <return type="Texture2D" />
  168. <argument index="0" name="column" type="int" />
  169. <description>
  170. Returns the given column's icon [Texture2D]. Error if no icon is set.
  171. </description>
  172. </method>
  173. <method name="get_icon_max_width" qualifiers="const">
  174. <return type="int" />
  175. <argument index="0" name="column" type="int" />
  176. <description>
  177. Returns the column's icon's maximum width.
  178. </description>
  179. </method>
  180. <method name="get_icon_modulate" qualifiers="const">
  181. <return type="Color" />
  182. <argument index="0" name="column" type="int" />
  183. <description>
  184. Returns the [Color] modulating the column's icon.
  185. </description>
  186. </method>
  187. <method name="get_icon_region" qualifiers="const">
  188. <return type="Rect2" />
  189. <argument index="0" name="column" type="int" />
  190. <description>
  191. Returns the icon [Texture2D] region as [Rect2].
  192. </description>
  193. </method>
  194. <method name="get_index">
  195. <return type="int" />
  196. <description>
  197. Returns the node's order in the tree. For example, if called on the first child item the position is [code]0[/code].
  198. </description>
  199. </method>
  200. <method name="get_language" qualifiers="const">
  201. <return type="String" />
  202. <argument index="0" name="column" type="int" />
  203. <description>
  204. Returns item's text language code.
  205. </description>
  206. </method>
  207. <method name="get_metadata" qualifiers="const">
  208. <return type="Variant" />
  209. <argument index="0" name="column" type="int" />
  210. <description>
  211. Returns the metadata value that was set for the given column using [method set_metadata].
  212. </description>
  213. </method>
  214. <method name="get_next" qualifiers="const">
  215. <return type="TreeItem" />
  216. <description>
  217. Returns the next TreeItem in the tree or a null object if there is none.
  218. </description>
  219. </method>
  220. <method name="get_next_visible">
  221. <return type="TreeItem" />
  222. <argument index="0" name="wrap" type="bool" default="false" />
  223. <description>
  224. Returns the next visible TreeItem in the tree or a null object if there is none.
  225. If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code].
  226. </description>
  227. </method>
  228. <method name="get_opentype_feature" qualifiers="const">
  229. <return type="int" />
  230. <argument index="0" name="column" type="int" />
  231. <argument index="1" name="tag" type="String" />
  232. <description>
  233. Returns OpenType feature [code]tag[/code] of the item's text.
  234. </description>
  235. </method>
  236. <method name="get_parent" qualifiers="const">
  237. <return type="TreeItem" />
  238. <description>
  239. Returns the parent TreeItem or a null object if there is none.
  240. </description>
  241. </method>
  242. <method name="get_prev">
  243. <return type="TreeItem" />
  244. <description>
  245. Returns the previous TreeItem in the tree or a null object if there is none.
  246. </description>
  247. </method>
  248. <method name="get_prev_visible">
  249. <return type="TreeItem" />
  250. <argument index="0" name="wrap" type="bool" default="false" />
  251. <description>
  252. Returns the previous visible TreeItem in the tree or a null object if there is none.
  253. If [code]wrap[/code] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns [code]null[/code].
  254. </description>
  255. </method>
  256. <method name="get_range" qualifiers="const">
  257. <return type="float" />
  258. <argument index="0" name="column" type="int" />
  259. <description>
  260. Returns the value of a [constant CELL_MODE_RANGE] column.
  261. </description>
  262. </method>
  263. <method name="get_range_config">
  264. <return type="Dictionary" />
  265. <argument index="0" name="column" type="int" />
  266. <description>
  267. Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".
  268. </description>
  269. </method>
  270. <method name="get_structured_text_bidi_override" qualifiers="const">
  271. <return type="int" enum="Control.StructuredTextParser" />
  272. <argument index="0" name="column" type="int" />
  273. <description>
  274. </description>
  275. </method>
  276. <method name="get_structured_text_bidi_override_options" qualifiers="const">
  277. <return type="Array" />
  278. <argument index="0" name="column" type="int" />
  279. <description>
  280. </description>
  281. </method>
  282. <method name="get_suffix" qualifiers="const">
  283. <return type="String" />
  284. <argument index="0" name="column" type="int" />
  285. <description>
  286. Gets the suffix string shown after the column value.
  287. </description>
  288. </method>
  289. <method name="get_text" qualifiers="const">
  290. <return type="String" />
  291. <argument index="0" name="column" type="int" />
  292. <description>
  293. Returns the given column's text.
  294. </description>
  295. </method>
  296. <method name="get_text_align" qualifiers="const">
  297. <return type="int" enum="TreeItem.TextAlign" />
  298. <argument index="0" name="column" type="int" />
  299. <description>
  300. Returns the given column's text alignment.
  301. </description>
  302. </method>
  303. <method name="get_text_direction" qualifiers="const">
  304. <return type="int" enum="Control.TextDirection" />
  305. <argument index="0" name="column" type="int" />
  306. <description>
  307. Returns item's text base writing direction.
  308. </description>
  309. </method>
  310. <method name="get_tooltip" qualifiers="const">
  311. <return type="String" />
  312. <argument index="0" name="column" type="int" />
  313. <description>
  314. Returns the given column's tooltip.
  315. </description>
  316. </method>
  317. <method name="get_tree" qualifiers="const">
  318. <return type="Tree" />
  319. <description>
  320. Returns the [Tree] that owns this TreeItem.
  321. </description>
  322. </method>
  323. <method name="is_button_disabled" qualifiers="const">
  324. <return type="bool" />
  325. <argument index="0" name="column" type="int" />
  326. <argument index="1" name="button_idx" type="int" />
  327. <description>
  328. Returns [code]true[/code] if the button at index [code]button_idx[/code] for the given column is disabled.
  329. </description>
  330. </method>
  331. <method name="is_checked" qualifiers="const">
  332. <return type="bool" />
  333. <argument index="0" name="column" type="int" />
  334. <description>
  335. Returns [code]true[/code] if the given column is checked.
  336. </description>
  337. </method>
  338. <method name="is_custom_set_as_button" qualifiers="const">
  339. <return type="bool" />
  340. <argument index="0" name="column" type="int" />
  341. <description>
  342. </description>
  343. </method>
  344. <method name="is_editable">
  345. <return type="bool" />
  346. <argument index="0" name="column" type="int" />
  347. <description>
  348. Returns [code]true[/code] if column [code]column[/code] is editable.
  349. </description>
  350. </method>
  351. <method name="is_indeterminate" qualifiers="const">
  352. <return type="bool" />
  353. <argument index="0" name="column" type="int" />
  354. <description>
  355. Returns [code]true[/code] if the given column is indeterminate.
  356. </description>
  357. </method>
  358. <method name="is_selectable" qualifiers="const">
  359. <return type="bool" />
  360. <argument index="0" name="column" type="int" />
  361. <description>
  362. Returns [code]true[/code] if column [code]column[/code] is selectable.
  363. </description>
  364. </method>
  365. <method name="is_selected">
  366. <return type="bool" />
  367. <argument index="0" name="column" type="int" />
  368. <description>
  369. Returns [code]true[/code] if column [code]column[/code] is selected.
  370. </description>
  371. </method>
  372. <method name="move_after">
  373. <return type="void" />
  374. <argument index="0" name="item" type="Object" />
  375. <description>
  376. Moves this TreeItem right after the given [code]item[/code].
  377. [b]Note:[/b] You can't move to the root or move the root.
  378. </description>
  379. </method>
  380. <method name="move_before">
  381. <return type="void" />
  382. <argument index="0" name="item" type="Object" />
  383. <description>
  384. Moves this TreeItem right before the given [code]item[/code].
  385. [b]Note:[/b] You can't move to the root or move the root.
  386. </description>
  387. </method>
  388. <method name="remove_child">
  389. <return type="void" />
  390. <argument index="0" name="child" type="Object" />
  391. <description>
  392. Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free].
  393. </description>
  394. </method>
  395. <method name="select">
  396. <return type="void" />
  397. <argument index="0" name="column" type="int" />
  398. <description>
  399. Selects the column [code]column[/code].
  400. </description>
  401. </method>
  402. <method name="set_button">
  403. <return type="void" />
  404. <argument index="0" name="column" type="int" />
  405. <argument index="1" name="button_idx" type="int" />
  406. <argument index="2" name="button" type="Texture2D" />
  407. <description>
  408. Sets the given column's button [Texture2D] at index [code]button_idx[/code] to [code]button[/code].
  409. </description>
  410. </method>
  411. <method name="set_button_disabled">
  412. <return type="void" />
  413. <argument index="0" name="column" type="int" />
  414. <argument index="1" name="button_idx" type="int" />
  415. <argument index="2" name="disabled" type="bool" />
  416. <description>
  417. If [code]true[/code], disables the button at index [code]button_idx[/code] in column [code]column[/code].
  418. </description>
  419. </method>
  420. <method name="set_cell_mode">
  421. <return type="void" />
  422. <argument index="0" name="column" type="int" />
  423. <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode" />
  424. <description>
  425. Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants.
  426. </description>
  427. </method>
  428. <method name="set_checked">
  429. <return type="void" />
  430. <argument index="0" name="column" type="int" />
  431. <argument index="1" name="checked" type="bool" />
  432. <description>
  433. If [code]true[/code], the column [code]column[/code] is checked. Clears column's indeterminate status.
  434. </description>
  435. </method>
  436. <method name="set_custom_as_button">
  437. <return type="void" />
  438. <argument index="0" name="column" type="int" />
  439. <argument index="1" name="enable" type="bool" />
  440. <description>
  441. </description>
  442. </method>
  443. <method name="set_custom_bg_color">
  444. <return type="void" />
  445. <argument index="0" name="column" type="int" />
  446. <argument index="1" name="color" type="Color" />
  447. <argument index="2" name="just_outline" type="bool" default="false" />
  448. <description>
  449. Sets the given column's custom background color and whether to just use it as an outline.
  450. </description>
  451. </method>
  452. <method name="set_custom_color">
  453. <return type="void" />
  454. <argument index="0" name="column" type="int" />
  455. <argument index="1" name="color" type="Color" />
  456. <description>
  457. Sets the given column's custom color.
  458. </description>
  459. </method>
  460. <method name="set_custom_draw">
  461. <return type="void" />
  462. <argument index="0" name="column" type="int" />
  463. <argument index="1" name="object" type="Object" />
  464. <argument index="2" name="callback" type="StringName" />
  465. <description>
  466. Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code].
  467. The [code]callback[/code] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].
  468. </description>
  469. </method>
  470. <method name="set_custom_font">
  471. <return type="void" />
  472. <argument index="0" name="column" type="int" />
  473. <argument index="1" name="font" type="Font" />
  474. <description>
  475. Sets custom font used to draw text in the column [code]column[/code].
  476. </description>
  477. </method>
  478. <method name="set_custom_font_size">
  479. <return type="void" />
  480. <argument index="0" name="column" type="int" />
  481. <argument index="1" name="font_size" type="int" />
  482. <description>
  483. Sets custom font size used to draw text in the column [code]column[/code].
  484. </description>
  485. </method>
  486. <method name="set_editable">
  487. <return type="void" />
  488. <argument index="0" name="column" type="int" />
  489. <argument index="1" name="enabled" type="bool" />
  490. <description>
  491. If [code]true[/code], column [code]column[/code] is editable.
  492. </description>
  493. </method>
  494. <method name="set_expand_right">
  495. <return type="void" />
  496. <argument index="0" name="column" type="int" />
  497. <argument index="1" name="enable" type="bool" />
  498. <description>
  499. If [code]true[/code], column [code]column[/code] is expanded to the right.
  500. </description>
  501. </method>
  502. <method name="set_icon">
  503. <return type="void" />
  504. <argument index="0" name="column" type="int" />
  505. <argument index="1" name="texture" type="Texture2D" />
  506. <description>
  507. Sets the given column's icon [Texture2D].
  508. </description>
  509. </method>
  510. <method name="set_icon_max_width">
  511. <return type="void" />
  512. <argument index="0" name="column" type="int" />
  513. <argument index="1" name="width" type="int" />
  514. <description>
  515. Sets the given column's icon's maximum width.
  516. </description>
  517. </method>
  518. <method name="set_icon_modulate">
  519. <return type="void" />
  520. <argument index="0" name="column" type="int" />
  521. <argument index="1" name="modulate" type="Color" />
  522. <description>
  523. Modulates the given column's icon with [code]modulate[/code].
  524. </description>
  525. </method>
  526. <method name="set_icon_region">
  527. <return type="void" />
  528. <argument index="0" name="column" type="int" />
  529. <argument index="1" name="region" type="Rect2" />
  530. <description>
  531. Sets the given column's icon's texture region.
  532. </description>
  533. </method>
  534. <method name="set_indeterminate">
  535. <return type="void" />
  536. <argument index="0" name="column" type="int" />
  537. <argument index="1" name="indeterminate" type="bool" />
  538. <description>
  539. If [code]true[/code], the column [code]column[/code] is marked indeterminate.
  540. [b]Note:[/b] If set [code]true[/code] from [code]false[/code], then column is cleared of checked status.
  541. </description>
  542. </method>
  543. <method name="set_language">
  544. <return type="void" />
  545. <argument index="0" name="column" type="int" />
  546. <argument index="1" name="language" type="String" />
  547. <description>
  548. Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  549. </description>
  550. </method>
  551. <method name="set_metadata">
  552. <return type="void" />
  553. <argument index="0" name="column" type="int" />
  554. <argument index="1" name="meta" type="Variant" />
  555. <description>
  556. Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data.
  557. </description>
  558. </method>
  559. <method name="set_opentype_feature">
  560. <return type="void" />
  561. <argument index="0" name="column" type="int" />
  562. <argument index="1" name="tag" type="String" />
  563. <argument index="2" name="value" type="int" />
  564. <description>
  565. Sets OpenType feature [code]tag[/code] for the item's text.
  566. </description>
  567. </method>
  568. <method name="set_range">
  569. <return type="void" />
  570. <argument index="0" name="column" type="int" />
  571. <argument index="1" name="value" type="float" />
  572. <description>
  573. Sets the value of a [constant CELL_MODE_RANGE] column.
  574. </description>
  575. </method>
  576. <method name="set_range_config">
  577. <return type="void" />
  578. <argument index="0" name="column" type="int" />
  579. <argument index="1" name="min" type="float" />
  580. <argument index="2" name="max" type="float" />
  581. <argument index="3" name="step" type="float" />
  582. <argument index="4" name="expr" type="bool" default="false" />
  583. <description>
  584. Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode.
  585. If [code]expr[/code] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit].
  586. </description>
  587. </method>
  588. <method name="set_selectable">
  589. <return type="void" />
  590. <argument index="0" name="column" type="int" />
  591. <argument index="1" name="selectable" type="bool" />
  592. <description>
  593. If [code]true[/code], the given column is selectable.
  594. </description>
  595. </method>
  596. <method name="set_structured_text_bidi_override">
  597. <return type="void" />
  598. <argument index="0" name="column" type="int" />
  599. <argument index="1" name="parser" type="int" enum="Control.StructuredTextParser" />
  600. <description>
  601. </description>
  602. </method>
  603. <method name="set_structured_text_bidi_override_options">
  604. <return type="void" />
  605. <argument index="0" name="column" type="int" />
  606. <argument index="1" name="args" type="Array" />
  607. <description>
  608. </description>
  609. </method>
  610. <method name="set_suffix">
  611. <return type="void" />
  612. <argument index="0" name="column" type="int" />
  613. <argument index="1" name="text" type="String" />
  614. <description>
  615. Sets a string to be shown after a column's value (for example, a unit abbreviation).
  616. </description>
  617. </method>
  618. <method name="set_text">
  619. <return type="void" />
  620. <argument index="0" name="column" type="int" />
  621. <argument index="1" name="text" type="String" />
  622. <description>
  623. Sets the given column's text value.
  624. </description>
  625. </method>
  626. <method name="set_text_align">
  627. <return type="void" />
  628. <argument index="0" name="column" type="int" />
  629. <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign" />
  630. <description>
  631. Sets the given column's text alignment. See [enum TextAlign] for possible values.
  632. </description>
  633. </method>
  634. <method name="set_text_direction">
  635. <return type="void" />
  636. <argument index="0" name="column" type="int" />
  637. <argument index="1" name="direction" type="int" enum="Control.TextDirection" />
  638. <description>
  639. Sets item's text base writing direction.
  640. </description>
  641. </method>
  642. <method name="set_tooltip">
  643. <return type="void" />
  644. <argument index="0" name="column" type="int" />
  645. <argument index="1" name="tooltip" type="String" />
  646. <description>
  647. Sets the given column's tooltip text.
  648. </description>
  649. </method>
  650. <method name="uncollapse_tree">
  651. <return type="void" />
  652. <description>
  653. </description>
  654. </method>
  655. </methods>
  656. <members>
  657. <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed">
  658. If [code]true[/code], the TreeItem is collapsed.
  659. </member>
  660. <member name="custom_minimum_height" type="int" setter="set_custom_minimum_height" getter="get_custom_minimum_height">
  661. The custom minimum height.
  662. </member>
  663. <member name="disable_folding" type="bool" setter="set_disable_folding" getter="is_folding_disabled">
  664. If [code]true[/code], folding is disabled for this TreeItem.
  665. </member>
  666. </members>
  667. <constants>
  668. <constant name="CELL_MODE_STRING" value="0" enum="TreeCellMode">
  669. Cell contains a string.
  670. </constant>
  671. <constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode">
  672. Cell contains a checkbox.
  673. </constant>
  674. <constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode">
  675. Cell contains a range.
  676. </constant>
  677. <constant name="CELL_MODE_ICON" value="3" enum="TreeCellMode">
  678. Cell contains an icon.
  679. </constant>
  680. <constant name="CELL_MODE_CUSTOM" value="4" enum="TreeCellMode">
  681. </constant>
  682. <constant name="ALIGN_LEFT" value="0" enum="TextAlign">
  683. Align text to the left. See [code]set_text_align()[/code].
  684. </constant>
  685. <constant name="ALIGN_CENTER" value="1" enum="TextAlign">
  686. Center text. See [code]set_text_align()[/code].
  687. </constant>
  688. <constant name="ALIGN_RIGHT" value="2" enum="TextAlign">
  689. Align text to the right. See [code]set_text_align()[/code].
  690. </constant>
  691. </constants>
  692. </class>