class_tree.rst 111 KB

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