class_tree.rst 104 KB

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