class_tabcontainer.rst 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253
  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:`Color<class_Color>` | :ref:`icon_disabled_color<class_TabContainer_theme_color_icon_disabled_color>` | ``Color(1, 1, 1, 1)`` |
  127. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  128. | :ref:`Color<class_Color>` | :ref:`icon_hovered_color<class_TabContainer_theme_color_icon_hovered_color>` | ``Color(1, 1, 1, 1)`` |
  129. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  130. | :ref:`Color<class_Color>` | :ref:`icon_selected_color<class_TabContainer_theme_color_icon_selected_color>` | ``Color(1, 1, 1, 1)`` |
  131. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  132. | :ref:`Color<class_Color>` | :ref:`icon_unselected_color<class_TabContainer_theme_color_icon_unselected_color>` | ``Color(1, 1, 1, 1)`` |
  133. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  134. | :ref:`int<class_int>` | :ref:`icon_max_width<class_TabContainer_theme_constant_icon_max_width>` | ``0`` |
  135. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  136. | :ref:`int<class_int>` | :ref:`icon_separation<class_TabContainer_theme_constant_icon_separation>` | ``4`` |
  137. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  138. | :ref:`int<class_int>` | :ref:`outline_size<class_TabContainer_theme_constant_outline_size>` | ``0`` |
  139. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  140. | :ref:`int<class_int>` | :ref:`side_margin<class_TabContainer_theme_constant_side_margin>` | ``8`` |
  141. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  142. | :ref:`int<class_int>` | :ref:`tab_separation<class_TabContainer_theme_constant_tab_separation>` | ``0`` |
  143. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  144. | :ref:`Font<class_Font>` | :ref:`font<class_TabContainer_theme_font_font>` | |
  145. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  146. | :ref:`int<class_int>` | :ref:`font_size<class_TabContainer_theme_font_size_font_size>` | |
  147. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  148. | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement<class_TabContainer_theme_icon_decrement>` | |
  149. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  150. | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_highlight<class_TabContainer_theme_icon_decrement_highlight>` | |
  151. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  152. | :ref:`Texture2D<class_Texture2D>` | :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark>` | |
  153. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  154. | :ref:`Texture2D<class_Texture2D>` | :ref:`increment<class_TabContainer_theme_icon_increment>` | |
  155. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  156. | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_highlight<class_TabContainer_theme_icon_increment_highlight>` | |
  157. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  158. | :ref:`Texture2D<class_Texture2D>` | :ref:`menu<class_TabContainer_theme_icon_menu>` | |
  159. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  160. | :ref:`Texture2D<class_Texture2D>` | :ref:`menu_highlight<class_TabContainer_theme_icon_menu_highlight>` | |
  161. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  162. | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_TabContainer_theme_style_panel>` | |
  163. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  164. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_disabled<class_TabContainer_theme_style_tab_disabled>` | |
  165. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  166. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_focus<class_TabContainer_theme_style_tab_focus>` | |
  167. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  168. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_hovered<class_TabContainer_theme_style_tab_hovered>` | |
  169. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  170. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_selected<class_TabContainer_theme_style_tab_selected>` | |
  171. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  172. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_unselected<class_TabContainer_theme_style_tab_unselected>` | |
  173. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  174. | :ref:`StyleBox<class_StyleBox>` | :ref:`tabbar_background<class_TabContainer_theme_style_tabbar_background>` | |
  175. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  176. .. rst-class:: classref-section-separator
  177. ----
  178. .. rst-class:: classref-descriptions-group
  179. Signals
  180. -------
  181. .. _class_TabContainer_signal_active_tab_rearranged:
  182. .. rst-class:: classref-signal
  183. **active_tab_rearranged**\ (\ idx_to\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_active_tab_rearranged>`
  184. Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`.
  185. .. rst-class:: classref-item-separator
  186. ----
  187. .. _class_TabContainer_signal_pre_popup_pressed:
  188. .. rst-class:: classref-signal
  189. **pre_popup_pressed**\ (\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_pre_popup_pressed>`
  190. Emitted when the **TabContainer**'s :ref:`Popup<class_Popup>` button is clicked. See :ref:`set_popup()<class_TabContainer_method_set_popup>` for details.
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_TabContainer_signal_tab_button_pressed:
  194. .. rst-class:: classref-signal
  195. **tab_button_pressed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_button_pressed>`
  196. Emitted when the user clicks on the button icon on this tab.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_TabContainer_signal_tab_changed:
  200. .. rst-class:: classref-signal
  201. **tab_changed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_changed>`
  202. Emitted when switching to another tab.
  203. .. rst-class:: classref-item-separator
  204. ----
  205. .. _class_TabContainer_signal_tab_clicked:
  206. .. rst-class:: classref-signal
  207. **tab_clicked**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_clicked>`
  208. Emitted when a tab is clicked, even if it is the current tab.
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_TabContainer_signal_tab_hovered:
  212. .. rst-class:: classref-signal
  213. **tab_hovered**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_hovered>`
  214. Emitted when a tab is hovered by the mouse.
  215. .. rst-class:: classref-item-separator
  216. ----
  217. .. _class_TabContainer_signal_tab_selected:
  218. .. rst-class:: classref-signal
  219. **tab_selected**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_TabContainer_signal_tab_selected>`
  220. Emitted when a tab is selected via click, directional input, or script, even if it is the current tab.
  221. .. rst-class:: classref-section-separator
  222. ----
  223. .. rst-class:: classref-descriptions-group
  224. Enumerations
  225. ------------
  226. .. _enum_TabContainer_TabPosition:
  227. .. rst-class:: classref-enumeration
  228. enum **TabPosition**: :ref:`๐Ÿ”—<enum_TabContainer_TabPosition>`
  229. .. _class_TabContainer_constant_POSITION_TOP:
  230. .. rst-class:: classref-enumeration-constant
  231. :ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_TOP** = ``0``
  232. Places the tab bar at the top.
  233. .. _class_TabContainer_constant_POSITION_BOTTOM:
  234. .. rst-class:: classref-enumeration-constant
  235. :ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_BOTTOM** = ``1``
  236. Places the tab bar at the bottom. The tab bar's :ref:`StyleBox<class_StyleBox>` will be flipped vertically.
  237. .. _class_TabContainer_constant_POSITION_MAX:
  238. .. rst-class:: classref-enumeration-constant
  239. :ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_MAX** = ``2``
  240. Represents the size of the :ref:`TabPosition<enum_TabContainer_TabPosition>` enum.
  241. .. rst-class:: classref-section-separator
  242. ----
  243. .. rst-class:: classref-descriptions-group
  244. Property Descriptions
  245. ---------------------
  246. .. _class_TabContainer_property_all_tabs_in_front:
  247. .. rst-class:: classref-property
  248. :ref:`bool<class_bool>` **all_tabs_in_front** = ``false`` :ref:`๐Ÿ”—<class_TabContainer_property_all_tabs_in_front>`
  249. .. rst-class:: classref-property-setget
  250. - |void| **set_all_tabs_in_front**\ (\ value\: :ref:`bool<class_bool>`\ )
  251. - :ref:`bool<class_bool>` **is_all_tabs_in_front**\ (\ )
  252. If ``true``, all tabs are drawn in front of the panel. If ``false``, inactive tabs are drawn behind the panel.
  253. .. rst-class:: classref-item-separator
  254. ----
  255. .. _class_TabContainer_property_clip_tabs:
  256. .. rst-class:: classref-property
  257. :ref:`bool<class_bool>` **clip_tabs** = ``true`` :ref:`๐Ÿ”—<class_TabContainer_property_clip_tabs>`
  258. .. rst-class:: classref-property-setget
  259. - |void| **set_clip_tabs**\ (\ value\: :ref:`bool<class_bool>`\ )
  260. - :ref:`bool<class_bool>` **get_clip_tabs**\ (\ )
  261. 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.
  262. .. rst-class:: classref-item-separator
  263. ----
  264. .. _class_TabContainer_property_current_tab:
  265. .. rst-class:: classref-property
  266. :ref:`int<class_int>` **current_tab** = ``-1`` :ref:`๐Ÿ”—<class_TabContainer_property_current_tab>`
  267. .. rst-class:: classref-property-setget
  268. - |void| **set_current_tab**\ (\ value\: :ref:`int<class_int>`\ )
  269. - :ref:`int<class_int>` **get_current_tab**\ (\ )
  270. 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``.
  271. A value of ``-1`` means that no tab is selected.
  272. .. rst-class:: classref-item-separator
  273. ----
  274. .. _class_TabContainer_property_deselect_enabled:
  275. .. rst-class:: classref-property
  276. :ref:`bool<class_bool>` **deselect_enabled** = ``false`` :ref:`๐Ÿ”—<class_TabContainer_property_deselect_enabled>`
  277. .. rst-class:: classref-property-setget
  278. - |void| **set_deselect_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  279. - :ref:`bool<class_bool>` **get_deselect_enabled**\ (\ )
  280. 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.
  281. Only the tab header will be shown if no tabs are selected.
  282. .. rst-class:: classref-item-separator
  283. ----
  284. .. _class_TabContainer_property_drag_to_rearrange_enabled:
  285. .. rst-class:: classref-property
  286. :ref:`bool<class_bool>` **drag_to_rearrange_enabled** = ``false`` :ref:`๐Ÿ”—<class_TabContainer_property_drag_to_rearrange_enabled>`
  287. .. rst-class:: classref-property-setget
  288. - |void| **set_drag_to_rearrange_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  289. - :ref:`bool<class_bool>` **get_drag_to_rearrange_enabled**\ (\ )
  290. If ``true``, tabs can be rearranged with mouse drag.
  291. .. rst-class:: classref-item-separator
  292. ----
  293. .. _class_TabContainer_property_tab_alignment:
  294. .. rst-class:: classref-property
  295. :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **tab_alignment** = ``0`` :ref:`๐Ÿ”—<class_TabContainer_property_tab_alignment>`
  296. .. rst-class:: classref-property-setget
  297. - |void| **set_tab_alignment**\ (\ value\: :ref:`AlignmentMode<enum_TabBar_AlignmentMode>`\ )
  298. - :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **get_tab_alignment**\ (\ )
  299. The position at which tabs will be placed.
  300. .. rst-class:: classref-item-separator
  301. ----
  302. .. _class_TabContainer_property_tab_focus_mode:
  303. .. rst-class:: classref-property
  304. :ref:`FocusMode<enum_Control_FocusMode>` **tab_focus_mode** = ``2`` :ref:`๐Ÿ”—<class_TabContainer_property_tab_focus_mode>`
  305. .. rst-class:: classref-property-setget
  306. - |void| **set_tab_focus_mode**\ (\ value\: :ref:`FocusMode<enum_Control_FocusMode>`\ )
  307. - :ref:`FocusMode<enum_Control_FocusMode>` **get_tab_focus_mode**\ (\ )
  308. The focus access mode for the internal :ref:`TabBar<class_TabBar>` node.
  309. .. rst-class:: classref-item-separator
  310. ----
  311. .. _class_TabContainer_property_tabs_position:
  312. .. rst-class:: classref-property
  313. :ref:`TabPosition<enum_TabContainer_TabPosition>` **tabs_position** = ``0`` :ref:`๐Ÿ”—<class_TabContainer_property_tabs_position>`
  314. .. rst-class:: classref-property-setget
  315. - |void| **set_tabs_position**\ (\ value\: :ref:`TabPosition<enum_TabContainer_TabPosition>`\ )
  316. - :ref:`TabPosition<enum_TabContainer_TabPosition>` **get_tabs_position**\ (\ )
  317. The position of the tab bar.
  318. .. rst-class:: classref-item-separator
  319. ----
  320. .. _class_TabContainer_property_tabs_rearrange_group:
  321. .. rst-class:: classref-property
  322. :ref:`int<class_int>` **tabs_rearrange_group** = ``-1`` :ref:`๐Ÿ”—<class_TabContainer_property_tabs_rearrange_group>`
  323. .. rst-class:: classref-property-setget
  324. - |void| **set_tabs_rearrange_group**\ (\ value\: :ref:`int<class_int>`\ )
  325. - :ref:`int<class_int>` **get_tabs_rearrange_group**\ (\ )
  326. **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>`.
  327. Setting this to ``-1`` will disable rearranging between **TabContainer**\ s.
  328. .. rst-class:: classref-item-separator
  329. ----
  330. .. _class_TabContainer_property_tabs_visible:
  331. .. rst-class:: classref-property
  332. :ref:`bool<class_bool>` **tabs_visible** = ``true`` :ref:`๐Ÿ”—<class_TabContainer_property_tabs_visible>`
  333. .. rst-class:: classref-property-setget
  334. - |void| **set_tabs_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
  335. - :ref:`bool<class_bool>` **are_tabs_visible**\ (\ )
  336. If ``true``, tabs are visible. If ``false``, tabs' content and titles are hidden.
  337. .. rst-class:: classref-item-separator
  338. ----
  339. .. _class_TabContainer_property_use_hidden_tabs_for_min_size:
  340. .. rst-class:: classref-property
  341. :ref:`bool<class_bool>` **use_hidden_tabs_for_min_size** = ``false`` :ref:`๐Ÿ”—<class_TabContainer_property_use_hidden_tabs_for_min_size>`
  342. .. rst-class:: classref-property-setget
  343. - |void| **set_use_hidden_tabs_for_min_size**\ (\ value\: :ref:`bool<class_bool>`\ )
  344. - :ref:`bool<class_bool>` **get_use_hidden_tabs_for_min_size**\ (\ )
  345. 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.
  346. .. rst-class:: classref-section-separator
  347. ----
  348. .. rst-class:: classref-descriptions-group
  349. Method Descriptions
  350. -------------------
  351. .. _class_TabContainer_method_get_current_tab_control:
  352. .. rst-class:: classref-method
  353. :ref:`Control<class_Control>` **get_current_tab_control**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_current_tab_control>`
  354. Returns the child :ref:`Control<class_Control>` node located at the active tab index.
  355. .. rst-class:: classref-item-separator
  356. ----
  357. .. _class_TabContainer_method_get_popup:
  358. .. rst-class:: classref-method
  359. :ref:`Popup<class_Popup>` **get_popup**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_popup>`
  360. Returns the :ref:`Popup<class_Popup>` node instance if one has been set already with :ref:`set_popup()<class_TabContainer_method_set_popup>`.
  361. \ **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.
  362. .. rst-class:: classref-item-separator
  363. ----
  364. .. _class_TabContainer_method_get_previous_tab:
  365. .. rst-class:: classref-method
  366. :ref:`int<class_int>` **get_previous_tab**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_previous_tab>`
  367. Returns the previously active tab index.
  368. .. rst-class:: classref-item-separator
  369. ----
  370. .. _class_TabContainer_method_get_tab_bar:
  371. .. rst-class:: classref-method
  372. :ref:`TabBar<class_TabBar>` **get_tab_bar**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_bar>`
  373. Returns the :ref:`TabBar<class_TabBar>` contained in this container.
  374. \ **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**.
  375. .. rst-class:: classref-item-separator
  376. ----
  377. .. _class_TabContainer_method_get_tab_button_icon:
  378. .. rst-class:: classref-method
  379. :ref:`Texture2D<class_Texture2D>` **get_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_button_icon>`
  380. Returns the button icon from the tab at index ``tab_idx``.
  381. .. rst-class:: classref-item-separator
  382. ----
  383. .. _class_TabContainer_method_get_tab_control:
  384. .. rst-class:: classref-method
  385. :ref:`Control<class_Control>` **get_tab_control**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_control>`
  386. Returns the :ref:`Control<class_Control>` node from the tab at index ``tab_idx``.
  387. .. rst-class:: classref-item-separator
  388. ----
  389. .. _class_TabContainer_method_get_tab_count:
  390. .. rst-class:: classref-method
  391. :ref:`int<class_int>` **get_tab_count**\ (\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_count>`
  392. Returns the number of tabs.
  393. .. rst-class:: classref-item-separator
  394. ----
  395. .. _class_TabContainer_method_get_tab_icon:
  396. .. rst-class:: classref-method
  397. :ref:`Texture2D<class_Texture2D>` **get_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_icon>`
  398. Returns the :ref:`Texture2D<class_Texture2D>` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture2D<class_Texture2D>`.
  399. .. rst-class:: classref-item-separator
  400. ----
  401. .. _class_TabContainer_method_get_tab_icon_max_width:
  402. .. rst-class:: classref-method
  403. :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>`
  404. Returns the maximum allowed width of the icon for the tab at index ``tab_idx``.
  405. .. rst-class:: classref-item-separator
  406. ----
  407. .. _class_TabContainer_method_get_tab_idx_at_point:
  408. .. rst-class:: classref-method
  409. :ref:`int<class_int>` **get_tab_idx_at_point**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_idx_at_point>`
  410. 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.
  411. .. rst-class:: classref-item-separator
  412. ----
  413. .. _class_TabContainer_method_get_tab_idx_from_control:
  414. .. rst-class:: classref-method
  415. :ref:`int<class_int>` **get_tab_idx_from_control**\ (\ control\: :ref:`Control<class_Control>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_idx_from_control>`
  416. Returns the index of the tab tied to the given ``control``. The control must be a child of the **TabContainer**.
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_TabContainer_method_get_tab_metadata:
  420. .. rst-class:: classref-method
  421. :ref:`Variant<class_Variant>` **get_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_metadata>`
  422. 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.
  423. .. rst-class:: classref-item-separator
  424. ----
  425. .. _class_TabContainer_method_get_tab_title:
  426. .. rst-class:: classref-method
  427. :ref:`String<class_String>` **get_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_title>`
  428. 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>`.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_TabContainer_method_get_tab_tooltip:
  432. .. rst-class:: classref-method
  433. :ref:`String<class_String>` **get_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_get_tab_tooltip>`
  434. Returns the tooltip text of the tab at index ``tab_idx``.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_TabContainer_method_is_tab_disabled:
  438. .. rst-class:: classref-method
  439. :ref:`bool<class_bool>` **is_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_is_tab_disabled>`
  440. Returns ``true`` if the tab at index ``tab_idx`` is disabled.
  441. .. rst-class:: classref-item-separator
  442. ----
  443. .. _class_TabContainer_method_is_tab_hidden:
  444. .. rst-class:: classref-method
  445. :ref:`bool<class_bool>` **is_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_TabContainer_method_is_tab_hidden>`
  446. Returns ``true`` if the tab at index ``tab_idx`` is hidden.
  447. .. rst-class:: classref-item-separator
  448. ----
  449. .. _class_TabContainer_method_select_next_available:
  450. .. rst-class:: classref-method
  451. :ref:`bool<class_bool>` **select_next_available**\ (\ ) :ref:`๐Ÿ”—<class_TabContainer_method_select_next_available>`
  452. Selects the first available tab with greater index than the currently selected. Returns ``true`` if tab selection changed.
  453. .. rst-class:: classref-item-separator
  454. ----
  455. .. _class_TabContainer_method_select_previous_available:
  456. .. rst-class:: classref-method
  457. :ref:`bool<class_bool>` **select_previous_available**\ (\ ) :ref:`๐Ÿ”—<class_TabContainer_method_select_previous_available>`
  458. Selects the first available tab with lower index than the currently selected. Returns ``true`` if tab selection changed.
  459. .. rst-class:: classref-item-separator
  460. ----
  461. .. _class_TabContainer_method_set_popup:
  462. .. rst-class:: classref-method
  463. |void| **set_popup**\ (\ popup\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_popup>`
  464. 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.
  465. .. rst-class:: classref-item-separator
  466. ----
  467. .. _class_TabContainer_method_set_tab_button_icon:
  468. .. rst-class:: classref-method
  469. |void| **set_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_button_icon>`
  470. Sets the button icon from the tab at index ``tab_idx``.
  471. .. rst-class:: classref-item-separator
  472. ----
  473. .. _class_TabContainer_method_set_tab_disabled:
  474. .. rst-class:: classref-method
  475. |void| **set_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_disabled>`
  476. If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it non-interactable.
  477. .. rst-class:: classref-item-separator
  478. ----
  479. .. _class_TabContainer_method_set_tab_hidden:
  480. .. rst-class:: classref-method
  481. |void| **set_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_hidden>`
  482. If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappear from the tab area.
  483. .. rst-class:: classref-item-separator
  484. ----
  485. .. _class_TabContainer_method_set_tab_icon:
  486. .. rst-class:: classref-method
  487. |void| **set_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_icon>`
  488. Sets an icon for the tab at index ``tab_idx``.
  489. .. rst-class:: classref-item-separator
  490. ----
  491. .. _class_TabContainer_method_set_tab_icon_max_width:
  492. .. rst-class:: classref-method
  493. |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>`
  494. 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.
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _class_TabContainer_method_set_tab_metadata:
  498. .. rst-class:: classref-method
  499. |void| **set_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_metadata>`
  500. 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>`.
  501. .. rst-class:: classref-item-separator
  502. ----
  503. .. _class_TabContainer_method_set_tab_title:
  504. .. rst-class:: classref-method
  505. |void| **set_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_title>`
  506. 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.
  507. .. rst-class:: classref-item-separator
  508. ----
  509. .. _class_TabContainer_method_set_tab_tooltip:
  510. .. rst-class:: classref-method
  511. |void| **set_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_TabContainer_method_set_tab_tooltip>`
  512. Sets a custom tooltip text for tab at index ``tab_idx``.
  513. \ **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.
  514. .. rst-class:: classref-section-separator
  515. ----
  516. .. rst-class:: classref-descriptions-group
  517. Theme Property Descriptions
  518. ---------------------------
  519. .. _class_TabContainer_theme_color_drop_mark_color:
  520. .. rst-class:: classref-themeproperty
  521. :ref:`Color<class_Color>` **drop_mark_color** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_drop_mark_color>`
  522. Modulation color for the :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark>` icon.
  523. .. rst-class:: classref-item-separator
  524. ----
  525. .. _class_TabContainer_theme_color_font_disabled_color:
  526. .. rst-class:: classref-themeproperty
  527. :ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_disabled_color>`
  528. Font color of disabled tabs.
  529. .. rst-class:: classref-item-separator
  530. ----
  531. .. _class_TabContainer_theme_color_font_hovered_color:
  532. .. rst-class:: classref-themeproperty
  533. :ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_hovered_color>`
  534. Font color of the currently hovered tab. Does not apply to the selected tab.
  535. .. rst-class:: classref-item-separator
  536. ----
  537. .. _class_TabContainer_theme_color_font_outline_color:
  538. .. rst-class:: classref-themeproperty
  539. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_outline_color>`
  540. The tint of text outline of the tab name.
  541. .. rst-class:: classref-item-separator
  542. ----
  543. .. _class_TabContainer_theme_color_font_selected_color:
  544. .. rst-class:: classref-themeproperty
  545. :ref:`Color<class_Color>` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_selected_color>`
  546. Font color of the currently selected tab.
  547. .. rst-class:: classref-item-separator
  548. ----
  549. .. _class_TabContainer_theme_color_font_unselected_color:
  550. .. rst-class:: classref-themeproperty
  551. :ref:`Color<class_Color>` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_font_unselected_color>`
  552. Font color of the other, unselected tabs.
  553. .. rst-class:: classref-item-separator
  554. ----
  555. .. _class_TabContainer_theme_color_icon_disabled_color:
  556. .. rst-class:: classref-themeproperty
  557. :ref:`Color<class_Color>` **icon_disabled_color** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_icon_disabled_color>`
  558. Icon color of disabled tabs.
  559. .. rst-class:: classref-item-separator
  560. ----
  561. .. _class_TabContainer_theme_color_icon_hovered_color:
  562. .. rst-class:: classref-themeproperty
  563. :ref:`Color<class_Color>` **icon_hovered_color** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_icon_hovered_color>`
  564. Icon color of the currently hovered tab. Does not apply to the selected tab.
  565. .. rst-class:: classref-item-separator
  566. ----
  567. .. _class_TabContainer_theme_color_icon_selected_color:
  568. .. rst-class:: classref-themeproperty
  569. :ref:`Color<class_Color>` **icon_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_icon_selected_color>`
  570. Icon color of the currently selected tab.
  571. .. rst-class:: classref-item-separator
  572. ----
  573. .. _class_TabContainer_theme_color_icon_unselected_color:
  574. .. rst-class:: classref-themeproperty
  575. :ref:`Color<class_Color>` **icon_unselected_color** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—<class_TabContainer_theme_color_icon_unselected_color>`
  576. Icon color of the other, unselected tabs.
  577. .. rst-class:: classref-item-separator
  578. ----
  579. .. _class_TabContainer_theme_constant_icon_max_width:
  580. .. rst-class:: classref-themeproperty
  581. :ref:`int<class_int>` **icon_max_width** = ``0`` :ref:`๐Ÿ”—<class_TabContainer_theme_constant_icon_max_width>`
  582. 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.
  583. .. rst-class:: classref-item-separator
  584. ----
  585. .. _class_TabContainer_theme_constant_icon_separation:
  586. .. rst-class:: classref-themeproperty
  587. :ref:`int<class_int>` **icon_separation** = ``4`` :ref:`๐Ÿ”—<class_TabContainer_theme_constant_icon_separation>`
  588. Space between tab's name and its icon.
  589. .. rst-class:: classref-item-separator
  590. ----
  591. .. _class_TabContainer_theme_constant_outline_size:
  592. .. rst-class:: classref-themeproperty
  593. :ref:`int<class_int>` **outline_size** = ``0`` :ref:`๐Ÿ”—<class_TabContainer_theme_constant_outline_size>`
  594. The size of the tab text outline.
  595. \ **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.
  596. .. rst-class:: classref-item-separator
  597. ----
  598. .. _class_TabContainer_theme_constant_side_margin:
  599. .. rst-class:: classref-themeproperty
  600. :ref:`int<class_int>` **side_margin** = ``8`` :ref:`๐Ÿ”—<class_TabContainer_theme_constant_side_margin>`
  601. The space at the left or right edges of the tab bar, accordingly with the current :ref:`tab_alignment<class_TabContainer_property_tab_alignment>`.
  602. 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>`.
  603. .. rst-class:: classref-item-separator
  604. ----
  605. .. _class_TabContainer_theme_constant_tab_separation:
  606. .. rst-class:: classref-themeproperty
  607. :ref:`int<class_int>` **tab_separation** = ``0`` :ref:`๐Ÿ”—<class_TabContainer_theme_constant_tab_separation>`
  608. The space between tabs in the tab bar.
  609. .. rst-class:: classref-item-separator
  610. ----
  611. .. _class_TabContainer_theme_font_font:
  612. .. rst-class:: classref-themeproperty
  613. :ref:`Font<class_Font>` **font** :ref:`๐Ÿ”—<class_TabContainer_theme_font_font>`
  614. The font used to draw tab names.
  615. .. rst-class:: classref-item-separator
  616. ----
  617. .. _class_TabContainer_theme_font_size_font_size:
  618. .. rst-class:: classref-themeproperty
  619. :ref:`int<class_int>` **font_size** :ref:`๐Ÿ”—<class_TabContainer_theme_font_size_font_size>`
  620. Font size of the tab names.
  621. .. rst-class:: classref-item-separator
  622. ----
  623. .. _class_TabContainer_theme_icon_decrement:
  624. .. rst-class:: classref-themeproperty
  625. :ref:`Texture2D<class_Texture2D>` **decrement** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_decrement>`
  626. 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.
  627. .. rst-class:: classref-item-separator
  628. ----
  629. .. _class_TabContainer_theme_icon_decrement_highlight:
  630. .. rst-class:: classref-themeproperty
  631. :ref:`Texture2D<class_Texture2D>` **decrement_highlight** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_decrement_highlight>`
  632. 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.
  633. .. rst-class:: classref-item-separator
  634. ----
  635. .. _class_TabContainer_theme_icon_drop_mark:
  636. .. rst-class:: classref-themeproperty
  637. :ref:`Texture2D<class_Texture2D>` **drop_mark** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_drop_mark>`
  638. 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>`).
  639. .. rst-class:: classref-item-separator
  640. ----
  641. .. _class_TabContainer_theme_icon_increment:
  642. .. rst-class:: classref-themeproperty
  643. :ref:`Texture2D<class_Texture2D>` **increment** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_increment>`
  644. 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.
  645. .. rst-class:: classref-item-separator
  646. ----
  647. .. _class_TabContainer_theme_icon_increment_highlight:
  648. .. rst-class:: classref-themeproperty
  649. :ref:`Texture2D<class_Texture2D>` **increment_highlight** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_increment_highlight>`
  650. 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.
  651. .. rst-class:: classref-item-separator
  652. ----
  653. .. _class_TabContainer_theme_icon_menu:
  654. .. rst-class:: classref-themeproperty
  655. :ref:`Texture2D<class_Texture2D>` **menu** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_menu>`
  656. The icon for the menu button (see :ref:`set_popup()<class_TabContainer_method_set_popup>`).
  657. .. rst-class:: classref-item-separator
  658. ----
  659. .. _class_TabContainer_theme_icon_menu_highlight:
  660. .. rst-class:: classref-themeproperty
  661. :ref:`Texture2D<class_Texture2D>` **menu_highlight** :ref:`๐Ÿ”—<class_TabContainer_theme_icon_menu_highlight>`
  662. The icon for the menu button (see :ref:`set_popup()<class_TabContainer_method_set_popup>`) when it's being hovered with the cursor.
  663. .. rst-class:: classref-item-separator
  664. ----
  665. .. _class_TabContainer_theme_style_panel:
  666. .. rst-class:: classref-themeproperty
  667. :ref:`StyleBox<class_StyleBox>` **panel** :ref:`๐Ÿ”—<class_TabContainer_theme_style_panel>`
  668. The style for the background fill.
  669. .. rst-class:: classref-item-separator
  670. ----
  671. .. _class_TabContainer_theme_style_tab_disabled:
  672. .. rst-class:: classref-themeproperty
  673. :ref:`StyleBox<class_StyleBox>` **tab_disabled** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_disabled>`
  674. The style of disabled tabs.
  675. .. rst-class:: classref-item-separator
  676. ----
  677. .. _class_TabContainer_theme_style_tab_focus:
  678. .. rst-class:: classref-themeproperty
  679. :ref:`StyleBox<class_StyleBox>` **tab_focus** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_focus>`
  680. :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.
  681. .. rst-class:: classref-item-separator
  682. ----
  683. .. _class_TabContainer_theme_style_tab_hovered:
  684. .. rst-class:: classref-themeproperty
  685. :ref:`StyleBox<class_StyleBox>` **tab_hovered** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_hovered>`
  686. The style of the currently hovered tab.
  687. \ **Note:** This style will be drawn with the same width as :ref:`tab_unselected<class_TabContainer_theme_style_tab_unselected>` at minimum.
  688. .. rst-class:: classref-item-separator
  689. ----
  690. .. _class_TabContainer_theme_style_tab_selected:
  691. .. rst-class:: classref-themeproperty
  692. :ref:`StyleBox<class_StyleBox>` **tab_selected** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_selected>`
  693. The style of the currently selected tab.
  694. .. rst-class:: classref-item-separator
  695. ----
  696. .. _class_TabContainer_theme_style_tab_unselected:
  697. .. rst-class:: classref-themeproperty
  698. :ref:`StyleBox<class_StyleBox>` **tab_unselected** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tab_unselected>`
  699. The style of the other, unselected tabs.
  700. .. rst-class:: classref-item-separator
  701. ----
  702. .. _class_TabContainer_theme_style_tabbar_background:
  703. .. rst-class:: classref-themeproperty
  704. :ref:`StyleBox<class_StyleBox>` **tabbar_background** :ref:`๐Ÿ”—<class_TabContainer_theme_style_tabbar_background>`
  705. The style for the background fill of the :ref:`TabBar<class_TabBar>` area.
  706. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  707. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  708. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  709. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  710. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  711. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  712. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  713. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  714. .. |void| replace:: :abbr:`void (No return value.)`