class_tabcontainer.rst 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183
  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/TabContainer.xml.
  6. .. _class_TabContainer:
  7. TabContainer
  8. ============
  9. **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A container that creates a tab for each child control, displaying only the active tab's control.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Arranges child controls into a tabbed view, creating a tab for each one. The active tab's corresponding control is made visible, while all other child controls are hidden. Ignores non-control children.
  15. \ **Note:** The drawing of the clickable tabs is handled by this node; :ref:`TabBar<class_TabBar>` is not needed.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Using Containers <../tutorials/ui/gui_containers>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  26. | :ref:`bool<class_bool>` | :ref:`all_tabs_in_front<class_TabContainer_property_all_tabs_in_front>` | ``false`` |
  27. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  28. | :ref:`bool<class_bool>` | :ref:`clip_tabs<class_TabContainer_property_clip_tabs>` | ``true`` |
  29. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  30. | :ref:`int<class_int>` | :ref:`current_tab<class_TabContainer_property_current_tab>` | ``-1`` |
  31. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  32. | :ref:`bool<class_bool>` | :ref:`deselect_enabled<class_TabContainer_property_deselect_enabled>` | ``false`` |
  33. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  34. | :ref:`bool<class_bool>` | :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>` | ``false`` |
  35. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  36. | :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` | :ref:`tab_alignment<class_TabContainer_property_tab_alignment>` | ``0`` |
  37. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  38. | :ref:`FocusMode<enum_Control_FocusMode>` | :ref:`tab_focus_mode<class_TabContainer_property_tab_focus_mode>` | ``2`` |
  39. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  40. | :ref:`TabPosition<enum_TabContainer_TabPosition>` | :ref:`tabs_position<class_TabContainer_property_tabs_position>` | ``0`` |
  41. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  42. | :ref:`int<class_int>` | :ref:`tabs_rearrange_group<class_TabContainer_property_tabs_rearrange_group>` | ``-1`` |
  43. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  44. | :ref:`bool<class_bool>` | :ref:`tabs_visible<class_TabContainer_property_tabs_visible>` | ``true`` |
  45. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  46. | :ref:`bool<class_bool>` | :ref:`use_hidden_tabs_for_min_size<class_TabContainer_property_use_hidden_tabs_for_min_size>` | ``false`` |
  47. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  48. .. rst-class:: classref-reftable-group
  49. Methods
  50. -------
  51. .. table::
  52. :widths: auto
  53. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Control<class_Control>` | :ref:`get_current_tab_control<class_TabContainer_method_get_current_tab_control>`\ (\ ) |const| |
  55. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`Popup<class_Popup>` | :ref:`get_popup<class_TabContainer_method_get_popup>`\ (\ ) |const| |
  57. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`get_previous_tab<class_TabContainer_method_get_previous_tab>`\ (\ ) |const| |
  59. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`TabBar<class_TabBar>` | :ref:`get_tab_bar<class_TabContainer_method_get_tab_bar>`\ (\ ) |const| |
  61. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_button_icon<class_TabContainer_method_get_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  63. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`Control<class_Control>` | :ref:`get_tab_control<class_TabContainer_method_get_tab_control>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  65. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`get_tab_count<class_TabContainer_method_get_tab_count>`\ (\ ) |const| |
  67. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_icon<class_TabContainer_method_get_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  69. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`get_tab_icon_max_width<class_TabContainer_method_get_tab_icon_max_width>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  71. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`int<class_int>` | :ref:`get_tab_idx_at_point<class_TabContainer_method_get_tab_idx_at_point>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| |
  73. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`int<class_int>` | :ref:`get_tab_idx_from_control<class_TabContainer_method_get_tab_idx_from_control>`\ (\ control\: :ref:`Control<class_Control>`\ ) |const| |
  75. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`Variant<class_Variant>` | :ref:`get_tab_metadata<class_TabContainer_method_get_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  77. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`String<class_String>` | :ref:`get_tab_title<class_TabContainer_method_get_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  79. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`String<class_String>` | :ref:`get_tab_tooltip<class_TabContainer_method_get_tab_tooltip>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  81. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`bool<class_bool>` | :ref:`is_tab_disabled<class_TabContainer_method_is_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  83. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`bool<class_bool>` | :ref:`is_tab_hidden<class_TabContainer_method_is_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  85. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`bool<class_bool>` | :ref:`select_next_available<class_TabContainer_method_select_next_available>`\ (\ ) |
  87. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`bool<class_bool>` | :ref:`select_previous_available<class_TabContainer_method_select_previous_available>`\ (\ ) |
  89. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | |void| | :ref:`set_popup<class_TabContainer_method_set_popup>`\ (\ popup\: :ref:`Node<class_Node>`\ ) |
  91. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | |void| | :ref:`set_tab_button_icon<class_TabContainer_method_set_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  93. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | |void| | :ref:`set_tab_disabled<class_TabContainer_method_set_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
  95. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | |void| | :ref:`set_tab_hidden<class_TabContainer_method_set_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) |
  97. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | |void| | :ref:`set_tab_icon<class_TabContainer_method_set_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  99. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | |void| | :ref:`set_tab_icon_max_width<class_TabContainer_method_set_tab_icon_max_width>`\ (\ tab_idx\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) |
  101. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | |void| | :ref:`set_tab_metadata<class_TabContainer_method_set_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) |
  103. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | |void| | :ref:`set_tab_title<class_TabContainer_method_set_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) |
  105. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | |void| | :ref:`set_tab_tooltip<class_TabContainer_method_set_tab_tooltip>`\ (\ tab_idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  107. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. .. rst-class:: classref-reftable-group
  109. Theme Properties
  110. ----------------
  111. .. table::
  112. :widths: auto
  113. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  114. | :ref:`Color<class_Color>` | :ref:`drop_mark_color<class_TabContainer_theme_color_drop_mark_color>` | ``Color(1, 1, 1, 1)`` |
  115. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  116. | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_TabContainer_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  117. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  118. | :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_TabContainer_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  119. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  120. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TabContainer_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
  121. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  122. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_TabContainer_theme_color_font_selected_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  123. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  124. | :ref:`Color<class_Color>` | :ref:`font_unselected_color<class_TabContainer_theme_color_font_unselected_color>` | ``Color(0.7, 0.7, 0.7, 1)`` |
  125. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  126. | :ref:`int<class_int>` | :ref:`icon_max_width<class_TabContainer_theme_constant_icon_max_width>` | ``0`` |
  127. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  128. | :ref:`int<class_int>` | :ref:`icon_separation<class_TabContainer_theme_constant_icon_separation>` | ``4`` |
  129. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  130. | :ref:`int<class_int>` | :ref:`outline_size<class_TabContainer_theme_constant_outline_size>` | ``0`` |
  131. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  132. | :ref:`int<class_int>` | :ref:`side_margin<class_TabContainer_theme_constant_side_margin>` | ``8`` |
  133. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  134. | :ref:`Font<class_Font>` | :ref:`font<class_TabContainer_theme_font_font>` | |
  135. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  136. | :ref:`int<class_int>` | :ref:`font_size<class_TabContainer_theme_font_size_font_size>` | |
  137. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  138. | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement<class_TabContainer_theme_icon_decrement>` | |
  139. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  140. | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_highlight<class_TabContainer_theme_icon_decrement_highlight>` | |
  141. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  142. | :ref:`Texture2D<class_Texture2D>` | :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark>` | |
  143. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  144. | :ref:`Texture2D<class_Texture2D>` | :ref:`increment<class_TabContainer_theme_icon_increment>` | |
  145. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  146. | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_highlight<class_TabContainer_theme_icon_increment_highlight>` | |
  147. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  148. | :ref:`Texture2D<class_Texture2D>` | :ref:`menu<class_TabContainer_theme_icon_menu>` | |
  149. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  150. | :ref:`Texture2D<class_Texture2D>` | :ref:`menu_highlight<class_TabContainer_theme_icon_menu_highlight>` | |
  151. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  152. | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_TabContainer_theme_style_panel>` | |
  153. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  154. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_disabled<class_TabContainer_theme_style_tab_disabled>` | |
  155. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  156. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_focus<class_TabContainer_theme_style_tab_focus>` | |
  157. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  158. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_hovered<class_TabContainer_theme_style_tab_hovered>` | |
  159. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  160. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_selected<class_TabContainer_theme_style_tab_selected>` | |
  161. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  162. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_unselected<class_TabContainer_theme_style_tab_unselected>` | |
  163. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  164. | :ref:`StyleBox<class_StyleBox>` | :ref:`tabbar_background<class_TabContainer_theme_style_tabbar_background>` | |
  165. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  166. .. rst-class:: classref-section-separator
  167. ----
  168. .. rst-class:: classref-descriptions-group
  169. Signals
  170. -------
  171. .. _class_TabContainer_signal_active_tab_rearranged:
  172. .. rst-class:: classref-signal
  173. **active_tab_rearranged**\ (\ idx_to\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_active_tab_rearranged>`
  174. Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`.
  175. .. rst-class:: classref-item-separator
  176. ----
  177. .. _class_TabContainer_signal_pre_popup_pressed:
  178. .. rst-class:: classref-signal
  179. **pre_popup_pressed**\ (\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_pre_popup_pressed>`
  180. Emitted when the **TabContainer**'s :ref:`Popup<class_Popup>` button is clicked. See :ref:`set_popup<class_TabContainer_method_set_popup>` for details.
  181. .. rst-class:: classref-item-separator
  182. ----
  183. .. _class_TabContainer_signal_tab_button_pressed:
  184. .. rst-class:: classref-signal
  185. **tab_button_pressed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_button_pressed>`
  186. Emitted when the user clicks on the button icon on this tab.
  187. .. rst-class:: classref-item-separator
  188. ----
  189. .. _class_TabContainer_signal_tab_changed:
  190. .. rst-class:: classref-signal
  191. **tab_changed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_changed>`
  192. Emitted when switching to another tab.
  193. .. rst-class:: classref-item-separator
  194. ----
  195. .. _class_TabContainer_signal_tab_clicked:
  196. .. rst-class:: classref-signal
  197. **tab_clicked**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_clicked>`
  198. Emitted when a tab is clicked, even if it is the current tab.
  199. .. rst-class:: classref-item-separator
  200. ----
  201. .. _class_TabContainer_signal_tab_hovered:
  202. .. rst-class:: classref-signal
  203. **tab_hovered**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_hovered>`
  204. Emitted when a tab is hovered by the mouse.
  205. .. rst-class:: classref-item-separator
  206. ----
  207. .. _class_TabContainer_signal_tab_selected:
  208. .. rst-class:: classref-signal
  209. **tab_selected**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_selected>`
  210. Emitted when a tab is selected via click, directional input, or script, even if it is the current tab.
  211. .. rst-class:: classref-section-separator
  212. ----
  213. .. rst-class:: classref-descriptions-group
  214. Enumerations
  215. ------------
  216. .. _enum_TabContainer_TabPosition:
  217. .. rst-class:: classref-enumeration
  218. enum **TabPosition**: :ref:`๐Ÿ”—<enum_TabContainer_TabPosition>`
  219. .. _class_TabContainer_constant_POSITION_TOP:
  220. .. rst-class:: classref-enumeration-constant
  221. :ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_TOP** = ``0``
  222. Places the tab bar at the top.
  223. .. _class_TabContainer_constant_POSITION_BOTTOM:
  224. .. rst-class:: classref-enumeration-constant
  225. :ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_BOTTOM** = ``1``
  226. Places the tab bar at the bottom. The tab bar's :ref:`StyleBox<class_StyleBox>` will be flipped vertically.
  227. .. _class_TabContainer_constant_POSITION_MAX:
  228. .. rst-class:: classref-enumeration-constant
  229. :ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_MAX** = ``2``
  230. Represents the size of the :ref:`TabPosition<enum_TabContainer_TabPosition>` enum.
  231. .. rst-class:: classref-section-separator
  232. ----
  233. .. rst-class:: classref-descriptions-group
  234. Property Descriptions
  235. ---------------------
  236. .. _class_TabContainer_property_all_tabs_in_front:
  237. .. rst-class:: classref-property
  238. :ref:`bool<class_bool>` **all_tabs_in_front** = ``false`` :ref:`๐Ÿ”—<class_TabContainer_property_all_tabs_in_front>`
  239. .. rst-class:: classref-property-setget
  240. - |void| **set_all_tabs_in_front**\ (\ value\: :ref:`bool<class_bool>`\ )
  241. - :ref:`bool<class_bool>` **is_all_tabs_in_front**\ (\ )
  242. If ``true``, all tabs are drawn in front of the panel. If ``false``, inactive tabs are drawn behind the panel.
  243. .. rst-class:: classref-item-separator
  244. ----
  245. .. _class_TabContainer_property_clip_tabs:
  246. .. rst-class:: classref-property
  247. :ref:`bool<class_bool>` **clip_tabs** = ``true`` :ref:`๐Ÿ”—<class_TabContainer_property_clip_tabs>`
  248. .. rst-class:: classref-property-setget
  249. - |void| **set_clip_tabs**\ (\ value\: :ref:`bool<class_bool>`\ )
  250. - :ref:`bool<class_bool>` **get_clip_tabs**\ (\ )
  251. If ``true``, tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible.
  252. .. rst-class:: classref-item-separator
  253. ----
  254. .. _class_TabContainer_property_current_tab:
  255. .. rst-class:: classref-property
  256. :ref:`int<class_int>` **current_tab** = ``-1`` :ref:`๐Ÿ”—<class_TabContainer_property_current_tab>`
  257. .. rst-class:: classref-property-setget
  258. - |void| **set_current_tab**\ (\ value\: :ref:`int<class_int>`\ )
  259. - :ref:`int<class_int>` **get_current_tab**\ (\ )
  260. The current tab index. When set, this index's :ref:`Control<class_Control>` node's ``visible`` property is set to ``true`` and all others are set to ``false``.
  261. A value of ``-1`` means that no tab is selected.
  262. .. rst-class:: classref-item-separator
  263. ----
  264. .. _class_TabContainer_property_deselect_enabled:
  265. .. rst-class:: classref-property
  266. :ref:`bool<class_bool>` **deselect_enabled** = ``false`` :ref:`๐Ÿ”—<class_TabContainer_property_deselect_enabled>`
  267. .. rst-class:: classref-property-setget
  268. - |void| **set_deselect_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  269. - :ref:`bool<class_bool>` **get_deselect_enabled**\ (\ )
  270. If ``true``, all tabs can be deselected so that no tab is selected. Click on the :ref:`current_tab<class_TabContainer_property_current_tab>` to deselect it.
  271. Only the tab header will be shown if no tabs are selected.
  272. .. rst-class:: classref-item-separator
  273. ----
  274. .. _class_TabContainer_property_drag_to_rearrange_enabled:
  275. .. rst-class:: classref-property
  276. :ref:`bool<class_bool>` **drag_to_rearrange_enabled** = ``false`` :ref:`๐Ÿ”—<class_TabContainer_property_drag_to_rearrange_enabled>`
  277. .. rst-class:: classref-property-setget
  278. - |void| **set_drag_to_rearrange_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  279. - :ref:`bool<class_bool>` **get_drag_to_rearrange_enabled**\ (\ )
  280. If ``true``, tabs can be rearranged with mouse drag.
  281. .. rst-class:: classref-item-separator
  282. ----
  283. .. _class_TabContainer_property_tab_alignment:
  284. .. rst-class:: classref-property
  285. :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **tab_alignment** = ``0`` :ref:`๐Ÿ”—<class_TabContainer_property_tab_alignment>`
  286. .. rst-class:: classref-property-setget
  287. - |void| **set_tab_alignment**\ (\ value\: :ref:`AlignmentMode<enum_TabBar_AlignmentMode>`\ )
  288. - :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **get_tab_alignment**\ (\ )
  289. Sets the position at which tabs will be placed. See :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` for details.
  290. .. rst-class:: classref-item-separator
  291. ----
  292. .. _class_TabContainer_property_tab_focus_mode:
  293. .. rst-class:: classref-property
  294. :ref:`FocusMode<enum_Control_FocusMode>` **tab_focus_mode** = ``2`` :ref:`๐Ÿ”—<class_TabContainer_property_tab_focus_mode>`
  295. .. rst-class:: classref-property-setget
  296. - |void| **set_tab_focus_mode**\ (\ value\: :ref:`FocusMode<enum_Control_FocusMode>`\ )
  297. - :ref:`FocusMode<enum_Control_FocusMode>` **get_tab_focus_mode**\ (\ )
  298. The focus access mode for the internal :ref:`TabBar<class_TabBar>` node.
  299. .. rst-class:: classref-item-separator
  300. ----
  301. .. _class_TabContainer_property_tabs_position:
  302. .. rst-class:: classref-property
  303. :ref:`TabPosition<enum_TabContainer_TabPosition>` **tabs_position** = ``0`` :ref:`๐Ÿ”—<class_TabContainer_property_tabs_position>`
  304. .. rst-class:: classref-property-setget
  305. - |void| **set_tabs_position**\ (\ value\: :ref:`TabPosition<enum_TabContainer_TabPosition>`\ )
  306. - :ref:`TabPosition<enum_TabContainer_TabPosition>` **get_tabs_position**\ (\ )
  307. Sets the position of the tab bar. See :ref:`TabPosition<enum_TabContainer_TabPosition>` for details.
  308. .. rst-class:: classref-item-separator
  309. ----
  310. .. _class_TabContainer_property_tabs_rearrange_group:
  311. .. rst-class:: classref-property
  312. :ref:`int<class_int>` **tabs_rearrange_group** = ``-1`` :ref:`๐Ÿ”—<class_TabContainer_property_tabs_rearrange_group>`
  313. .. rst-class:: classref-property-setget
  314. - |void| **set_tabs_rearrange_group**\ (\ value\: :ref:`int<class_int>`\ )
  315. - :ref:`int<class_int>` **get_tabs_rearrange_group**\ (\ )
  316. **TabContainer**\ s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`.
  317. Setting this to ``-1`` will disable rearranging between **TabContainer**\ s.
  318. .. rst-class:: classref-item-separator
  319. ----
  320. .. _class_TabContainer_property_tabs_visible:
  321. .. rst-class:: classref-property
  322. :ref:`bool<class_bool>` **tabs_visible** = ``true`` :ref:`๐Ÿ”—<class_TabContainer_property_tabs_visible>`
  323. .. rst-class:: classref-property-setget
  324. - |void| **set_tabs_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
  325. - :ref:`bool<class_bool>` **are_tabs_visible**\ (\ )
  326. If ``true``, tabs are visible. If ``false``, tabs' content and titles are hidden.
  327. .. rst-class:: classref-item-separator
  328. ----
  329. .. _class_TabContainer_property_use_hidden_tabs_for_min_size:
  330. .. rst-class:: classref-property
  331. :ref:`bool<class_bool>` **use_hidden_tabs_for_min_size** = ``false`` :ref:`๐Ÿ”—<class_TabContainer_property_use_hidden_tabs_for_min_size>`
  332. .. rst-class:: classref-property-setget
  333. - |void| **set_use_hidden_tabs_for_min_size**\ (\ value\: :ref:`bool<class_bool>`\ )
  334. - :ref:`bool<class_bool>` **get_use_hidden_tabs_for_min_size**\ (\ )
  335. If ``true``, child :ref:`Control<class_Control>` nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one.
  336. .. rst-class:: classref-section-separator
  337. ----
  338. .. rst-class:: classref-descriptions-group
  339. Method Descriptions
  340. -------------------
  341. .. _class_TabContainer_method_get_current_tab_control:
  342. .. rst-class:: classref-method
  343. :ref:`Control<class_Control>` **get_current_tab_control**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_current_tab_control>`
  344. Returns the child :ref:`Control<class_Control>` node located at the active tab index.
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_TabContainer_method_get_popup:
  348. .. rst-class:: classref-method
  349. :ref:`Popup<class_Popup>` **get_popup**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_popup>`
  350. Returns the :ref:`Popup<class_Popup>` node instance if one has been set already with :ref:`set_popup<class_TabContainer_method_set_popup>`.
  351. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`Window.visible<class_Window_property_visible>` property.
  352. .. rst-class:: classref-item-separator
  353. ----
  354. .. _class_TabContainer_method_get_previous_tab:
  355. .. rst-class:: classref-method
  356. :ref:`int<class_int>` **get_previous_tab**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_previous_tab>`
  357. Returns the previously active tab index.
  358. .. rst-class:: classref-item-separator
  359. ----
  360. .. _class_TabContainer_method_get_tab_bar:
  361. .. rst-class:: classref-method
  362. :ref:`TabBar<class_TabBar>` **get_tab_bar**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_bar>`
  363. Returns the :ref:`TabBar<class_TabBar>` contained in this container.
  364. \ **Warning:** This is a required internal node, removing and freeing it or editing its tabs may cause a crash. If you wish to edit the tabs, use the methods provided in **TabContainer**.
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_TabContainer_method_get_tab_button_icon:
  368. .. rst-class:: classref-method
  369. :ref:`Texture2D<class_Texture2D>` **get_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_button_icon>`
  370. Returns the button icon from the tab at index ``tab_idx``.
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_TabContainer_method_get_tab_control:
  374. .. rst-class:: classref-method
  375. :ref:`Control<class_Control>` **get_tab_control**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_control>`
  376. Returns the :ref:`Control<class_Control>` node from the tab at index ``tab_idx``.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_TabContainer_method_get_tab_count:
  380. .. rst-class:: classref-method
  381. :ref:`int<class_int>` **get_tab_count**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_count>`
  382. Returns the number of tabs.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_TabContainer_method_get_tab_icon:
  386. .. rst-class:: classref-method
  387. :ref:`Texture2D<class_Texture2D>` **get_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_icon>`
  388. Returns the :ref:`Texture2D<class_Texture2D>` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture2D<class_Texture2D>`.
  389. .. rst-class:: classref-item-separator
  390. ----
  391. .. _class_TabContainer_method_get_tab_icon_max_width:
  392. .. rst-class:: classref-method
  393. :ref:`int<class_int>` **get_tab_icon_max_width**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_icon_max_width>`
  394. Returns the maximum allowed width of the icon for the tab at index ``tab_idx``.
  395. .. rst-class:: classref-item-separator
  396. ----
  397. .. _class_TabContainer_method_get_tab_idx_at_point:
  398. .. rst-class:: classref-method
  399. :ref:`int<class_int>` **get_tab_idx_at_point**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_idx_at_point>`
  400. Returns the index of the tab at local coordinates ``point``. Returns ``-1`` if the point is outside the control boundaries or if there's no tab at the queried position.
  401. .. rst-class:: classref-item-separator
  402. ----
  403. .. _class_TabContainer_method_get_tab_idx_from_control:
  404. .. rst-class:: classref-method
  405. :ref:`int<class_int>` **get_tab_idx_from_control**\ (\ control\: :ref:`Control<class_Control>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_idx_from_control>`
  406. Returns the index of the tab tied to the given ``control``. The control must be a child of the **TabContainer**.
  407. .. rst-class:: classref-item-separator
  408. ----
  409. .. _class_TabContainer_method_get_tab_metadata:
  410. .. rst-class:: classref-method
  411. :ref:`Variant<class_Variant>` **get_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_metadata>`
  412. Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_tab_metadata<class_TabContainer_method_set_tab_metadata>`. If no metadata was previously set, returns ``null`` by default.
  413. .. rst-class:: classref-item-separator
  414. ----
  415. .. _class_TabContainer_method_get_tab_title:
  416. .. rst-class:: classref-method
  417. :ref:`String<class_String>` **get_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_title>`
  418. Returns the title of the tab at index ``tab_idx``. Tab titles default to the name of the indexed child node, but this can be overridden with :ref:`set_tab_title<class_TabContainer_method_set_tab_title>`.
  419. .. rst-class:: classref-item-separator
  420. ----
  421. .. _class_TabContainer_method_get_tab_tooltip:
  422. .. rst-class:: classref-method
  423. :ref:`String<class_String>` **get_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_tooltip>`
  424. Returns the tooltip text of the tab at index ``tab_idx``.
  425. .. rst-class:: classref-item-separator
  426. ----
  427. .. _class_TabContainer_method_is_tab_disabled:
  428. .. rst-class:: classref-method
  429. :ref:`bool<class_bool>` **is_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_is_tab_disabled>`
  430. Returns ``true`` if the tab at index ``tab_idx`` is disabled.
  431. .. rst-class:: classref-item-separator
  432. ----
  433. .. _class_TabContainer_method_is_tab_hidden:
  434. .. rst-class:: classref-method
  435. :ref:`bool<class_bool>` **is_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_is_tab_hidden>`
  436. Returns ``true`` if the tab at index ``tab_idx`` is hidden.
  437. .. rst-class:: classref-item-separator
  438. ----
  439. .. _class_TabContainer_method_select_next_available:
  440. .. rst-class:: classref-method
  441. :ref:`bool<class_bool>` **select_next_available**\ (\ ) :ref:`๐Ÿ”—<class_TabContainer_method_select_next_available>`
  442. Selects the first available tab with greater index than the currently selected. Returns ``true`` if tab selection changed.
  443. .. rst-class:: classref-item-separator
  444. ----
  445. .. _class_TabContainer_method_select_previous_available:
  446. .. rst-class:: classref-method
  447. :ref:`bool<class_bool>` **select_previous_available**\ (\ ) :ref:`๐Ÿ”—<class_TabContainer_method_select_previous_available>`
  448. Selects the first available tab with lower index than the currently selected. Returns ``true`` if tab selection changed.
  449. .. rst-class:: classref-item-separator
  450. ----
  451. .. _class_TabContainer_method_set_popup:
  452. .. rst-class:: classref-method
  453. |void| **set_popup**\ (\ popup\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_popup>`
  454. If set on a :ref:`Popup<class_Popup>` node instance, a popup menu icon appears in the top-right corner of the **TabContainer** (setting it to ``null`` will make it go away). Clicking it will expand the :ref:`Popup<class_Popup>` node.
  455. .. rst-class:: classref-item-separator
  456. ----
  457. .. _class_TabContainer_method_set_tab_button_icon:
  458. .. rst-class:: classref-method
  459. |void| **set_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_button_icon>`
  460. Sets the button icon from the tab at index ``tab_idx``.
  461. .. rst-class:: classref-item-separator
  462. ----
  463. .. _class_TabContainer_method_set_tab_disabled:
  464. .. rst-class:: classref-method
  465. |void| **set_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_disabled>`
  466. If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it non-interactable.
  467. .. rst-class:: classref-item-separator
  468. ----
  469. .. _class_TabContainer_method_set_tab_hidden:
  470. .. rst-class:: classref-method
  471. |void| **set_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_hidden>`
  472. If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappear from the tab area.
  473. .. rst-class:: classref-item-separator
  474. ----
  475. .. _class_TabContainer_method_set_tab_icon:
  476. .. rst-class:: classref-method
  477. |void| **set_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_icon>`
  478. Sets an icon for the tab at index ``tab_idx``.
  479. .. rst-class:: classref-item-separator
  480. ----
  481. .. _class_TabContainer_method_set_tab_icon_max_width:
  482. .. rst-class:: classref-method
  483. |void| **set_tab_icon_max_width**\ (\ tab_idx\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_icon_max_width>`
  484. Sets the maximum allowed width of the icon for the tab at index ``tab_idx``. This limit is applied on top of the default size of the icon and on top of :ref:`icon_max_width<class_TabContainer_theme_constant_icon_max_width>`. The height is adjusted according to the icon's ratio.
  485. .. rst-class:: classref-item-separator
  486. ----
  487. .. _class_TabContainer_method_set_tab_metadata:
  488. .. rst-class:: classref-method
  489. |void| **set_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_metadata>`
  490. Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved later using :ref:`get_tab_metadata<class_TabContainer_method_get_tab_metadata>`.
  491. .. rst-class:: classref-item-separator
  492. ----
  493. .. _class_TabContainer_method_set_tab_title:
  494. .. rst-class:: classref-method
  495. |void| **set_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_title>`
  496. Sets a custom title for the tab at index ``tab_idx`` (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again.
  497. .. rst-class:: classref-item-separator
  498. ----
  499. .. _class_TabContainer_method_set_tab_tooltip:
  500. .. rst-class:: classref-method
  501. |void| **set_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_tooltip>`
  502. Sets a custom tooltip text for tab at index ``tab_idx``.
  503. \ **Note:** By default, if the ``tooltip`` is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign ``" "`` as the ``tooltip`` text.
  504. .. rst-class:: classref-section-separator
  505. ----
  506. .. rst-class:: classref-descriptions-group
  507. Theme Property Descriptions
  508. ---------------------------
  509. .. _class_TabContainer_theme_color_drop_mark_color:
  510. .. rst-class:: classref-themeproperty
  511. :ref:`Color<class_Color>` **drop_mark_color** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_drop_mark_color>`
  512. Modulation color for the :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark>` icon.
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _class_TabContainer_theme_color_font_disabled_color:
  516. .. rst-class:: classref-themeproperty
  517. :ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_disabled_color>`
  518. Font color of disabled tabs.
  519. .. rst-class:: classref-item-separator
  520. ----
  521. .. _class_TabContainer_theme_color_font_hovered_color:
  522. .. rst-class:: classref-themeproperty
  523. :ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_hovered_color>`
  524. Font color of the currently hovered tab.
  525. .. rst-class:: classref-item-separator
  526. ----
  527. .. _class_TabContainer_theme_color_font_outline_color:
  528. .. rst-class:: classref-themeproperty
  529. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_outline_color>`
  530. The tint of text outline of the tab name.
  531. .. rst-class:: classref-item-separator
  532. ----
  533. .. _class_TabContainer_theme_color_font_selected_color:
  534. .. rst-class:: classref-themeproperty
  535. :ref:`Color<class_Color>` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_selected_color>`
  536. Font color of the currently selected tab.
  537. .. rst-class:: classref-item-separator
  538. ----
  539. .. _class_TabContainer_theme_color_font_unselected_color:
  540. .. rst-class:: classref-themeproperty
  541. :ref:`Color<class_Color>` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_unselected_color>`
  542. Font color of the other, unselected tabs.
  543. .. rst-class:: classref-item-separator
  544. ----
  545. .. _class_TabContainer_theme_constant_icon_max_width:
  546. .. rst-class:: classref-themeproperty
  547. :ref:`int<class_int>` **icon_max_width** = ``0`` :ref:`๐Ÿ”—<class_TabContainer_theme_constant_icon_max_width>`
  548. The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TabBar.set_tab_icon_max_width<class_TabBar_method_set_tab_icon_max_width>`. The height is adjusted according to the icon's ratio.
  549. .. rst-class:: classref-item-separator
  550. ----
  551. .. _class_TabContainer_theme_constant_icon_separation:
  552. .. rst-class:: classref-themeproperty
  553. :ref:`int<class_int>` **icon_separation** = ``4`` :ref:`๐Ÿ”—<class_TabContainer_theme_constant_icon_separation>`
  554. Space between tab's name and its icon.
  555. .. rst-class:: classref-item-separator
  556. ----
  557. .. _class_TabContainer_theme_constant_outline_size:
  558. .. rst-class:: classref-themeproperty
  559. :ref:`int<class_int>` **outline_size** = ``0`` :ref:`๐Ÿ”—<class_TabContainer_theme_constant_outline_size>`
  560. The size of the tab text outline.
  561. \ **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_TabContainer_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  562. .. rst-class:: classref-item-separator
  563. ----
  564. .. _class_TabContainer_theme_constant_side_margin:
  565. .. rst-class:: classref-themeproperty
  566. :ref:`int<class_int>` **side_margin** = ``8`` :ref:`๐Ÿ”—<class_TabContainer_theme_constant_side_margin>`
  567. The space at the left or right edges of the tab bar, accordingly with the current :ref:`tab_alignment<class_TabContainer_property_tab_alignment>`.
  568. The margin is ignored with :ref:`TabBar.ALIGNMENT_RIGHT<class_TabBar_constant_ALIGNMENT_RIGHT>` if the tabs are clipped (see :ref:`clip_tabs<class_TabContainer_property_clip_tabs>`) or a popup has been set (see :ref:`set_popup<class_TabContainer_method_set_popup>`). The margin is always ignored with :ref:`TabBar.ALIGNMENT_CENTER<class_TabBar_constant_ALIGNMENT_CENTER>`.
  569. .. rst-class:: classref-item-separator
  570. ----
  571. .. _class_TabContainer_theme_font_font:
  572. .. rst-class:: classref-themeproperty
  573. :ref:`Font<class_Font>` **font** :ref:`๐Ÿ”—<class_TabContainer_theme_font_font>`
  574. The font used to draw tab names.
  575. .. rst-class:: classref-item-separator
  576. ----
  577. .. _class_TabContainer_theme_font_size_font_size:
  578. .. rst-class:: classref-themeproperty
  579. :ref:`int<class_int>` **font_size** :ref:`๐Ÿ”—<class_TabContainer_theme_font_size_font_size>`
  580. Font size of the tab names.
  581. .. rst-class:: classref-item-separator
  582. ----
  583. .. _class_TabContainer_theme_icon_decrement:
  584. .. rst-class:: classref-themeproperty
  585. :ref:`Texture2D<class_Texture2D>` **decrement** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_decrement>`
  586. Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent.
  587. .. rst-class:: classref-item-separator
  588. ----
  589. .. _class_TabContainer_theme_icon_decrement_highlight:
  590. .. rst-class:: classref-themeproperty
  591. :ref:`Texture2D<class_Texture2D>` **decrement_highlight** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_decrement_highlight>`
  592. Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
  593. .. rst-class:: classref-item-separator
  594. ----
  595. .. _class_TabContainer_theme_icon_drop_mark:
  596. .. rst-class:: classref-themeproperty
  597. :ref:`Texture2D<class_Texture2D>` **drop_mark** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_drop_mark>`
  598. Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`).
  599. .. rst-class:: classref-item-separator
  600. ----
  601. .. _class_TabContainer_theme_icon_increment:
  602. .. rst-class:: classref-themeproperty
  603. :ref:`Texture2D<class_Texture2D>` **increment** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_increment>`
  604. Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent.
  605. .. rst-class:: classref-item-separator
  606. ----
  607. .. _class_TabContainer_theme_icon_increment_highlight:
  608. .. rst-class:: classref-themeproperty
  609. :ref:`Texture2D<class_Texture2D>` **increment_highlight** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_increment_highlight>`
  610. Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
  611. .. rst-class:: classref-item-separator
  612. ----
  613. .. _class_TabContainer_theme_icon_menu:
  614. .. rst-class:: classref-themeproperty
  615. :ref:`Texture2D<class_Texture2D>` **menu** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_menu>`
  616. The icon for the menu button (see :ref:`set_popup<class_TabContainer_method_set_popup>`).
  617. .. rst-class:: classref-item-separator
  618. ----
  619. .. _class_TabContainer_theme_icon_menu_highlight:
  620. .. rst-class:: classref-themeproperty
  621. :ref:`Texture2D<class_Texture2D>` **menu_highlight** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_menu_highlight>`
  622. The icon for the menu button (see :ref:`set_popup<class_TabContainer_method_set_popup>`) when it's being hovered with the cursor.
  623. .. rst-class:: classref-item-separator
  624. ----
  625. .. _class_TabContainer_theme_style_panel:
  626. .. rst-class:: classref-themeproperty
  627. :ref:`StyleBox<class_StyleBox>` **panel** :ref:`๐Ÿ”—<class_TabContainer_theme_style_panel>`
  628. The style for the background fill.
  629. .. rst-class:: classref-item-separator
  630. ----
  631. .. _class_TabContainer_theme_style_tab_disabled:
  632. .. rst-class:: classref-themeproperty
  633. :ref:`StyleBox<class_StyleBox>` **tab_disabled** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_disabled>`
  634. The style of disabled tabs.
  635. .. rst-class:: classref-item-separator
  636. ----
  637. .. _class_TabContainer_theme_style_tab_focus:
  638. .. rst-class:: classref-themeproperty
  639. :ref:`StyleBox<class_StyleBox>` **tab_focus** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_focus>`
  640. :ref:`StyleBox<class_StyleBox>` used when the :ref:`TabBar<class_TabBar>` is focused. The :ref:`tab_focus<class_TabContainer_theme_style_tab_focus>` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>` of the selected tab, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
  641. .. rst-class:: classref-item-separator
  642. ----
  643. .. _class_TabContainer_theme_style_tab_hovered:
  644. .. rst-class:: classref-themeproperty
  645. :ref:`StyleBox<class_StyleBox>` **tab_hovered** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_hovered>`
  646. The style of the currently hovered tab.
  647. \ **Note:** This style will be drawn with the same width as :ref:`tab_unselected<class_TabContainer_theme_style_tab_unselected>` at minimum.
  648. .. rst-class:: classref-item-separator
  649. ----
  650. .. _class_TabContainer_theme_style_tab_selected:
  651. .. rst-class:: classref-themeproperty
  652. :ref:`StyleBox<class_StyleBox>` **tab_selected** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_selected>`
  653. The style of the currently selected tab.
  654. .. rst-class:: classref-item-separator
  655. ----
  656. .. _class_TabContainer_theme_style_tab_unselected:
  657. .. rst-class:: classref-themeproperty
  658. :ref:`StyleBox<class_StyleBox>` **tab_unselected** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_unselected>`
  659. The style of the other, unselected tabs.
  660. .. rst-class:: classref-item-separator
  661. ----
  662. .. _class_TabContainer_theme_style_tabbar_background:
  663. .. rst-class:: classref-themeproperty
  664. :ref:`StyleBox<class_StyleBox>` **tabbar_background** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tabbar_background>`
  665. The style for the background fill of the :ref:`TabBar<class_TabBar>` area.
  666. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  667. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  668. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  669. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  670. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  671. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  672. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  673. .. |void| replace:: :abbr:`void (No return value.)`