class_tree.rst 109 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Tree.xml.
  6. .. _class_Tree:
  7. Tree
  8. ====
  9. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A control used to show a set of internal :ref:`TreeItem<class_TreeItem>`\ s in a hierarchical structure.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A control used to show a set of internal :ref:`TreeItem<class_TreeItem>`\ s in a hierarchical structure. The tree items can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like :ref:`LineEdit<class_LineEdit>`\ s, buttons and popups. It can be useful for structured displays and interactions.
  15. Trees are built via code, using :ref:`TreeItem<class_TreeItem>` objects to create the structure. They have a single root, but multiple roots can be simulated with :ref:`hide_root<class_Tree_property_hide_root>`:
  16. .. tabs::
  17. .. code-tab:: gdscript
  18. func _ready():
  19. var tree = Tree.new()
  20. var root = tree.create_item()
  21. tree.hide_root = true
  22. var child1 = tree.create_item(root)
  23. var child2 = tree.create_item(root)
  24. var subchild1 = tree.create_item(child1)
  25. subchild1.set_text(0, "Subchild1")
  26. .. code-tab:: csharp
  27. public override void _Ready()
  28. {
  29. var tree = new Tree();
  30. TreeItem root = tree.CreateItem();
  31. tree.HideRoot = true;
  32. TreeItem child1 = tree.CreateItem(root);
  33. TreeItem child2 = tree.CreateItem(root);
  34. TreeItem subchild1 = tree.CreateItem(child1);
  35. subchild1.SetText(0, "Subchild1");
  36. }
  37. To iterate over all the :ref:`TreeItem<class_TreeItem>` objects in a **Tree** object, use :ref:`TreeItem.get_next()<class_TreeItem_method_get_next>` and :ref:`TreeItem.get_first_child()<class_TreeItem_method_get_first_child>` after getting the root through :ref:`get_root()<class_Tree_method_get_root>`. You can use :ref:`Object.free()<class_Object_method_free>` on a :ref:`TreeItem<class_TreeItem>` to remove it from the **Tree**.
  38. \ **Incremental search:** Like :ref:`ItemList<class_ItemList>` and :ref:`PopupMenu<class_PopupMenu>`, **Tree** supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec<class_ProjectSettings_property_gui/timers/incremental_search_max_interval_msec>`.
  39. .. rst-class:: classref-reftable-group
  40. Properties
  41. ----------
  42. .. table::
  43. :widths: auto
  44. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`allow_reselect<class_Tree_property_allow_reselect>` | ``false`` |
  46. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  47. | :ref:`bool<class_bool>` | :ref:`allow_rmb_select<class_Tree_property_allow_rmb_select>` | ``false`` |
  48. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`allow_search<class_Tree_property_allow_search>` | ``true`` |
  50. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  51. | :ref:`bool<class_bool>` | :ref:`auto_tooltip<class_Tree_property_auto_tooltip>` | ``true`` |
  52. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  53. | :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) |
  54. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`column_titles_visible<class_Tree_property_column_titles_visible>` | ``false`` |
  56. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  57. | :ref:`int<class_int>` | :ref:`columns<class_Tree_property_columns>` | ``1`` |
  58. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  59. | :ref:`int<class_int>` | :ref:`drop_mode_flags<class_Tree_property_drop_mode_flags>` | ``0`` |
  60. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  61. | :ref:`bool<class_bool>` | :ref:`enable_recursive_folding<class_Tree_property_enable_recursive_folding>` | ``true`` |
  62. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  63. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
  64. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  65. | :ref:`bool<class_bool>` | :ref:`hide_folding<class_Tree_property_hide_folding>` | ``false`` |
  66. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`hide_root<class_Tree_property_hide_root>` | ``false`` |
  68. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  69. | :ref:`bool<class_bool>` | :ref:`scroll_horizontal_enabled<class_Tree_property_scroll_horizontal_enabled>` | ``true`` |
  70. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  71. | :ref:`bool<class_bool>` | :ref:`scroll_vertical_enabled<class_Tree_property_scroll_vertical_enabled>` | ``true`` |
  72. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  73. | :ref:`SelectMode<enum_Tree_SelectMode>` | :ref:`select_mode<class_Tree_property_select_mode>` | ``0`` |
  74. +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  75. .. rst-class:: classref-reftable-group
  76. Methods
  77. -------
  78. .. table::
  79. :widths: auto
  80. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | |void| | :ref:`clear<class_Tree_method_clear>`\ (\ ) |
  82. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`TreeItem<class_TreeItem>` | :ref:`create_item<class_Tree_method_create_item>`\ (\ parent\: :ref:`TreeItem<class_TreeItem>` = null, index\: :ref:`int<class_int>` = -1\ ) |
  84. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | |void| | :ref:`deselect_all<class_Tree_method_deselect_all>`\ (\ ) |
  86. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`bool<class_bool>` | :ref:`edit_selected<class_Tree_method_edit_selected>`\ (\ force_edit\: :ref:`bool<class_bool>` = false\ ) |
  88. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | |void| | :ref:`ensure_cursor_is_visible<class_Tree_method_ensure_cursor_is_visible>`\ (\ ) |
  90. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`int<class_int>` | :ref:`get_button_id_at_position<class_Tree_method_get_button_id_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| |
  92. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`int<class_int>` | :ref:`get_column_at_position<class_Tree_method_get_column_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| |
  94. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`int<class_int>` | :ref:`get_column_expand_ratio<class_Tree_method_get_column_expand_ratio>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  96. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`String<class_String>` | :ref:`get_column_title<class_Tree_method_get_column_title>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  98. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`get_column_title_alignment<class_Tree_method_get_column_title_alignment>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  100. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_column_title_direction<class_Tree_method_get_column_title_direction>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  102. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`String<class_String>` | :ref:`get_column_title_language<class_Tree_method_get_column_title_language>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  104. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`int<class_int>` | :ref:`get_column_width<class_Tree_method_get_column_width>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  106. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`Rect2<class_Rect2>` | :ref:`get_custom_popup_rect<class_Tree_method_get_custom_popup_rect>`\ (\ ) |const| |
  108. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`int<class_int>` | :ref:`get_drop_section_at_position<class_Tree_method_get_drop_section_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| |
  110. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_edited<class_Tree_method_get_edited>`\ (\ ) |const| |
  112. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`int<class_int>` | :ref:`get_edited_column<class_Tree_method_get_edited_column>`\ (\ ) |const| |
  114. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | :ref:`Rect2<class_Rect2>` | :ref:`get_item_area_rect<class_Tree_method_get_item_area_rect>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>` = -1, button_index\: :ref:`int<class_int>` = -1\ ) |const| |
  116. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_item_at_position<class_Tree_method_get_item_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| |
  118. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_selected<class_Tree_method_get_next_selected>`\ (\ from\: :ref:`TreeItem<class_TreeItem>`\ ) |
  120. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | :ref:`int<class_int>` | :ref:`get_pressed_button<class_Tree_method_get_pressed_button>`\ (\ ) |const| |
  122. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_root<class_Tree_method_get_root>`\ (\ ) |const| |
  124. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | :ref:`Vector2<class_Vector2>` | :ref:`get_scroll<class_Tree_method_get_scroll>`\ (\ ) |const| |
  126. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | :ref:`TreeItem<class_TreeItem>` | :ref:`get_selected<class_Tree_method_get_selected>`\ (\ ) |const| |
  128. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | :ref:`int<class_int>` | :ref:`get_selected_column<class_Tree_method_get_selected_column>`\ (\ ) |const| |
  130. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :ref:`bool<class_bool>` | :ref:`is_column_clipping_content<class_Tree_method_is_column_clipping_content>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  132. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | :ref:`bool<class_bool>` | :ref:`is_column_expanding<class_Tree_method_is_column_expanding>`\ (\ column\: :ref:`int<class_int>`\ ) |const| |
  134. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | |void| | :ref:`scroll_to_item<class_Tree_method_scroll_to_item>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`, center_on_item\: :ref:`bool<class_bool>` = false\ ) |
  136. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | |void| | :ref:`set_column_clip_content<class_Tree_method_set_column_clip_content>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
  138. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | |void| | :ref:`set_column_custom_minimum_width<class_Tree_method_set_column_custom_minimum_width>`\ (\ column\: :ref:`int<class_int>`, min_width\: :ref:`int<class_int>`\ ) |
  140. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | |void| | :ref:`set_column_expand<class_Tree_method_set_column_expand>`\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`\ ) |
  142. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | |void| | :ref:`set_column_expand_ratio<class_Tree_method_set_column_expand_ratio>`\ (\ column\: :ref:`int<class_int>`, ratio\: :ref:`int<class_int>`\ ) |
  144. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | |void| | :ref:`set_column_title<class_Tree_method_set_column_title>`\ (\ column\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) |
  146. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | |void| | :ref:`set_column_title_alignment<class_Tree_method_set_column_title_alignment>`\ (\ column\: :ref:`int<class_int>`, title_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) |
  148. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | |void| | :ref:`set_column_title_direction<class_Tree_method_set_column_title_direction>`\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) |
  150. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | |void| | :ref:`set_column_title_language<class_Tree_method_set_column_title_language>`\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) |
  152. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | |void| | :ref:`set_selected<class_Tree_method_set_selected>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`\ ) |
  154. +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. .. rst-class:: classref-reftable-group
  156. Theme Properties
  157. ----------------
  158. .. table::
  159. :widths: auto
  160. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  161. | :ref:`Color<class_Color>` | :ref:`children_hl_line_color<class_Tree_theme_color_children_hl_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` |
  162. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  163. | :ref:`Color<class_Color>` | :ref:`custom_button_font_highlight<class_Tree_theme_color_custom_button_font_highlight>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  164. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  165. | :ref:`Color<class_Color>` | :ref:`drop_position_color<class_Tree_theme_color_drop_position_color>` | ``Color(1, 1, 1, 1)`` |
  166. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  167. | :ref:`Color<class_Color>` | :ref:`font_color<class_Tree_theme_color_font_color>` | ``Color(0.7, 0.7, 0.7, 1)`` |
  168. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  169. | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_Tree_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  170. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  171. | :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_Tree_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  172. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  173. | :ref:`Color<class_Color>` | :ref:`font_hovered_dimmed_color<class_Tree_theme_color_font_hovered_dimmed_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  174. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  175. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_Tree_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
  176. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  177. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_Tree_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` |
  178. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  179. | :ref:`Color<class_Color>` | :ref:`guide_color<class_Tree_theme_color_guide_color>` | ``Color(0.7, 0.7, 0.7, 0.25)`` |
  180. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  181. | :ref:`Color<class_Color>` | :ref:`parent_hl_line_color<class_Tree_theme_color_parent_hl_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` |
  182. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  183. | :ref:`Color<class_Color>` | :ref:`relationship_line_color<class_Tree_theme_color_relationship_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` |
  184. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  185. | :ref:`Color<class_Color>` | :ref:`title_button_color<class_Tree_theme_color_title_button_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  186. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  187. | :ref:`int<class_int>` | :ref:`button_margin<class_Tree_theme_constant_button_margin>` | ``4`` |
  188. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  189. | :ref:`int<class_int>` | :ref:`children_hl_line_width<class_Tree_theme_constant_children_hl_line_width>` | ``1`` |
  190. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  191. | :ref:`int<class_int>` | :ref:`draw_guides<class_Tree_theme_constant_draw_guides>` | ``1`` |
  192. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  193. | :ref:`int<class_int>` | :ref:`draw_relationship_lines<class_Tree_theme_constant_draw_relationship_lines>` | ``0`` |
  194. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  195. | :ref:`int<class_int>` | :ref:`h_separation<class_Tree_theme_constant_h_separation>` | ``4`` |
  196. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  197. | :ref:`int<class_int>` | :ref:`icon_max_width<class_Tree_theme_constant_icon_max_width>` | ``0`` |
  198. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  199. | :ref:`int<class_int>` | :ref:`inner_item_margin_bottom<class_Tree_theme_constant_inner_item_margin_bottom>` | ``0`` |
  200. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  201. | :ref:`int<class_int>` | :ref:`inner_item_margin_left<class_Tree_theme_constant_inner_item_margin_left>` | ``0`` |
  202. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  203. | :ref:`int<class_int>` | :ref:`inner_item_margin_right<class_Tree_theme_constant_inner_item_margin_right>` | ``0`` |
  204. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  205. | :ref:`int<class_int>` | :ref:`inner_item_margin_top<class_Tree_theme_constant_inner_item_margin_top>` | ``0`` |
  206. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  207. | :ref:`int<class_int>` | :ref:`item_margin<class_Tree_theme_constant_item_margin>` | ``16`` |
  208. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  209. | :ref:`int<class_int>` | :ref:`outline_size<class_Tree_theme_constant_outline_size>` | ``0`` |
  210. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  211. | :ref:`int<class_int>` | :ref:`parent_hl_line_margin<class_Tree_theme_constant_parent_hl_line_margin>` | ``0`` |
  212. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  213. | :ref:`int<class_int>` | :ref:`parent_hl_line_width<class_Tree_theme_constant_parent_hl_line_width>` | ``1`` |
  214. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  215. | :ref:`int<class_int>` | :ref:`relationship_line_width<class_Tree_theme_constant_relationship_line_width>` | ``1`` |
  216. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  217. | :ref:`int<class_int>` | :ref:`scroll_border<class_Tree_theme_constant_scroll_border>` | ``4`` |
  218. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  219. | :ref:`int<class_int>` | :ref:`scroll_speed<class_Tree_theme_constant_scroll_speed>` | ``12`` |
  220. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  221. | :ref:`int<class_int>` | :ref:`scrollbar_h_separation<class_Tree_theme_constant_scrollbar_h_separation>` | ``4`` |
  222. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  223. | :ref:`int<class_int>` | :ref:`scrollbar_margin_bottom<class_Tree_theme_constant_scrollbar_margin_bottom>` | ``-1`` |
  224. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  225. | :ref:`int<class_int>` | :ref:`scrollbar_margin_left<class_Tree_theme_constant_scrollbar_margin_left>` | ``-1`` |
  226. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  227. | :ref:`int<class_int>` | :ref:`scrollbar_margin_right<class_Tree_theme_constant_scrollbar_margin_right>` | ``-1`` |
  228. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  229. | :ref:`int<class_int>` | :ref:`scrollbar_margin_top<class_Tree_theme_constant_scrollbar_margin_top>` | ``-1`` |
  230. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  231. | :ref:`int<class_int>` | :ref:`scrollbar_v_separation<class_Tree_theme_constant_scrollbar_v_separation>` | ``4`` |
  232. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  233. | :ref:`int<class_int>` | :ref:`v_separation<class_Tree_theme_constant_v_separation>` | ``4`` |
  234. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  235. | :ref:`Font<class_Font>` | :ref:`font<class_Tree_theme_font_font>` | |
  236. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  237. | :ref:`Font<class_Font>` | :ref:`title_button_font<class_Tree_theme_font_title_button_font>` | |
  238. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  239. | :ref:`int<class_int>` | :ref:`font_size<class_Tree_theme_font_size_font_size>` | |
  240. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  241. | :ref:`int<class_int>` | :ref:`title_button_font_size<class_Tree_theme_font_size_title_button_font_size>` | |
  242. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  243. | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow<class_Tree_theme_icon_arrow>` | |
  244. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  245. | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow_collapsed<class_Tree_theme_icon_arrow_collapsed>` | |
  246. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  247. | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow_collapsed_mirrored<class_Tree_theme_icon_arrow_collapsed_mirrored>` | |
  248. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  249. | :ref:`Texture2D<class_Texture2D>` | :ref:`checked<class_Tree_theme_icon_checked>` | |
  250. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  251. | :ref:`Texture2D<class_Texture2D>` | :ref:`checked_disabled<class_Tree_theme_icon_checked_disabled>` | |
  252. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  253. | :ref:`Texture2D<class_Texture2D>` | :ref:`indeterminate<class_Tree_theme_icon_indeterminate>` | |
  254. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  255. | :ref:`Texture2D<class_Texture2D>` | :ref:`indeterminate_disabled<class_Tree_theme_icon_indeterminate_disabled>` | |
  256. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  257. | :ref:`Texture2D<class_Texture2D>` | :ref:`select_arrow<class_Tree_theme_icon_select_arrow>` | |
  258. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  259. | :ref:`Texture2D<class_Texture2D>` | :ref:`unchecked<class_Tree_theme_icon_unchecked>` | |
  260. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  261. | :ref:`Texture2D<class_Texture2D>` | :ref:`unchecked_disabled<class_Tree_theme_icon_unchecked_disabled>` | |
  262. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  263. | :ref:`Texture2D<class_Texture2D>` | :ref:`updown<class_Tree_theme_icon_updown>` | |
  264. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  265. | :ref:`StyleBox<class_StyleBox>` | :ref:`button_hover<class_Tree_theme_style_button_hover>` | |
  266. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  267. | :ref:`StyleBox<class_StyleBox>` | :ref:`button_pressed<class_Tree_theme_style_button_pressed>` | |
  268. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  269. | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor<class_Tree_theme_style_cursor>` | |
  270. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  271. | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor_unfocused<class_Tree_theme_style_cursor_unfocused>` | |
  272. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  273. | :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button<class_Tree_theme_style_custom_button>` | |
  274. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  275. | :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button_hover<class_Tree_theme_style_custom_button_hover>` | |
  276. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  277. | :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button_pressed<class_Tree_theme_style_custom_button_pressed>` | |
  278. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  279. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_Tree_theme_style_focus>` | |
  280. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  281. | :ref:`StyleBox<class_StyleBox>` | :ref:`hovered<class_Tree_theme_style_hovered>` | |
  282. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  283. | :ref:`StyleBox<class_StyleBox>` | :ref:`hovered_dimmed<class_Tree_theme_style_hovered_dimmed>` | |
  284. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  285. | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_Tree_theme_style_panel>` | |
  286. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  287. | :ref:`StyleBox<class_StyleBox>` | :ref:`selected<class_Tree_theme_style_selected>` | |
  288. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  289. | :ref:`StyleBox<class_StyleBox>` | :ref:`selected_focus<class_Tree_theme_style_selected_focus>` | |
  290. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  291. | :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_hover<class_Tree_theme_style_title_button_hover>` | |
  292. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  293. | :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_normal<class_Tree_theme_style_title_button_normal>` | |
  294. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  295. | :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_pressed<class_Tree_theme_style_title_button_pressed>` | |
  296. +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
  297. .. rst-class:: classref-section-separator
  298. ----
  299. .. rst-class:: classref-descriptions-group
  300. Signals
  301. -------
  302. .. _class_Tree_signal_button_clicked:
  303. .. rst-class:: classref-signal
  304. **button_clicked**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_button_clicked>`
  305. Emitted when a button on the tree was pressed (see :ref:`TreeItem.add_button()<class_TreeItem_method_add_button>`).
  306. .. rst-class:: classref-item-separator
  307. ----
  308. .. _class_Tree_signal_cell_selected:
  309. .. rst-class:: classref-signal
  310. **cell_selected**\ (\ ) :ref:`🔗<class_Tree_signal_cell_selected>`
  311. Emitted when a cell is selected.
  312. .. rst-class:: classref-item-separator
  313. ----
  314. .. _class_Tree_signal_check_propagated_to_item:
  315. .. rst-class:: classref-signal
  316. **check_propagated_to_item**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_check_propagated_to_item>`
  317. Emitted when :ref:`TreeItem.propagate_check()<class_TreeItem_method_propagate_check>` is called. Connect to this signal to process the items that are affected when :ref:`TreeItem.propagate_check()<class_TreeItem_method_propagate_check>` is invoked. The order that the items affected will be processed is as follows: the item that invoked the method, children of that item, and finally parents of that item.
  318. .. rst-class:: classref-item-separator
  319. ----
  320. .. _class_Tree_signal_column_title_clicked:
  321. .. rst-class:: classref-signal
  322. **column_title_clicked**\ (\ column\: :ref:`int<class_int>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_column_title_clicked>`
  323. Emitted when a column's title is clicked with either :ref:`@GlobalScope.MOUSE_BUTTON_LEFT<class_@GlobalScope_constant_MOUSE_BUTTON_LEFT>` or :ref:`@GlobalScope.MOUSE_BUTTON_RIGHT<class_@GlobalScope_constant_MOUSE_BUTTON_RIGHT>`.
  324. .. rst-class:: classref-item-separator
  325. ----
  326. .. _class_Tree_signal_custom_item_clicked:
  327. .. rst-class:: classref-signal
  328. **custom_item_clicked**\ (\ mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_custom_item_clicked>`
  329. Emitted when an item with :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` is clicked with a mouse button.
  330. .. rst-class:: classref-item-separator
  331. ----
  332. .. _class_Tree_signal_custom_popup_edited:
  333. .. rst-class:: classref-signal
  334. **custom_popup_edited**\ (\ arrow_clicked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_signal_custom_popup_edited>`
  335. Emitted when a cell with the :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` is clicked to be edited.
  336. .. rst-class:: classref-item-separator
  337. ----
  338. .. _class_Tree_signal_empty_clicked:
  339. .. rst-class:: classref-signal
  340. **empty_clicked**\ (\ click_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_empty_clicked>`
  341. Emitted when a mouse button is clicked in the empty space of the tree.
  342. .. rst-class:: classref-item-separator
  343. ----
  344. .. _class_Tree_signal_item_activated:
  345. .. rst-class:: classref-signal
  346. **item_activated**\ (\ ) :ref:`🔗<class_Tree_signal_item_activated>`
  347. Emitted when an item is double-clicked, or selected with a ``ui_accept`` input event (e.g. using :kbd:`Enter` or :kbd:`Space` on the keyboard).
  348. .. rst-class:: classref-item-separator
  349. ----
  350. .. _class_Tree_signal_item_collapsed:
  351. .. rst-class:: classref-signal
  352. **item_collapsed**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_Tree_signal_item_collapsed>`
  353. Emitted when an item is collapsed by a click on the folding arrow.
  354. .. rst-class:: classref-item-separator
  355. ----
  356. .. _class_Tree_signal_item_edited:
  357. .. rst-class:: classref-signal
  358. **item_edited**\ (\ ) :ref:`🔗<class_Tree_signal_item_edited>`
  359. Emitted when an item is edited.
  360. .. rst-class:: classref-item-separator
  361. ----
  362. .. _class_Tree_signal_item_icon_double_clicked:
  363. .. rst-class:: classref-signal
  364. **item_icon_double_clicked**\ (\ ) :ref:`🔗<class_Tree_signal_item_icon_double_clicked>`
  365. Emitted when an item's icon is double-clicked. For a signal that emits when any part of the item is double-clicked, see :ref:`item_activated<class_Tree_signal_item_activated>`.
  366. .. rst-class:: classref-item-separator
  367. ----
  368. .. _class_Tree_signal_item_mouse_selected:
  369. .. rst-class:: classref-signal
  370. **item_mouse_selected**\ (\ mouse_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_item_mouse_selected>`
  371. Emitted when an item is selected with a mouse button.
  372. .. rst-class:: classref-item-separator
  373. ----
  374. .. _class_Tree_signal_item_selected:
  375. .. rst-class:: classref-signal
  376. **item_selected**\ (\ ) :ref:`🔗<class_Tree_signal_item_selected>`
  377. Emitted when an item is selected.
  378. .. rst-class:: classref-item-separator
  379. ----
  380. .. _class_Tree_signal_multi_selected:
  381. .. rst-class:: classref-signal
  382. **multi_selected**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`, selected\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_signal_multi_selected>`
  383. Emitted instead of :ref:`item_selected<class_Tree_signal_item_selected>` if :ref:`select_mode<class_Tree_property_select_mode>` is set to :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>`.
  384. .. rst-class:: classref-item-separator
  385. ----
  386. .. _class_Tree_signal_nothing_selected:
  387. .. rst-class:: classref-signal
  388. **nothing_selected**\ (\ ) :ref:`🔗<class_Tree_signal_nothing_selected>`
  389. Emitted when a left mouse button click does not select any item.
  390. .. rst-class:: classref-section-separator
  391. ----
  392. .. rst-class:: classref-descriptions-group
  393. Enumerations
  394. ------------
  395. .. _enum_Tree_SelectMode:
  396. .. rst-class:: classref-enumeration
  397. enum **SelectMode**: :ref:`🔗<enum_Tree_SelectMode>`
  398. .. _class_Tree_constant_SELECT_SINGLE:
  399. .. rst-class:: classref-enumeration-constant
  400. :ref:`SelectMode<enum_Tree_SelectMode>` **SELECT_SINGLE** = ``0``
  401. Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item.
  402. The focus cursor is always hidden in this mode, but it is positioned at the current selection, making the currently selected item the currently focused item.
  403. .. _class_Tree_constant_SELECT_ROW:
  404. .. rst-class:: classref-enumeration-constant
  405. :ref:`SelectMode<enum_Tree_SelectMode>` **SELECT_ROW** = ``1``
  406. Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item.
  407. The focus cursor is always hidden in this mode, but it is positioned at the first column of the current selection, making the currently selected item the currently focused item.
  408. .. _class_Tree_constant_SELECT_MULTI:
  409. .. rst-class:: classref-enumeration-constant
  410. :ref:`SelectMode<enum_Tree_SelectMode>` **SELECT_MULTI** = ``2``
  411. Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item.
  412. The focus cursor is visible in this mode, the item or column under the cursor is not necessarily selected.
  413. .. rst-class:: classref-item-separator
  414. ----
  415. .. _enum_Tree_DropModeFlags:
  416. .. rst-class:: classref-enumeration
  417. enum **DropModeFlags**: :ref:`🔗<enum_Tree_DropModeFlags>`
  418. .. _class_Tree_constant_DROP_MODE_DISABLED:
  419. .. rst-class:: classref-enumeration-constant
  420. :ref:`DropModeFlags<enum_Tree_DropModeFlags>` **DROP_MODE_DISABLED** = ``0``
  421. Disables all drop sections, but still allows to detect the "on item" drop section by :ref:`get_drop_section_at_position()<class_Tree_method_get_drop_section_at_position>`.
  422. \ **Note:** This is the default flag, it has no effect when combined with other flags.
  423. .. _class_Tree_constant_DROP_MODE_ON_ITEM:
  424. .. rst-class:: classref-enumeration-constant
  425. :ref:`DropModeFlags<enum_Tree_DropModeFlags>` **DROP_MODE_ON_ITEM** = ``1``
  426. Enables the "on item" drop section. This drop section covers the entire item.
  427. When combined with :ref:`DROP_MODE_INBETWEEN<class_Tree_constant_DROP_MODE_INBETWEEN>`, this drop section halves the height and stays centered vertically.
  428. .. _class_Tree_constant_DROP_MODE_INBETWEEN:
  429. .. rst-class:: classref-enumeration-constant
  430. :ref:`DropModeFlags<enum_Tree_DropModeFlags>` **DROP_MODE_INBETWEEN** = ``2``
  431. Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half.
  432. When combined with :ref:`DROP_MODE_ON_ITEM<class_Tree_constant_DROP_MODE_ON_ITEM>`, these drop sections halves the height and stays on top / bottom accordingly.
  433. .. rst-class:: classref-section-separator
  434. ----
  435. .. rst-class:: classref-descriptions-group
  436. Property Descriptions
  437. ---------------------
  438. .. _class_Tree_property_allow_reselect:
  439. .. rst-class:: classref-property
  440. :ref:`bool<class_bool>` **allow_reselect** = ``false`` :ref:`🔗<class_Tree_property_allow_reselect>`
  441. .. rst-class:: classref-property-setget
  442. - |void| **set_allow_reselect**\ (\ value\: :ref:`bool<class_bool>`\ )
  443. - :ref:`bool<class_bool>` **get_allow_reselect**\ (\ )
  444. If ``true``, the currently selected cell may be selected again.
  445. .. rst-class:: classref-item-separator
  446. ----
  447. .. _class_Tree_property_allow_rmb_select:
  448. .. rst-class:: classref-property
  449. :ref:`bool<class_bool>` **allow_rmb_select** = ``false`` :ref:`🔗<class_Tree_property_allow_rmb_select>`
  450. .. rst-class:: classref-property-setget
  451. - |void| **set_allow_rmb_select**\ (\ value\: :ref:`bool<class_bool>`\ )
  452. - :ref:`bool<class_bool>` **get_allow_rmb_select**\ (\ )
  453. If ``true``, a right mouse button click can select items.
  454. .. rst-class:: classref-item-separator
  455. ----
  456. .. _class_Tree_property_allow_search:
  457. .. rst-class:: classref-property
  458. :ref:`bool<class_bool>` **allow_search** = ``true`` :ref:`🔗<class_Tree_property_allow_search>`
  459. .. rst-class:: classref-property-setget
  460. - |void| **set_allow_search**\ (\ value\: :ref:`bool<class_bool>`\ )
  461. - :ref:`bool<class_bool>` **get_allow_search**\ (\ )
  462. If ``true``, allows navigating the **Tree** with letter keys through incremental search.
  463. .. rst-class:: classref-item-separator
  464. ----
  465. .. _class_Tree_property_auto_tooltip:
  466. .. rst-class:: classref-property
  467. :ref:`bool<class_bool>` **auto_tooltip** = ``true`` :ref:`🔗<class_Tree_property_auto_tooltip>`
  468. .. rst-class:: classref-property-setget
  469. - |void| **set_auto_tooltip**\ (\ value\: :ref:`bool<class_bool>`\ )
  470. - :ref:`bool<class_bool>` **is_auto_tooltip_enabled**\ (\ )
  471. If ``true``, tree items with no tooltip assigned display their text as their tooltip. See also :ref:`TreeItem.get_tooltip_text()<class_TreeItem_method_get_tooltip_text>` and :ref:`TreeItem.get_button_tooltip_text()<class_TreeItem_method_get_button_tooltip_text>`.
  472. .. rst-class:: classref-item-separator
  473. ----
  474. .. _class_Tree_property_column_titles_visible:
  475. .. rst-class:: classref-property
  476. :ref:`bool<class_bool>` **column_titles_visible** = ``false`` :ref:`🔗<class_Tree_property_column_titles_visible>`
  477. .. rst-class:: classref-property-setget
  478. - |void| **set_column_titles_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
  479. - :ref:`bool<class_bool>` **are_column_titles_visible**\ (\ )
  480. If ``true``, column titles are visible.
  481. .. rst-class:: classref-item-separator
  482. ----
  483. .. _class_Tree_property_columns:
  484. .. rst-class:: classref-property
  485. :ref:`int<class_int>` **columns** = ``1`` :ref:`🔗<class_Tree_property_columns>`
  486. .. rst-class:: classref-property-setget
  487. - |void| **set_columns**\ (\ value\: :ref:`int<class_int>`\ )
  488. - :ref:`int<class_int>` **get_columns**\ (\ )
  489. The number of columns.
  490. .. rst-class:: classref-item-separator
  491. ----
  492. .. _class_Tree_property_drop_mode_flags:
  493. .. rst-class:: classref-property
  494. :ref:`int<class_int>` **drop_mode_flags** = ``0`` :ref:`🔗<class_Tree_property_drop_mode_flags>`
  495. .. rst-class:: classref-property-setget
  496. - |void| **set_drop_mode_flags**\ (\ value\: :ref:`int<class_int>`\ )
  497. - :ref:`int<class_int>` **get_drop_mode_flags**\ (\ )
  498. The drop mode as an OR combination of flags. See :ref:`DropModeFlags<enum_Tree_DropModeFlags>` constants. Once dropping is done, reverts to :ref:`DROP_MODE_DISABLED<class_Tree_constant_DROP_MODE_DISABLED>`. Setting this during :ref:`Control._can_drop_data()<class_Control_private_method__can_drop_data>` is recommended.
  499. This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position.
  500. .. rst-class:: classref-item-separator
  501. ----
  502. .. _class_Tree_property_enable_recursive_folding:
  503. .. rst-class:: classref-property
  504. :ref:`bool<class_bool>` **enable_recursive_folding** = ``true`` :ref:`🔗<class_Tree_property_enable_recursive_folding>`
  505. .. rst-class:: classref-property-setget
  506. - |void| **set_enable_recursive_folding**\ (\ value\: :ref:`bool<class_bool>`\ )
  507. - :ref:`bool<class_bool>` **is_recursive_folding_enabled**\ (\ )
  508. If ``true``, recursive folding is enabled for this **Tree**. Holding down :kbd:`Shift` while clicking the fold arrow or using ``ui_right``/``ui_left`` shortcuts collapses or uncollapses the :ref:`TreeItem<class_TreeItem>` and all its descendants.
  509. .. rst-class:: classref-item-separator
  510. ----
  511. .. _class_Tree_property_hide_folding:
  512. .. rst-class:: classref-property
  513. :ref:`bool<class_bool>` **hide_folding** = ``false`` :ref:`🔗<class_Tree_property_hide_folding>`
  514. .. rst-class:: classref-property-setget
  515. - |void| **set_hide_folding**\ (\ value\: :ref:`bool<class_bool>`\ )
  516. - :ref:`bool<class_bool>` **is_folding_hidden**\ (\ )
  517. If ``true``, the folding arrow is hidden.
  518. .. rst-class:: classref-item-separator
  519. ----
  520. .. _class_Tree_property_hide_root:
  521. .. rst-class:: classref-property
  522. :ref:`bool<class_bool>` **hide_root** = ``false`` :ref:`🔗<class_Tree_property_hide_root>`
  523. .. rst-class:: classref-property-setget
  524. - |void| **set_hide_root**\ (\ value\: :ref:`bool<class_bool>`\ )
  525. - :ref:`bool<class_bool>` **is_root_hidden**\ (\ )
  526. If ``true``, the tree's root is hidden.
  527. .. rst-class:: classref-item-separator
  528. ----
  529. .. _class_Tree_property_scroll_horizontal_enabled:
  530. .. rst-class:: classref-property
  531. :ref:`bool<class_bool>` **scroll_horizontal_enabled** = ``true`` :ref:`🔗<class_Tree_property_scroll_horizontal_enabled>`
  532. .. rst-class:: classref-property-setget
  533. - |void| **set_h_scroll_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  534. - :ref:`bool<class_bool>` **is_h_scroll_enabled**\ (\ )
  535. If ``true``, enables horizontal scrolling.
  536. .. rst-class:: classref-item-separator
  537. ----
  538. .. _class_Tree_property_scroll_vertical_enabled:
  539. .. rst-class:: classref-property
  540. :ref:`bool<class_bool>` **scroll_vertical_enabled** = ``true`` :ref:`🔗<class_Tree_property_scroll_vertical_enabled>`
  541. .. rst-class:: classref-property-setget
  542. - |void| **set_v_scroll_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  543. - :ref:`bool<class_bool>` **is_v_scroll_enabled**\ (\ )
  544. If ``true``, enables vertical scrolling.
  545. .. rst-class:: classref-item-separator
  546. ----
  547. .. _class_Tree_property_select_mode:
  548. .. rst-class:: classref-property
  549. :ref:`SelectMode<enum_Tree_SelectMode>` **select_mode** = ``0`` :ref:`🔗<class_Tree_property_select_mode>`
  550. .. rst-class:: classref-property-setget
  551. - |void| **set_select_mode**\ (\ value\: :ref:`SelectMode<enum_Tree_SelectMode>`\ )
  552. - :ref:`SelectMode<enum_Tree_SelectMode>` **get_select_mode**\ (\ )
  553. Allows single or multiple selection. See the :ref:`SelectMode<enum_Tree_SelectMode>` constants.
  554. .. rst-class:: classref-section-separator
  555. ----
  556. .. rst-class:: classref-descriptions-group
  557. Method Descriptions
  558. -------------------
  559. .. _class_Tree_method_clear:
  560. .. rst-class:: classref-method
  561. |void| **clear**\ (\ ) :ref:`🔗<class_Tree_method_clear>`
  562. Clears the tree. This removes all items.
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _class_Tree_method_create_item:
  566. .. rst-class:: classref-method
  567. :ref:`TreeItem<class_TreeItem>` **create_item**\ (\ parent\: :ref:`TreeItem<class_TreeItem>` = null, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_Tree_method_create_item>`
  568. Creates an item in the tree and adds it as a child of ``parent``, which can be either a valid :ref:`TreeItem<class_TreeItem>` or ``null``.
  569. If ``parent`` is ``null``, the root item will be the parent, or the new item will be the root itself if the tree is empty.
  570. The new item will be the ``index``-th child of parent, or it will be the last child if there are not enough siblings.
  571. .. rst-class:: classref-item-separator
  572. ----
  573. .. _class_Tree_method_deselect_all:
  574. .. rst-class:: classref-method
  575. |void| **deselect_all**\ (\ ) :ref:`🔗<class_Tree_method_deselect_all>`
  576. Deselects all tree items (rows and columns). In :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>` mode also removes selection cursor.
  577. .. rst-class:: classref-item-separator
  578. ----
  579. .. _class_Tree_method_edit_selected:
  580. .. rst-class:: classref-method
  581. :ref:`bool<class_bool>` **edit_selected**\ (\ force_edit\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Tree_method_edit_selected>`
  582. Edits the selected tree item as if it was clicked.
  583. Either the item must be set editable with :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>` or ``force_edit`` must be ``true``.
  584. Returns ``true`` if the item could be edited. Fails if no item is selected.
  585. .. rst-class:: classref-item-separator
  586. ----
  587. .. _class_Tree_method_ensure_cursor_is_visible:
  588. .. rst-class:: classref-method
  589. |void| **ensure_cursor_is_visible**\ (\ ) :ref:`🔗<class_Tree_method_ensure_cursor_is_visible>`
  590. Makes the currently focused cell visible.
  591. This will scroll the tree if necessary. In :ref:`SELECT_ROW<class_Tree_constant_SELECT_ROW>` mode, this will not do horizontal scrolling, as all the cells in the selected row is focused logically.
  592. \ **Note:** Despite the name of this method, the focus cursor itself is only visible in :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>` mode.
  593. .. rst-class:: classref-item-separator
  594. ----
  595. .. _class_Tree_method_get_button_id_at_position:
  596. .. rst-class:: classref-method
  597. :ref:`int<class_int>` **get_button_id_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_button_id_at_position>`
  598. Returns the button ID at ``position``, or -1 if no button is there.
  599. .. rst-class:: classref-item-separator
  600. ----
  601. .. _class_Tree_method_get_column_at_position:
  602. .. rst-class:: classref-method
  603. :ref:`int<class_int>` **get_column_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_at_position>`
  604. Returns the column index at ``position``, or -1 if no item is there.
  605. .. rst-class:: classref-item-separator
  606. ----
  607. .. _class_Tree_method_get_column_expand_ratio:
  608. .. rst-class:: classref-method
  609. :ref:`int<class_int>` **get_column_expand_ratio**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_expand_ratio>`
  610. Returns the expand ratio assigned to the column.
  611. .. rst-class:: classref-item-separator
  612. ----
  613. .. _class_Tree_method_get_column_title:
  614. .. rst-class:: classref-method
  615. :ref:`String<class_String>` **get_column_title**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title>`
  616. Returns the column's title.
  617. .. rst-class:: classref-item-separator
  618. ----
  619. .. _class_Tree_method_get_column_title_alignment:
  620. .. rst-class:: classref-method
  621. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_column_title_alignment**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_alignment>`
  622. Returns the column title alignment.
  623. .. rst-class:: classref-item-separator
  624. ----
  625. .. _class_Tree_method_get_column_title_direction:
  626. .. rst-class:: classref-method
  627. :ref:`TextDirection<enum_Control_TextDirection>` **get_column_title_direction**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_direction>`
  628. Returns column title base writing direction.
  629. .. rst-class:: classref-item-separator
  630. ----
  631. .. _class_Tree_method_get_column_title_language:
  632. .. rst-class:: classref-method
  633. :ref:`String<class_String>` **get_column_title_language**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_language>`
  634. Returns column title language code.
  635. .. rst-class:: classref-item-separator
  636. ----
  637. .. _class_Tree_method_get_column_width:
  638. .. rst-class:: classref-method
  639. :ref:`int<class_int>` **get_column_width**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_width>`
  640. Returns the column's width in pixels.
  641. .. rst-class:: classref-item-separator
  642. ----
  643. .. _class_Tree_method_get_custom_popup_rect:
  644. .. rst-class:: classref-method
  645. :ref:`Rect2<class_Rect2>` **get_custom_popup_rect**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_custom_popup_rect>`
  646. Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See :ref:`TreeItem.set_cell_mode()<class_TreeItem_method_set_cell_mode>`.
  647. .. rst-class:: classref-item-separator
  648. ----
  649. .. _class_Tree_method_get_drop_section_at_position:
  650. .. rst-class:: classref-method
  651. :ref:`int<class_int>` **get_drop_section_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_drop_section_at_position>`
  652. Returns the drop section at ``position``, or -100 if no item is there.
  653. Values -1, 0, or 1 will be returned for the "above item", "on item", and "below item" drop sections, respectively. See :ref:`DropModeFlags<enum_Tree_DropModeFlags>` for a description of each drop section.
  654. To get the item which the returned drop section is relative to, use :ref:`get_item_at_position()<class_Tree_method_get_item_at_position>`.
  655. .. rst-class:: classref-item-separator
  656. ----
  657. .. _class_Tree_method_get_edited:
  658. .. rst-class:: classref-method
  659. :ref:`TreeItem<class_TreeItem>` **get_edited**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_edited>`
  660. Returns the currently edited item. Can be used with :ref:`item_edited<class_Tree_signal_item_edited>` to get the item that was modified.
  661. .. tabs::
  662. .. code-tab:: gdscript
  663. func _ready():
  664. $Tree.item_edited.connect(on_Tree_item_edited)
  665. func on_Tree_item_edited():
  666. print($Tree.get_edited()) # This item just got edited (e.g. checked).
  667. .. code-tab:: csharp
  668. public override void _Ready()
  669. {
  670. GetNode<Tree>("Tree").ItemEdited += OnTreeItemEdited;
  671. }
  672. public void OnTreeItemEdited()
  673. {
  674. GD.Print(GetNode<Tree>("Tree").GetEdited()); // This item just got edited (e.g. checked).
  675. }
  676. .. rst-class:: classref-item-separator
  677. ----
  678. .. _class_Tree_method_get_edited_column:
  679. .. rst-class:: classref-method
  680. :ref:`int<class_int>` **get_edited_column**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_edited_column>`
  681. Returns the column for the currently edited item.
  682. .. rst-class:: classref-item-separator
  683. ----
  684. .. _class_Tree_method_get_item_area_rect:
  685. .. rst-class:: classref-method
  686. :ref:`Rect2<class_Rect2>` **get_item_area_rect**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>` = -1, button_index\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_Tree_method_get_item_area_rect>`
  687. Returns the rectangle area for the specified :ref:`TreeItem<class_TreeItem>`. If ``column`` is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned.
  688. .. rst-class:: classref-item-separator
  689. ----
  690. .. _class_Tree_method_get_item_at_position:
  691. .. rst-class:: classref-method
  692. :ref:`TreeItem<class_TreeItem>` **get_item_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_item_at_position>`
  693. Returns the tree item at the specified position (relative to the tree origin position).
  694. .. rst-class:: classref-item-separator
  695. ----
  696. .. _class_Tree_method_get_next_selected:
  697. .. rst-class:: classref-method
  698. :ref:`TreeItem<class_TreeItem>` **get_next_selected**\ (\ from\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_Tree_method_get_next_selected>`
  699. Returns the next selected :ref:`TreeItem<class_TreeItem>` after the given one, or ``null`` if the end is reached.
  700. If ``from`` is ``null``, this returns the first selected item.
  701. .. rst-class:: classref-item-separator
  702. ----
  703. .. _class_Tree_method_get_pressed_button:
  704. .. rst-class:: classref-method
  705. :ref:`int<class_int>` **get_pressed_button**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_pressed_button>`
  706. Returns the last pressed button's index.
  707. .. rst-class:: classref-item-separator
  708. ----
  709. .. _class_Tree_method_get_root:
  710. .. rst-class:: classref-method
  711. :ref:`TreeItem<class_TreeItem>` **get_root**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_root>`
  712. Returns the tree's root item, or ``null`` if the tree is empty.
  713. .. rst-class:: classref-item-separator
  714. ----
  715. .. _class_Tree_method_get_scroll:
  716. .. rst-class:: classref-method
  717. :ref:`Vector2<class_Vector2>` **get_scroll**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_scroll>`
  718. Returns the current scrolling position.
  719. .. rst-class:: classref-item-separator
  720. ----
  721. .. _class_Tree_method_get_selected:
  722. .. rst-class:: classref-method
  723. :ref:`TreeItem<class_TreeItem>` **get_selected**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_selected>`
  724. Returns the currently focused item, or ``null`` if no item is focused.
  725. In :ref:`SELECT_ROW<class_Tree_constant_SELECT_ROW>` and :ref:`SELECT_SINGLE<class_Tree_constant_SELECT_SINGLE>` modes, the focused item is same as the selected item. In :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>` mode, the focused item is the item under the focus cursor, not necessarily selected.
  726. To get the currently selected item(s), use :ref:`get_next_selected()<class_Tree_method_get_next_selected>`.
  727. .. rst-class:: classref-item-separator
  728. ----
  729. .. _class_Tree_method_get_selected_column:
  730. .. rst-class:: classref-method
  731. :ref:`int<class_int>` **get_selected_column**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_selected_column>`
  732. Returns the currently focused column, or -1 if no column is focused.
  733. In :ref:`SELECT_SINGLE<class_Tree_constant_SELECT_SINGLE>` mode, the focused column is the selected column. In :ref:`SELECT_ROW<class_Tree_constant_SELECT_ROW>` mode, the focused column is always 0 if any item is selected. In :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>` mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected.
  734. To tell whether a column of an item is selected, use :ref:`TreeItem.is_selected()<class_TreeItem_method_is_selected>`.
  735. .. rst-class:: classref-item-separator
  736. ----
  737. .. _class_Tree_method_is_column_clipping_content:
  738. .. rst-class:: classref-method
  739. :ref:`bool<class_bool>` **is_column_clipping_content**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_is_column_clipping_content>`
  740. Returns ``true`` if the column has enabled clipping (see :ref:`set_column_clip_content()<class_Tree_method_set_column_clip_content>`).
  741. .. rst-class:: classref-item-separator
  742. ----
  743. .. _class_Tree_method_is_column_expanding:
  744. .. rst-class:: classref-method
  745. :ref:`bool<class_bool>` **is_column_expanding**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_is_column_expanding>`
  746. Returns ``true`` if the column has enabled expanding (see :ref:`set_column_expand()<class_Tree_method_set_column_expand>`).
  747. .. rst-class:: classref-item-separator
  748. ----
  749. .. _class_Tree_method_scroll_to_item:
  750. .. rst-class:: classref-method
  751. |void| **scroll_to_item**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, center_on_item\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Tree_method_scroll_to_item>`
  752. Causes the **Tree** to jump to the specified :ref:`TreeItem<class_TreeItem>`.
  753. .. rst-class:: classref-item-separator
  754. ----
  755. .. _class_Tree_method_set_column_clip_content:
  756. .. rst-class:: classref-method
  757. |void| **set_column_clip_content**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_method_set_column_clip_content>`
  758. Allows to enable clipping for column's content, making the content size ignored.
  759. .. rst-class:: classref-item-separator
  760. ----
  761. .. _class_Tree_method_set_column_custom_minimum_width:
  762. .. rst-class:: classref-method
  763. |void| **set_column_custom_minimum_width**\ (\ column\: :ref:`int<class_int>`, min_width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_method_set_column_custom_minimum_width>`
  764. Overrides the calculated minimum width of a column. It can be set to ``0`` to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to :ref:`Control.size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>`.
  765. .. rst-class:: classref-item-separator
  766. ----
  767. .. _class_Tree_method_set_column_expand:
  768. .. rst-class:: classref-method
  769. |void| **set_column_expand**\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_method_set_column_expand>`
  770. If ``true``, the column will have the "Expand" flag of :ref:`Control<class_Control>`. Columns that have the "Expand" flag will use their expand ratio in a similar fashion to :ref:`Control.size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>` (see :ref:`set_column_expand_ratio()<class_Tree_method_set_column_expand_ratio>`).
  771. .. rst-class:: classref-item-separator
  772. ----
  773. .. _class_Tree_method_set_column_expand_ratio:
  774. .. rst-class:: classref-method
  775. |void| **set_column_expand_ratio**\ (\ column\: :ref:`int<class_int>`, ratio\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_method_set_column_expand_ratio>`
  776. Sets the relative expand ratio for a column. See :ref:`set_column_expand()<class_Tree_method_set_column_expand>`.
  777. .. rst-class:: classref-item-separator
  778. ----
  779. .. _class_Tree_method_set_column_title:
  780. .. rst-class:: classref-method
  781. |void| **set_column_title**\ (\ column\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Tree_method_set_column_title>`
  782. Sets the title of a column.
  783. .. rst-class:: classref-item-separator
  784. ----
  785. .. _class_Tree_method_set_column_title_alignment:
  786. .. rst-class:: classref-method
  787. |void| **set_column_title_alignment**\ (\ column\: :ref:`int<class_int>`, title_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) :ref:`🔗<class_Tree_method_set_column_title_alignment>`
  788. Sets the column title alignment. Note that :ref:`@GlobalScope.HORIZONTAL_ALIGNMENT_FILL<class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_FILL>` is not supported for column titles.
  789. .. rst-class:: classref-item-separator
  790. ----
  791. .. _class_Tree_method_set_column_title_direction:
  792. .. rst-class:: classref-method
  793. |void| **set_column_title_direction**\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_Tree_method_set_column_title_direction>`
  794. Sets column title base writing direction.
  795. .. rst-class:: classref-item-separator
  796. ----
  797. .. _class_Tree_method_set_column_title_language:
  798. .. rst-class:: classref-method
  799. |void| **set_column_title_language**\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Tree_method_set_column_title_language>`
  800. Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  801. .. rst-class:: classref-item-separator
  802. ----
  803. .. _class_Tree_method_set_selected:
  804. .. rst-class:: classref-method
  805. |void| **set_selected**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_method_set_selected>`
  806. Selects the specified :ref:`TreeItem<class_TreeItem>` and column.
  807. .. rst-class:: classref-section-separator
  808. ----
  809. .. rst-class:: classref-descriptions-group
  810. Theme Property Descriptions
  811. ---------------------------
  812. .. _class_Tree_theme_color_children_hl_line_color:
  813. .. rst-class:: classref-themeproperty
  814. :ref:`Color<class_Color>` **children_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` :ref:`🔗<class_Tree_theme_color_children_hl_line_color>`
  815. The :ref:`Color<class_Color>` of the relationship lines between the selected :ref:`TreeItem<class_TreeItem>` and its children.
  816. .. rst-class:: classref-item-separator
  817. ----
  818. .. _class_Tree_theme_color_custom_button_font_highlight:
  819. .. rst-class:: classref-themeproperty
  820. :ref:`Color<class_Color>` **custom_button_font_highlight** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_Tree_theme_color_custom_button_font_highlight>`
  821. Text :ref:`Color<class_Color>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode cell when it's hovered.
  822. .. rst-class:: classref-item-separator
  823. ----
  824. .. _class_Tree_theme_color_drop_position_color:
  825. .. rst-class:: classref-themeproperty
  826. :ref:`Color<class_Color>` **drop_position_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Tree_theme_color_drop_position_color>`
  827. :ref:`Color<class_Color>` used to draw possible drop locations. See :ref:`DropModeFlags<enum_Tree_DropModeFlags>` constants for further description of drop locations.
  828. .. rst-class:: classref-item-separator
  829. ----
  830. .. _class_Tree_theme_color_font_color:
  831. .. rst-class:: classref-themeproperty
  832. :ref:`Color<class_Color>` **font_color** = ``Color(0.7, 0.7, 0.7, 1)`` :ref:`🔗<class_Tree_theme_color_font_color>`
  833. Default text :ref:`Color<class_Color>` of the item.
  834. .. rst-class:: classref-item-separator
  835. ----
  836. .. _class_Tree_theme_color_font_disabled_color:
  837. .. rst-class:: classref-themeproperty
  838. :ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_Tree_theme_color_font_disabled_color>`
  839. Text :ref:`Color<class_Color>` for a :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell when it's non-editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
  840. .. rst-class:: classref-item-separator
  841. ----
  842. .. _class_Tree_theme_color_font_hovered_color:
  843. .. rst-class:: classref-themeproperty
  844. :ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_Tree_theme_color_font_hovered_color>`
  845. Text :ref:`Color<class_Color>` used when the item is hovered.
  846. .. rst-class:: classref-item-separator
  847. ----
  848. .. _class_Tree_theme_color_font_hovered_dimmed_color:
  849. .. rst-class:: classref-themeproperty
  850. :ref:`Color<class_Color>` **font_hovered_dimmed_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_Tree_theme_color_font_hovered_dimmed_color>`
  851. Text :ref:`Color<class_Color>` used when the item is hovered, while a button of the same item is hovered as the same time.
  852. .. rst-class:: classref-item-separator
  853. ----
  854. .. _class_Tree_theme_color_font_outline_color:
  855. .. rst-class:: classref-themeproperty
  856. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Tree_theme_color_font_outline_color>`
  857. The tint of text outline of the item.
  858. .. rst-class:: classref-item-separator
  859. ----
  860. .. _class_Tree_theme_color_font_selected_color:
  861. .. rst-class:: classref-themeproperty
  862. :ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Tree_theme_color_font_selected_color>`
  863. Text :ref:`Color<class_Color>` used when the item is selected.
  864. .. rst-class:: classref-item-separator
  865. ----
  866. .. _class_Tree_theme_color_guide_color:
  867. .. rst-class:: classref-themeproperty
  868. :ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`🔗<class_Tree_theme_color_guide_color>`
  869. :ref:`Color<class_Color>` of the guideline.
  870. .. rst-class:: classref-item-separator
  871. ----
  872. .. _class_Tree_theme_color_parent_hl_line_color:
  873. .. rst-class:: classref-themeproperty
  874. :ref:`Color<class_Color>` **parent_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` :ref:`🔗<class_Tree_theme_color_parent_hl_line_color>`
  875. The :ref:`Color<class_Color>` of the relationship lines between the selected :ref:`TreeItem<class_TreeItem>` and its parents.
  876. .. rst-class:: classref-item-separator
  877. ----
  878. .. _class_Tree_theme_color_relationship_line_color:
  879. .. rst-class:: classref-themeproperty
  880. :ref:`Color<class_Color>` **relationship_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` :ref:`🔗<class_Tree_theme_color_relationship_line_color>`
  881. The default :ref:`Color<class_Color>` of the relationship lines.
  882. .. rst-class:: classref-item-separator
  883. ----
  884. .. _class_Tree_theme_color_title_button_color:
  885. .. rst-class:: classref-themeproperty
  886. :ref:`Color<class_Color>` **title_button_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_Tree_theme_color_title_button_color>`
  887. Default text :ref:`Color<class_Color>` of the title button.
  888. .. rst-class:: classref-item-separator
  889. ----
  890. .. _class_Tree_theme_constant_button_margin:
  891. .. rst-class:: classref-themeproperty
  892. :ref:`int<class_int>` **button_margin** = ``4`` :ref:`🔗<class_Tree_theme_constant_button_margin>`
  893. The horizontal space between each button in a cell.
  894. .. rst-class:: classref-item-separator
  895. ----
  896. .. _class_Tree_theme_constant_children_hl_line_width:
  897. .. rst-class:: classref-themeproperty
  898. :ref:`int<class_int>` **children_hl_line_width** = ``1`` :ref:`🔗<class_Tree_theme_constant_children_hl_line_width>`
  899. The width of the relationship lines between the selected :ref:`TreeItem<class_TreeItem>` and its children.
  900. .. rst-class:: classref-item-separator
  901. ----
  902. .. _class_Tree_theme_constant_draw_guides:
  903. .. rst-class:: classref-themeproperty
  904. :ref:`int<class_int>` **draw_guides** = ``1`` :ref:`🔗<class_Tree_theme_constant_draw_guides>`
  905. Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item.
  906. .. rst-class:: classref-item-separator
  907. ----
  908. .. _class_Tree_theme_constant_draw_relationship_lines:
  909. .. rst-class:: classref-themeproperty
  910. :ref:`int<class_int>` **draw_relationship_lines** = ``0`` :ref:`🔗<class_Tree_theme_constant_draw_relationship_lines>`
  911. Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy.
  912. .. rst-class:: classref-item-separator
  913. ----
  914. .. _class_Tree_theme_constant_h_separation:
  915. .. rst-class:: classref-themeproperty
  916. :ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_h_separation>`
  917. The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled.
  918. .. rst-class:: classref-item-separator
  919. ----
  920. .. _class_Tree_theme_constant_icon_max_width:
  921. .. rst-class:: classref-themeproperty
  922. :ref:`int<class_int>` **icon_max_width** = ``0`` :ref:`🔗<class_Tree_theme_constant_icon_max_width>`
  923. The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TreeItem.set_icon_max_width()<class_TreeItem_method_set_icon_max_width>`. The height is adjusted according to the icon's ratio.
  924. .. rst-class:: classref-item-separator
  925. ----
  926. .. _class_Tree_theme_constant_inner_item_margin_bottom:
  927. .. rst-class:: classref-themeproperty
  928. :ref:`int<class_int>` **inner_item_margin_bottom** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_bottom>`
  929. The inner bottom margin of a cell.
  930. .. rst-class:: classref-item-separator
  931. ----
  932. .. _class_Tree_theme_constant_inner_item_margin_left:
  933. .. rst-class:: classref-themeproperty
  934. :ref:`int<class_int>` **inner_item_margin_left** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_left>`
  935. The inner left margin of a cell.
  936. .. rst-class:: classref-item-separator
  937. ----
  938. .. _class_Tree_theme_constant_inner_item_margin_right:
  939. .. rst-class:: classref-themeproperty
  940. :ref:`int<class_int>` **inner_item_margin_right** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_right>`
  941. The inner right margin of a cell.
  942. .. rst-class:: classref-item-separator
  943. ----
  944. .. _class_Tree_theme_constant_inner_item_margin_top:
  945. .. rst-class:: classref-themeproperty
  946. :ref:`int<class_int>` **inner_item_margin_top** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_top>`
  947. The inner top margin of a cell.
  948. .. rst-class:: classref-item-separator
  949. ----
  950. .. _class_Tree_theme_constant_item_margin:
  951. .. rst-class:: classref-themeproperty
  952. :ref:`int<class_int>` **item_margin** = ``16`` :ref:`🔗<class_Tree_theme_constant_item_margin>`
  953. The horizontal margin at the start of an item. This is used when folding is enabled for the item.
  954. .. rst-class:: classref-item-separator
  955. ----
  956. .. _class_Tree_theme_constant_outline_size:
  957. .. rst-class:: classref-themeproperty
  958. :ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_Tree_theme_constant_outline_size>`
  959. The size of the text outline.
  960. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_Tree_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  961. .. rst-class:: classref-item-separator
  962. ----
  963. .. _class_Tree_theme_constant_parent_hl_line_margin:
  964. .. rst-class:: classref-themeproperty
  965. :ref:`int<class_int>` **parent_hl_line_margin** = ``0`` :ref:`🔗<class_Tree_theme_constant_parent_hl_line_margin>`
  966. The space between the parent relationship lines for the selected :ref:`TreeItem<class_TreeItem>` and the relationship lines to its siblings that are not selected.
  967. .. rst-class:: classref-item-separator
  968. ----
  969. .. _class_Tree_theme_constant_parent_hl_line_width:
  970. .. rst-class:: classref-themeproperty
  971. :ref:`int<class_int>` **parent_hl_line_width** = ``1`` :ref:`🔗<class_Tree_theme_constant_parent_hl_line_width>`
  972. The width of the relationship lines between the selected :ref:`TreeItem<class_TreeItem>` and its parents.
  973. .. rst-class:: classref-item-separator
  974. ----
  975. .. _class_Tree_theme_constant_relationship_line_width:
  976. .. rst-class:: classref-themeproperty
  977. :ref:`int<class_int>` **relationship_line_width** = ``1`` :ref:`🔗<class_Tree_theme_constant_relationship_line_width>`
  978. The default width of the relationship lines.
  979. .. rst-class:: classref-item-separator
  980. ----
  981. .. _class_Tree_theme_constant_scroll_border:
  982. .. rst-class:: classref-themeproperty
  983. :ref:`int<class_int>` **scroll_border** = ``4`` :ref:`🔗<class_Tree_theme_constant_scroll_border>`
  984. The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging.
  985. .. rst-class:: classref-item-separator
  986. ----
  987. .. _class_Tree_theme_constant_scroll_speed:
  988. .. rst-class:: classref-themeproperty
  989. :ref:`int<class_int>` **scroll_speed** = ``12`` :ref:`🔗<class_Tree_theme_constant_scroll_speed>`
  990. The speed of border scrolling.
  991. .. rst-class:: classref-item-separator
  992. ----
  993. .. _class_Tree_theme_constant_scrollbar_h_separation:
  994. .. rst-class:: classref-themeproperty
  995. :ref:`int<class_int>` **scrollbar_h_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_scrollbar_h_separation>`
  996. The horizontal separation of tree content and scrollbar.
  997. .. rst-class:: classref-item-separator
  998. ----
  999. .. _class_Tree_theme_constant_scrollbar_margin_bottom:
  1000. .. rst-class:: classref-themeproperty
  1001. :ref:`int<class_int>` **scrollbar_margin_bottom** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_bottom>`
  1002. The bottom margin of the scrollbars. When negative, uses :ref:`panel<class_Tree_theme_style_panel>` bottom margin.
  1003. .. rst-class:: classref-item-separator
  1004. ----
  1005. .. _class_Tree_theme_constant_scrollbar_margin_left:
  1006. .. rst-class:: classref-themeproperty
  1007. :ref:`int<class_int>` **scrollbar_margin_left** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_left>`
  1008. The left margin of the horizontal scrollbar. When negative, uses :ref:`panel<class_Tree_theme_style_panel>` left margin.
  1009. .. rst-class:: classref-item-separator
  1010. ----
  1011. .. _class_Tree_theme_constant_scrollbar_margin_right:
  1012. .. rst-class:: classref-themeproperty
  1013. :ref:`int<class_int>` **scrollbar_margin_right** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_right>`
  1014. The right margin of the scrollbars. When negative, uses :ref:`panel<class_Tree_theme_style_panel>` right margin.
  1015. .. rst-class:: classref-item-separator
  1016. ----
  1017. .. _class_Tree_theme_constant_scrollbar_margin_top:
  1018. .. rst-class:: classref-themeproperty
  1019. :ref:`int<class_int>` **scrollbar_margin_top** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_top>`
  1020. The top margin of the vertical scrollbar. When negative, uses :ref:`panel<class_Tree_theme_style_panel>` top margin.
  1021. .. rst-class:: classref-item-separator
  1022. ----
  1023. .. _class_Tree_theme_constant_scrollbar_v_separation:
  1024. .. rst-class:: classref-themeproperty
  1025. :ref:`int<class_int>` **scrollbar_v_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_scrollbar_v_separation>`
  1026. The vertical separation of tree content and scrollbar.
  1027. .. rst-class:: classref-item-separator
  1028. ----
  1029. .. _class_Tree_theme_constant_v_separation:
  1030. .. rst-class:: classref-themeproperty
  1031. :ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_v_separation>`
  1032. The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border.
  1033. .. rst-class:: classref-item-separator
  1034. ----
  1035. .. _class_Tree_theme_font_font:
  1036. .. rst-class:: classref-themeproperty
  1037. :ref:`Font<class_Font>` **font** :ref:`🔗<class_Tree_theme_font_font>`
  1038. :ref:`Font<class_Font>` of the item's text.
  1039. .. rst-class:: classref-item-separator
  1040. ----
  1041. .. _class_Tree_theme_font_title_button_font:
  1042. .. rst-class:: classref-themeproperty
  1043. :ref:`Font<class_Font>` **title_button_font** :ref:`🔗<class_Tree_theme_font_title_button_font>`
  1044. :ref:`Font<class_Font>` of the title button's text.
  1045. .. rst-class:: classref-item-separator
  1046. ----
  1047. .. _class_Tree_theme_font_size_font_size:
  1048. .. rst-class:: classref-themeproperty
  1049. :ref:`int<class_int>` **font_size** :ref:`🔗<class_Tree_theme_font_size_font_size>`
  1050. Font size of the item's text.
  1051. .. rst-class:: classref-item-separator
  1052. ----
  1053. .. _class_Tree_theme_font_size_title_button_font_size:
  1054. .. rst-class:: classref-themeproperty
  1055. :ref:`int<class_int>` **title_button_font_size** :ref:`🔗<class_Tree_theme_font_size_title_button_font_size>`
  1056. Font size of the title button's text.
  1057. .. rst-class:: classref-item-separator
  1058. ----
  1059. .. _class_Tree_theme_icon_arrow:
  1060. .. rst-class:: classref-themeproperty
  1061. :ref:`Texture2D<class_Texture2D>` **arrow** :ref:`🔗<class_Tree_theme_icon_arrow>`
  1062. The arrow icon used when a foldable item is not collapsed.
  1063. .. rst-class:: classref-item-separator
  1064. ----
  1065. .. _class_Tree_theme_icon_arrow_collapsed:
  1066. .. rst-class:: classref-themeproperty
  1067. :ref:`Texture2D<class_Texture2D>` **arrow_collapsed** :ref:`🔗<class_Tree_theme_icon_arrow_collapsed>`
  1068. The arrow icon used when a foldable item is collapsed (for left-to-right layouts).
  1069. .. rst-class:: classref-item-separator
  1070. ----
  1071. .. _class_Tree_theme_icon_arrow_collapsed_mirrored:
  1072. .. rst-class:: classref-themeproperty
  1073. :ref:`Texture2D<class_Texture2D>` **arrow_collapsed_mirrored** :ref:`🔗<class_Tree_theme_icon_arrow_collapsed_mirrored>`
  1074. The arrow icon used when a foldable item is collapsed (for right-to-left layouts).
  1075. .. rst-class:: classref-item-separator
  1076. ----
  1077. .. _class_Tree_theme_icon_checked:
  1078. .. rst-class:: classref-themeproperty
  1079. :ref:`Texture2D<class_Texture2D>` **checked** :ref:`🔗<class_Tree_theme_icon_checked>`
  1080. The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is checked and editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
  1081. .. rst-class:: classref-item-separator
  1082. ----
  1083. .. _class_Tree_theme_icon_checked_disabled:
  1084. .. rst-class:: classref-themeproperty
  1085. :ref:`Texture2D<class_Texture2D>` **checked_disabled** :ref:`🔗<class_Tree_theme_icon_checked_disabled>`
  1086. The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is checked and non-editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
  1087. .. rst-class:: classref-item-separator
  1088. ----
  1089. .. _class_Tree_theme_icon_indeterminate:
  1090. .. rst-class:: classref-themeproperty
  1091. :ref:`Texture2D<class_Texture2D>` **indeterminate** :ref:`🔗<class_Tree_theme_icon_indeterminate>`
  1092. The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is indeterminate and editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
  1093. .. rst-class:: classref-item-separator
  1094. ----
  1095. .. _class_Tree_theme_icon_indeterminate_disabled:
  1096. .. rst-class:: classref-themeproperty
  1097. :ref:`Texture2D<class_Texture2D>` **indeterminate_disabled** :ref:`🔗<class_Tree_theme_icon_indeterminate_disabled>`
  1098. The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is indeterminate and non-editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
  1099. .. rst-class:: classref-item-separator
  1100. ----
  1101. .. _class_Tree_theme_icon_select_arrow:
  1102. .. rst-class:: classref-themeproperty
  1103. :ref:`Texture2D<class_Texture2D>` **select_arrow** :ref:`🔗<class_Tree_theme_icon_select_arrow>`
  1104. The arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` mode cell.
  1105. .. rst-class:: classref-item-separator
  1106. ----
  1107. .. _class_Tree_theme_icon_unchecked:
  1108. .. rst-class:: classref-themeproperty
  1109. :ref:`Texture2D<class_Texture2D>` **unchecked** :ref:`🔗<class_Tree_theme_icon_unchecked>`
  1110. The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is unchecked and editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
  1111. .. rst-class:: classref-item-separator
  1112. ----
  1113. .. _class_Tree_theme_icon_unchecked_disabled:
  1114. .. rst-class:: classref-themeproperty
  1115. :ref:`Texture2D<class_Texture2D>` **unchecked_disabled** :ref:`🔗<class_Tree_theme_icon_unchecked_disabled>`
  1116. The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is unchecked and non-editable (see :ref:`TreeItem.set_editable()<class_TreeItem_method_set_editable>`).
  1117. .. rst-class:: classref-item-separator
  1118. ----
  1119. .. _class_Tree_theme_icon_updown:
  1120. .. rst-class:: classref-themeproperty
  1121. :ref:`Texture2D<class_Texture2D>` **updown** :ref:`🔗<class_Tree_theme_icon_updown>`
  1122. The updown arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` mode cell.
  1123. .. rst-class:: classref-item-separator
  1124. ----
  1125. .. _class_Tree_theme_style_button_hover:
  1126. .. rst-class:: classref-themeproperty
  1127. :ref:`StyleBox<class_StyleBox>` **button_hover** :ref:`🔗<class_Tree_theme_style_button_hover>`
  1128. :ref:`StyleBox<class_StyleBox>` used when a button in the tree is hovered.
  1129. .. rst-class:: classref-item-separator
  1130. ----
  1131. .. _class_Tree_theme_style_button_pressed:
  1132. .. rst-class:: classref-themeproperty
  1133. :ref:`StyleBox<class_StyleBox>` **button_pressed** :ref:`🔗<class_Tree_theme_style_button_pressed>`
  1134. :ref:`StyleBox<class_StyleBox>` used when a button in the tree is pressed.
  1135. .. rst-class:: classref-item-separator
  1136. ----
  1137. .. _class_Tree_theme_style_cursor:
  1138. .. rst-class:: classref-themeproperty
  1139. :ref:`StyleBox<class_StyleBox>` **cursor** :ref:`🔗<class_Tree_theme_style_cursor>`
  1140. :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **Tree** is being focused.
  1141. .. rst-class:: classref-item-separator
  1142. ----
  1143. .. _class_Tree_theme_style_cursor_unfocused:
  1144. .. rst-class:: classref-themeproperty
  1145. :ref:`StyleBox<class_StyleBox>` **cursor_unfocused** :ref:`🔗<class_Tree_theme_style_cursor_unfocused>`
  1146. :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **Tree** is not being focused.
  1147. .. rst-class:: classref-item-separator
  1148. ----
  1149. .. _class_Tree_theme_style_custom_button:
  1150. .. rst-class:: classref-themeproperty
  1151. :ref:`StyleBox<class_StyleBox>` **custom_button** :ref:`🔗<class_Tree_theme_style_custom_button>`
  1152. Default :ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode cell when button is enabled with :ref:`TreeItem.set_custom_as_button()<class_TreeItem_method_set_custom_as_button>`.
  1153. .. rst-class:: classref-item-separator
  1154. ----
  1155. .. _class_Tree_theme_style_custom_button_hover:
  1156. .. rst-class:: classref-themeproperty
  1157. :ref:`StyleBox<class_StyleBox>` **custom_button_hover** :ref:`🔗<class_Tree_theme_style_custom_button_hover>`
  1158. :ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode button cell when it's hovered.
  1159. .. rst-class:: classref-item-separator
  1160. ----
  1161. .. _class_Tree_theme_style_custom_button_pressed:
  1162. .. rst-class:: classref-themeproperty
  1163. :ref:`StyleBox<class_StyleBox>` **custom_button_pressed** :ref:`🔗<class_Tree_theme_style_custom_button_pressed>`
  1164. :ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode button cell when it's pressed.
  1165. .. rst-class:: classref-item-separator
  1166. ----
  1167. .. _class_Tree_theme_style_focus:
  1168. .. rst-class:: classref-themeproperty
  1169. :ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_Tree_theme_style_focus>`
  1170. The focused style for the **Tree**, drawn on top of everything.
  1171. .. rst-class:: classref-item-separator
  1172. ----
  1173. .. _class_Tree_theme_style_hovered:
  1174. .. rst-class:: classref-themeproperty
  1175. :ref:`StyleBox<class_StyleBox>` **hovered** :ref:`🔗<class_Tree_theme_style_hovered>`
  1176. :ref:`StyleBox<class_StyleBox>` for the item being hovered.
  1177. .. rst-class:: classref-item-separator
  1178. ----
  1179. .. _class_Tree_theme_style_hovered_dimmed:
  1180. .. rst-class:: classref-themeproperty
  1181. :ref:`StyleBox<class_StyleBox>` **hovered_dimmed** :ref:`🔗<class_Tree_theme_style_hovered_dimmed>`
  1182. :ref:`StyleBox<class_StyleBox>` for the item being hovered, while a button of the same item is hovered as the same time.
  1183. .. rst-class:: classref-item-separator
  1184. ----
  1185. .. _class_Tree_theme_style_panel:
  1186. .. rst-class:: classref-themeproperty
  1187. :ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_Tree_theme_style_panel>`
  1188. The background style for the **Tree**.
  1189. .. rst-class:: classref-item-separator
  1190. ----
  1191. .. _class_Tree_theme_style_selected:
  1192. .. rst-class:: classref-themeproperty
  1193. :ref:`StyleBox<class_StyleBox>` **selected** :ref:`🔗<class_Tree_theme_style_selected>`
  1194. :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **Tree** is not being focused.
  1195. .. rst-class:: classref-item-separator
  1196. ----
  1197. .. _class_Tree_theme_style_selected_focus:
  1198. .. rst-class:: classref-themeproperty
  1199. :ref:`StyleBox<class_StyleBox>` **selected_focus** :ref:`🔗<class_Tree_theme_style_selected_focus>`
  1200. :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **Tree** is being focused.
  1201. .. rst-class:: classref-item-separator
  1202. ----
  1203. .. _class_Tree_theme_style_title_button_hover:
  1204. .. rst-class:: classref-themeproperty
  1205. :ref:`StyleBox<class_StyleBox>` **title_button_hover** :ref:`🔗<class_Tree_theme_style_title_button_hover>`
  1206. :ref:`StyleBox<class_StyleBox>` used when the title button is being hovered.
  1207. .. rst-class:: classref-item-separator
  1208. ----
  1209. .. _class_Tree_theme_style_title_button_normal:
  1210. .. rst-class:: classref-themeproperty
  1211. :ref:`StyleBox<class_StyleBox>` **title_button_normal** :ref:`🔗<class_Tree_theme_style_title_button_normal>`
  1212. Default :ref:`StyleBox<class_StyleBox>` for the title button.
  1213. .. rst-class:: classref-item-separator
  1214. ----
  1215. .. _class_Tree_theme_style_title_button_pressed:
  1216. .. rst-class:: classref-themeproperty
  1217. :ref:`StyleBox<class_StyleBox>` **title_button_pressed** :ref:`🔗<class_Tree_theme_style_title_button_pressed>`
  1218. :ref:`StyleBox<class_StyleBox>` used when the title button is being pressed.
  1219. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1220. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1221. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1222. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1223. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1224. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1225. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  1226. .. |void| replace:: :abbr:`void (No return value.)`