class_tabbar.rst 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.1/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.1/doc/classes/TabBar.xml.
  6. .. _class_TabBar:
  7. TabBar
  8. ======
  9. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A control that provides a horizontal bar with tabs.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A control that provides a horizontal bar with tabs. Similar to :ref:`TabContainer<class_TabContainer>` but is only in charge of drawing tabs, not interacting with children.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`clip_tabs<class_TabBar_property_clip_tabs>` | ``true`` |
  22. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  23. | :ref:`int<class_int>` | :ref:`current_tab<class_TabBar_property_current_tab>` | ``0`` |
  24. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  25. | :ref:`bool<class_bool>` | :ref:`drag_to_rearrange_enabled<class_TabBar_property_drag_to_rearrange_enabled>` | ``false`` |
  26. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  27. | :ref:`int<class_int>` | :ref:`max_tab_width<class_TabBar_property_max_tab_width>` | ``0`` |
  28. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  29. | :ref:`bool<class_bool>` | :ref:`scroll_to_selected<class_TabBar_property_scroll_to_selected>` | ``true`` |
  30. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  31. | :ref:`bool<class_bool>` | :ref:`scrolling_enabled<class_TabBar_property_scrolling_enabled>` | ``true`` |
  32. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  33. | :ref:`bool<class_bool>` | :ref:`select_with_rmb<class_TabBar_property_select_with_rmb>` | ``false`` |
  34. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  35. | :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` | :ref:`tab_alignment<class_TabBar_property_tab_alignment>` | ``0`` |
  36. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  37. | :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` | :ref:`tab_close_display_policy<class_TabBar_property_tab_close_display_policy>` | ``0`` |
  38. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  39. | :ref:`int<class_int>` | :ref:`tab_count<class_TabBar_property_tab_count>` | ``0`` |
  40. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  41. | :ref:`int<class_int>` | :ref:`tabs_rearrange_group<class_TabBar_property_tabs_rearrange_group>` | ``-1`` |
  42. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  43. .. rst-class:: classref-reftable-group
  44. Methods
  45. -------
  46. .. table::
  47. :widths: auto
  48. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`add_tab<class_TabBar_method_add_tab>` **(** :ref:`String<class_String>` title="", :ref:`Texture2D<class_Texture2D>` icon=null **)** |
  50. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`clear_tabs<class_TabBar_method_clear_tabs>` **(** **)** |
  52. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`ensure_tab_visible<class_TabBar_method_ensure_tab_visible>` **(** :ref:`int<class_int>` idx **)** |
  54. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`get_offset_buttons_visible<class_TabBar_method_get_offset_buttons_visible>` **(** **)** |const| |
  56. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`int<class_int>` | :ref:`get_previous_tab<class_TabBar_method_get_previous_tab>` **(** **)** |const| |
  58. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_button_icon<class_TabBar_method_get_tab_button_icon>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  60. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_icon<class_TabBar_method_get_tab_icon>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  62. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`int<class_int>` | :ref:`get_tab_icon_max_width<class_TabBar_method_get_tab_icon_max_width>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  64. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`int<class_int>` | :ref:`get_tab_idx_at_point<class_TabBar_method_get_tab_idx_at_point>` **(** :ref:`Vector2<class_Vector2>` point **)** |const| |
  66. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`String<class_String>` | :ref:`get_tab_language<class_TabBar_method_get_tab_language>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  68. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`Variant<class_Variant>` | :ref:`get_tab_metadata<class_TabBar_method_get_tab_metadata>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  70. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`int<class_int>` | :ref:`get_tab_offset<class_TabBar_method_get_tab_offset>` **(** **)** |const| |
  72. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`Rect2<class_Rect2>` | :ref:`get_tab_rect<class_TabBar_method_get_tab_rect>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  74. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_tab_text_direction<class_TabBar_method_get_tab_text_direction>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  76. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`String<class_String>` | :ref:`get_tab_title<class_TabBar_method_get_tab_title>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  78. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`bool<class_bool>` | :ref:`is_tab_disabled<class_TabBar_method_is_tab_disabled>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  80. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`bool<class_bool>` | :ref:`is_tab_hidden<class_TabBar_method_is_tab_hidden>` **(** :ref:`int<class_int>` tab_idx **)** |const| |
  82. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`move_tab<class_TabBar_method_move_tab>` **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** |
  84. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`remove_tab<class_TabBar_method_remove_tab>` **(** :ref:`int<class_int>` tab_idx **)** |
  86. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`set_tab_button_icon<class_TabBar_method_set_tab_button_icon>` **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** |
  88. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`set_tab_disabled<class_TabBar_method_set_tab_disabled>` **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` disabled **)** |
  90. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`set_tab_hidden<class_TabBar_method_set_tab_hidden>` **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` hidden **)** |
  92. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`set_tab_icon<class_TabBar_method_set_tab_icon>` **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** |
  94. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`set_tab_icon_max_width<class_TabBar_method_set_tab_icon_max_width>` **(** :ref:`int<class_int>` tab_idx, :ref:`int<class_int>` width **)** |
  96. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | void | :ref:`set_tab_language<class_TabBar_method_set_tab_language>` **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` language **)** |
  98. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | void | :ref:`set_tab_metadata<class_TabBar_method_set_tab_metadata>` **(** :ref:`int<class_int>` tab_idx, :ref:`Variant<class_Variant>` metadata **)** |
  100. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | void | :ref:`set_tab_text_direction<class_TabBar_method_set_tab_text_direction>` **(** :ref:`int<class_int>` tab_idx, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** |
  102. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | void | :ref:`set_tab_title<class_TabBar_method_set_tab_title>` **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` title **)** |
  104. +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. .. rst-class:: classref-reftable-group
  106. Theme Properties
  107. ----------------
  108. .. table::
  109. :widths: auto
  110. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  111. | :ref:`Color<class_Color>` | :ref:`drop_mark_color<class_TabBar_theme_color_drop_mark_color>` | ``Color(1, 1, 1, 1)`` |
  112. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  113. | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_TabBar_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  114. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  115. | :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_TabBar_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  116. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  117. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TabBar_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  118. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  119. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_TabBar_theme_color_font_selected_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  120. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  121. | :ref:`Color<class_Color>` | :ref:`font_unselected_color<class_TabBar_theme_color_font_unselected_color>` | ``Color(0.7, 0.7, 0.7, 1)`` |
  122. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  123. | :ref:`int<class_int>` | :ref:`h_separation<class_TabBar_theme_constant_h_separation>` | ``4`` |
  124. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  125. | :ref:`int<class_int>` | :ref:`icon_max_width<class_TabBar_theme_constant_icon_max_width>` | ``0`` |
  126. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  127. | :ref:`int<class_int>` | :ref:`outline_size<class_TabBar_theme_constant_outline_size>` | ``0`` |
  128. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  129. | :ref:`Font<class_Font>` | :ref:`font<class_TabBar_theme_font_font>` | |
  130. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  131. | :ref:`int<class_int>` | :ref:`font_size<class_TabBar_theme_font_size_font_size>` | |
  132. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  133. | :ref:`Texture2D<class_Texture2D>` | :ref:`close<class_TabBar_theme_icon_close>` | |
  134. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  135. | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement<class_TabBar_theme_icon_decrement>` | |
  136. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  137. | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_highlight<class_TabBar_theme_icon_decrement_highlight>` | |
  138. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  139. | :ref:`Texture2D<class_Texture2D>` | :ref:`drop_mark<class_TabBar_theme_icon_drop_mark>` | |
  140. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  141. | :ref:`Texture2D<class_Texture2D>` | :ref:`increment<class_TabBar_theme_icon_increment>` | |
  142. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  143. | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_highlight<class_TabBar_theme_icon_increment_highlight>` | |
  144. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  145. | :ref:`StyleBox<class_StyleBox>` | :ref:`button_highlight<class_TabBar_theme_style_button_highlight>` | |
  146. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  147. | :ref:`StyleBox<class_StyleBox>` | :ref:`button_pressed<class_TabBar_theme_style_button_pressed>` | |
  148. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  149. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_disabled<class_TabBar_theme_style_tab_disabled>` | |
  150. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  151. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_hovered<class_TabBar_theme_style_tab_hovered>` | |
  152. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  153. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_selected<class_TabBar_theme_style_tab_selected>` | |
  154. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  155. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_unselected<class_TabBar_theme_style_tab_unselected>` | |
  156. +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+
  157. .. rst-class:: classref-section-separator
  158. ----
  159. .. rst-class:: classref-descriptions-group
  160. Signals
  161. -------
  162. .. _class_TabBar_signal_active_tab_rearranged:
  163. .. rst-class:: classref-signal
  164. **active_tab_rearranged** **(** :ref:`int<class_int>` idx_to **)**
  165. Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rearrange_enabled<class_TabBar_property_drag_to_rearrange_enabled>`.
  166. .. rst-class:: classref-item-separator
  167. ----
  168. .. _class_TabBar_signal_tab_button_pressed:
  169. .. rst-class:: classref-signal
  170. **tab_button_pressed** **(** :ref:`int<class_int>` tab **)**
  171. Emitted when a tab's right button is pressed. See :ref:`set_tab_button_icon<class_TabBar_method_set_tab_button_icon>`.
  172. .. rst-class:: classref-item-separator
  173. ----
  174. .. _class_TabBar_signal_tab_changed:
  175. .. rst-class:: classref-signal
  176. **tab_changed** **(** :ref:`int<class_int>` tab **)**
  177. Emitted when switching to another tab.
  178. .. rst-class:: classref-item-separator
  179. ----
  180. .. _class_TabBar_signal_tab_clicked:
  181. .. rst-class:: classref-signal
  182. **tab_clicked** **(** :ref:`int<class_int>` tab **)**
  183. Emitted when a tab is clicked, even if it is the current tab.
  184. .. rst-class:: classref-item-separator
  185. ----
  186. .. _class_TabBar_signal_tab_close_pressed:
  187. .. rst-class:: classref-signal
  188. **tab_close_pressed** **(** :ref:`int<class_int>` tab **)**
  189. Emitted when a tab's close button is pressed.
  190. \ **Note:** Tabs are not removed automatically once the close button is pressed, this behavior needs to be programmed manually. For example:
  191. .. tabs::
  192. .. code-tab:: gdscript
  193. $TabBar.tab_close_pressed.connect($TabBar.remove_tab)
  194. .. code-tab:: csharp
  195. GetNode<TabBar>("TabBar").TabClosePressed += GetNode<TabBar>("TabBar").RemoveTab;
  196. .. rst-class:: classref-item-separator
  197. ----
  198. .. _class_TabBar_signal_tab_hovered:
  199. .. rst-class:: classref-signal
  200. **tab_hovered** **(** :ref:`int<class_int>` tab **)**
  201. Emitted when a tab is hovered by the mouse.
  202. .. rst-class:: classref-item-separator
  203. ----
  204. .. _class_TabBar_signal_tab_rmb_clicked:
  205. .. rst-class:: classref-signal
  206. **tab_rmb_clicked** **(** :ref:`int<class_int>` tab **)**
  207. Emitted when a tab is right-clicked. :ref:`select_with_rmb<class_TabBar_property_select_with_rmb>` must be enabled.
  208. .. rst-class:: classref-item-separator
  209. ----
  210. .. _class_TabBar_signal_tab_selected:
  211. .. rst-class:: classref-signal
  212. **tab_selected** **(** :ref:`int<class_int>` tab **)**
  213. Emitted when a tab is selected via click or script, even if it is the current tab.
  214. .. rst-class:: classref-section-separator
  215. ----
  216. .. rst-class:: classref-descriptions-group
  217. Enumerations
  218. ------------
  219. .. _enum_TabBar_AlignmentMode:
  220. .. rst-class:: classref-enumeration
  221. enum **AlignmentMode**:
  222. .. _class_TabBar_constant_ALIGNMENT_LEFT:
  223. .. rst-class:: classref-enumeration-constant
  224. :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **ALIGNMENT_LEFT** = ``0``
  225. Places tabs to the left.
  226. .. _class_TabBar_constant_ALIGNMENT_CENTER:
  227. .. rst-class:: classref-enumeration-constant
  228. :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **ALIGNMENT_CENTER** = ``1``
  229. Places tabs in the middle.
  230. .. _class_TabBar_constant_ALIGNMENT_RIGHT:
  231. .. rst-class:: classref-enumeration-constant
  232. :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **ALIGNMENT_RIGHT** = ``2``
  233. Places tabs to the right.
  234. .. _class_TabBar_constant_ALIGNMENT_MAX:
  235. .. rst-class:: classref-enumeration-constant
  236. :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **ALIGNMENT_MAX** = ``3``
  237. Represents the size of the :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` enum.
  238. .. rst-class:: classref-item-separator
  239. ----
  240. .. _enum_TabBar_CloseButtonDisplayPolicy:
  241. .. rst-class:: classref-enumeration
  242. enum **CloseButtonDisplayPolicy**:
  243. .. _class_TabBar_constant_CLOSE_BUTTON_SHOW_NEVER:
  244. .. rst-class:: classref-enumeration-constant
  245. :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **CLOSE_BUTTON_SHOW_NEVER** = ``0``
  246. Never show the close buttons.
  247. .. _class_TabBar_constant_CLOSE_BUTTON_SHOW_ACTIVE_ONLY:
  248. .. rst-class:: classref-enumeration-constant
  249. :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **CLOSE_BUTTON_SHOW_ACTIVE_ONLY** = ``1``
  250. Only show the close button on the currently active tab.
  251. .. _class_TabBar_constant_CLOSE_BUTTON_SHOW_ALWAYS:
  252. .. rst-class:: classref-enumeration-constant
  253. :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **CLOSE_BUTTON_SHOW_ALWAYS** = ``2``
  254. Show the close button on all tabs.
  255. .. _class_TabBar_constant_CLOSE_BUTTON_MAX:
  256. .. rst-class:: classref-enumeration-constant
  257. :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **CLOSE_BUTTON_MAX** = ``3``
  258. Represents the size of the :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` enum.
  259. .. rst-class:: classref-section-separator
  260. ----
  261. .. rst-class:: classref-descriptions-group
  262. Property Descriptions
  263. ---------------------
  264. .. _class_TabBar_property_clip_tabs:
  265. .. rst-class:: classref-property
  266. :ref:`bool<class_bool>` **clip_tabs** = ``true``
  267. .. rst-class:: classref-property-setget
  268. - void **set_clip_tabs** **(** :ref:`bool<class_bool>` value **)**
  269. - :ref:`bool<class_bool>` **get_clip_tabs** **(** **)**
  270. 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.
  271. .. rst-class:: classref-item-separator
  272. ----
  273. .. _class_TabBar_property_current_tab:
  274. .. rst-class:: classref-property
  275. :ref:`int<class_int>` **current_tab** = ``0``
  276. .. rst-class:: classref-property-setget
  277. - void **set_current_tab** **(** :ref:`int<class_int>` value **)**
  278. - :ref:`int<class_int>` **get_current_tab** **(** **)**
  279. Select tab at index ``tab_idx``.
  280. .. rst-class:: classref-item-separator
  281. ----
  282. .. _class_TabBar_property_drag_to_rearrange_enabled:
  283. .. rst-class:: classref-property
  284. :ref:`bool<class_bool>` **drag_to_rearrange_enabled** = ``false``
  285. .. rst-class:: classref-property-setget
  286. - void **set_drag_to_rearrange_enabled** **(** :ref:`bool<class_bool>` value **)**
  287. - :ref:`bool<class_bool>` **get_drag_to_rearrange_enabled** **(** **)**
  288. If ``true``, tabs can be rearranged with mouse drag.
  289. .. rst-class:: classref-item-separator
  290. ----
  291. .. _class_TabBar_property_max_tab_width:
  292. .. rst-class:: classref-property
  293. :ref:`int<class_int>` **max_tab_width** = ``0``
  294. .. rst-class:: classref-property-setget
  295. - void **set_max_tab_width** **(** :ref:`int<class_int>` value **)**
  296. - :ref:`int<class_int>` **get_max_tab_width** **(** **)**
  297. Sets the maximum width which all tabs should be limited to. Unlimited if set to ``0``.
  298. .. rst-class:: classref-item-separator
  299. ----
  300. .. _class_TabBar_property_scroll_to_selected:
  301. .. rst-class:: classref-property
  302. :ref:`bool<class_bool>` **scroll_to_selected** = ``true``
  303. .. rst-class:: classref-property-setget
  304. - void **set_scroll_to_selected** **(** :ref:`bool<class_bool>` value **)**
  305. - :ref:`bool<class_bool>` **get_scroll_to_selected** **(** **)**
  306. If ``true``, the tab offset will be changed to keep the currently selected tab visible.
  307. .. rst-class:: classref-item-separator
  308. ----
  309. .. _class_TabBar_property_scrolling_enabled:
  310. .. rst-class:: classref-property
  311. :ref:`bool<class_bool>` **scrolling_enabled** = ``true``
  312. .. rst-class:: classref-property-setget
  313. - void **set_scrolling_enabled** **(** :ref:`bool<class_bool>` value **)**
  314. - :ref:`bool<class_bool>` **get_scrolling_enabled** **(** **)**
  315. if ``true``, the mouse's scroll wheel can be used to navigate the scroll view.
  316. .. rst-class:: classref-item-separator
  317. ----
  318. .. _class_TabBar_property_select_with_rmb:
  319. .. rst-class:: classref-property
  320. :ref:`bool<class_bool>` **select_with_rmb** = ``false``
  321. .. rst-class:: classref-property-setget
  322. - void **set_select_with_rmb** **(** :ref:`bool<class_bool>` value **)**
  323. - :ref:`bool<class_bool>` **get_select_with_rmb** **(** **)**
  324. If ``true``, enables selecting a tab with the right mouse button.
  325. .. rst-class:: classref-item-separator
  326. ----
  327. .. _class_TabBar_property_tab_alignment:
  328. .. rst-class:: classref-property
  329. :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **tab_alignment** = ``0``
  330. .. rst-class:: classref-property-setget
  331. - void **set_tab_alignment** **(** :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` value **)**
  332. - :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **get_tab_alignment** **(** **)**
  333. Sets the position at which tabs will be placed. See :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` for details.
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _class_TabBar_property_tab_close_display_policy:
  337. .. rst-class:: classref-property
  338. :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **tab_close_display_policy** = ``0``
  339. .. rst-class:: classref-property-setget
  340. - void **set_tab_close_display_policy** **(** :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` value **)**
  341. - :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **get_tab_close_display_policy** **(** **)**
  342. Sets when the close button will appear on the tabs. See :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` for details.
  343. .. rst-class:: classref-item-separator
  344. ----
  345. .. _class_TabBar_property_tab_count:
  346. .. rst-class:: classref-property
  347. :ref:`int<class_int>` **tab_count** = ``0``
  348. .. rst-class:: classref-property-setget
  349. - void **set_tab_count** **(** :ref:`int<class_int>` value **)**
  350. - :ref:`int<class_int>` **get_tab_count** **(** **)**
  351. The number of tabs currently in the bar.
  352. .. rst-class:: classref-item-separator
  353. ----
  354. .. _class_TabBar_property_tabs_rearrange_group:
  355. .. rst-class:: classref-property
  356. :ref:`int<class_int>` **tabs_rearrange_group** = ``-1``
  357. .. rst-class:: classref-property-setget
  358. - void **set_tabs_rearrange_group** **(** :ref:`int<class_int>` value **)**
  359. - :ref:`int<class_int>` **get_tabs_rearrange_group** **(** **)**
  360. **TabBar**\ s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with :ref:`drag_to_rearrange_enabled<class_TabBar_property_drag_to_rearrange_enabled>`.
  361. Setting this to ``-1`` will disable rearranging between **TabBar**\ s.
  362. .. rst-class:: classref-section-separator
  363. ----
  364. .. rst-class:: classref-descriptions-group
  365. Method Descriptions
  366. -------------------
  367. .. _class_TabBar_method_add_tab:
  368. .. rst-class:: classref-method
  369. void **add_tab** **(** :ref:`String<class_String>` title="", :ref:`Texture2D<class_Texture2D>` icon=null **)**
  370. Adds a new tab.
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_TabBar_method_clear_tabs:
  374. .. rst-class:: classref-method
  375. void **clear_tabs** **(** **)**
  376. Clears all tabs.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_TabBar_method_ensure_tab_visible:
  380. .. rst-class:: classref-method
  381. void **ensure_tab_visible** **(** :ref:`int<class_int>` idx **)**
  382. Moves the scroll view to make the tab visible.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_TabBar_method_get_offset_buttons_visible:
  386. .. rst-class:: classref-method
  387. :ref:`bool<class_bool>` **get_offset_buttons_visible** **(** **)** |const|
  388. Returns ``true`` if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible.
  389. .. rst-class:: classref-item-separator
  390. ----
  391. .. _class_TabBar_method_get_previous_tab:
  392. .. rst-class:: classref-method
  393. :ref:`int<class_int>` **get_previous_tab** **(** **)** |const|
  394. Returns the previously active tab index.
  395. .. rst-class:: classref-item-separator
  396. ----
  397. .. _class_TabBar_method_get_tab_button_icon:
  398. .. rst-class:: classref-method
  399. :ref:`Texture2D<class_Texture2D>` **get_tab_button_icon** **(** :ref:`int<class_int>` tab_idx **)** |const|
  400. Returns the icon for the right button of the tab at index ``tab_idx`` or ``null`` if the right button has no icon.
  401. .. rst-class:: classref-item-separator
  402. ----
  403. .. _class_TabBar_method_get_tab_icon:
  404. .. rst-class:: classref-method
  405. :ref:`Texture2D<class_Texture2D>` **get_tab_icon** **(** :ref:`int<class_int>` tab_idx **)** |const|
  406. Returns the icon for the tab at index ``tab_idx`` or ``null`` if the tab has no icon.
  407. .. rst-class:: classref-item-separator
  408. ----
  409. .. _class_TabBar_method_get_tab_icon_max_width:
  410. .. rst-class:: classref-method
  411. :ref:`int<class_int>` **get_tab_icon_max_width** **(** :ref:`int<class_int>` tab_idx **)** |const|
  412. Returns the maximum allowed width of the icon for the tab at index ``tab_idx``.
  413. .. rst-class:: classref-item-separator
  414. ----
  415. .. _class_TabBar_method_get_tab_idx_at_point:
  416. .. rst-class:: classref-method
  417. :ref:`int<class_int>` **get_tab_idx_at_point** **(** :ref:`Vector2<class_Vector2>` point **)** |const|
  418. 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.
  419. .. rst-class:: classref-item-separator
  420. ----
  421. .. _class_TabBar_method_get_tab_language:
  422. .. rst-class:: classref-method
  423. :ref:`String<class_String>` **get_tab_language** **(** :ref:`int<class_int>` tab_idx **)** |const|
  424. Returns tab title language code.
  425. .. rst-class:: classref-item-separator
  426. ----
  427. .. _class_TabBar_method_get_tab_metadata:
  428. .. rst-class:: classref-method
  429. :ref:`Variant<class_Variant>` **get_tab_metadata** **(** :ref:`int<class_int>` tab_idx **)** |const|
  430. Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_tab_metadata<class_TabBar_method_set_tab_metadata>`. If no metadata was previously set, returns ``null`` by default.
  431. .. rst-class:: classref-item-separator
  432. ----
  433. .. _class_TabBar_method_get_tab_offset:
  434. .. rst-class:: classref-method
  435. :ref:`int<class_int>` **get_tab_offset** **(** **)** |const|
  436. Returns the number of hidden tabs offsetted to the left.
  437. .. rst-class:: classref-item-separator
  438. ----
  439. .. _class_TabBar_method_get_tab_rect:
  440. .. rst-class:: classref-method
  441. :ref:`Rect2<class_Rect2>` **get_tab_rect** **(** :ref:`int<class_int>` tab_idx **)** |const|
  442. Returns tab :ref:`Rect2<class_Rect2>` with local position and size.
  443. .. rst-class:: classref-item-separator
  444. ----
  445. .. _class_TabBar_method_get_tab_text_direction:
  446. .. rst-class:: classref-method
  447. :ref:`TextDirection<enum_Control_TextDirection>` **get_tab_text_direction** **(** :ref:`int<class_int>` tab_idx **)** |const|
  448. Returns tab title text base writing direction.
  449. .. rst-class:: classref-item-separator
  450. ----
  451. .. _class_TabBar_method_get_tab_title:
  452. .. rst-class:: classref-method
  453. :ref:`String<class_String>` **get_tab_title** **(** :ref:`int<class_int>` tab_idx **)** |const|
  454. Returns the title of the tab at index ``tab_idx``.
  455. .. rst-class:: classref-item-separator
  456. ----
  457. .. _class_TabBar_method_is_tab_disabled:
  458. .. rst-class:: classref-method
  459. :ref:`bool<class_bool>` **is_tab_disabled** **(** :ref:`int<class_int>` tab_idx **)** |const|
  460. Returns ``true`` if the tab at index ``tab_idx`` is disabled.
  461. .. rst-class:: classref-item-separator
  462. ----
  463. .. _class_TabBar_method_is_tab_hidden:
  464. .. rst-class:: classref-method
  465. :ref:`bool<class_bool>` **is_tab_hidden** **(** :ref:`int<class_int>` tab_idx **)** |const|
  466. Returns ``true`` if the tab at index ``tab_idx`` is hidden.
  467. .. rst-class:: classref-item-separator
  468. ----
  469. .. _class_TabBar_method_move_tab:
  470. .. rst-class:: classref-method
  471. void **move_tab** **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)**
  472. Moves a tab from ``from`` to ``to``.
  473. .. rst-class:: classref-item-separator
  474. ----
  475. .. _class_TabBar_method_remove_tab:
  476. .. rst-class:: classref-method
  477. void **remove_tab** **(** :ref:`int<class_int>` tab_idx **)**
  478. Removes the tab at index ``tab_idx``.
  479. .. rst-class:: classref-item-separator
  480. ----
  481. .. _class_TabBar_method_set_tab_button_icon:
  482. .. rst-class:: classref-method
  483. void **set_tab_button_icon** **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)**
  484. Sets an ``icon`` for the button of the tab at index ``tab_idx`` (located to the right, before the close button), making it visible and clickable (See :ref:`tab_button_pressed<class_TabBar_signal_tab_button_pressed>`). Giving it a ``null`` value will hide the button.
  485. .. rst-class:: classref-item-separator
  486. ----
  487. .. _class_TabBar_method_set_tab_disabled:
  488. .. rst-class:: classref-method
  489. void **set_tab_disabled** **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` disabled **)**
  490. If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it non-interactable.
  491. .. rst-class:: classref-item-separator
  492. ----
  493. .. _class_TabBar_method_set_tab_hidden:
  494. .. rst-class:: classref-method
  495. void **set_tab_hidden** **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` hidden **)**
  496. If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappear from the tab area.
  497. .. rst-class:: classref-item-separator
  498. ----
  499. .. _class_TabBar_method_set_tab_icon:
  500. .. rst-class:: classref-method
  501. void **set_tab_icon** **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)**
  502. Sets an ``icon`` for the tab at index ``tab_idx``.
  503. .. rst-class:: classref-item-separator
  504. ----
  505. .. _class_TabBar_method_set_tab_icon_max_width:
  506. .. rst-class:: classref-method
  507. void **set_tab_icon_max_width** **(** :ref:`int<class_int>` tab_idx, :ref:`int<class_int>` width **)**
  508. 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_TabBar_theme_constant_icon_max_width>`. The height is adjusted according to the icon's ratio.
  509. .. rst-class:: classref-item-separator
  510. ----
  511. .. _class_TabBar_method_set_tab_language:
  512. .. rst-class:: classref-method
  513. void **set_tab_language** **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` language **)**
  514. Sets language code of tab title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  515. .. rst-class:: classref-item-separator
  516. ----
  517. .. _class_TabBar_method_set_tab_metadata:
  518. .. rst-class:: classref-method
  519. void **set_tab_metadata** **(** :ref:`int<class_int>` tab_idx, :ref:`Variant<class_Variant>` metadata **)**
  520. Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved later using :ref:`get_tab_metadata<class_TabBar_method_get_tab_metadata>`.
  521. .. rst-class:: classref-item-separator
  522. ----
  523. .. _class_TabBar_method_set_tab_text_direction:
  524. .. rst-class:: classref-method
  525. void **set_tab_text_direction** **(** :ref:`int<class_int>` tab_idx, :ref:`TextDirection<enum_Control_TextDirection>` direction **)**
  526. Sets tab title base writing direction.
  527. .. rst-class:: classref-item-separator
  528. ----
  529. .. _class_TabBar_method_set_tab_title:
  530. .. rst-class:: classref-method
  531. void **set_tab_title** **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` title **)**
  532. Sets a ``title`` for the tab at index ``tab_idx``.
  533. .. rst-class:: classref-section-separator
  534. ----
  535. .. rst-class:: classref-descriptions-group
  536. Theme Property Descriptions
  537. ---------------------------
  538. .. _class_TabBar_theme_color_drop_mark_color:
  539. .. rst-class:: classref-themeproperty
  540. :ref:`Color<class_Color>` **drop_mark_color** = ``Color(1, 1, 1, 1)``
  541. Modulation color for the :ref:`drop_mark<class_TabBar_theme_icon_drop_mark>` icon.
  542. .. rst-class:: classref-item-separator
  543. ----
  544. .. _class_TabBar_theme_color_font_disabled_color:
  545. .. rst-class:: classref-themeproperty
  546. :ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)``
  547. Font color of disabled tabs.
  548. .. rst-class:: classref-item-separator
  549. ----
  550. .. _class_TabBar_theme_color_font_hovered_color:
  551. .. rst-class:: classref-themeproperty
  552. :ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)``
  553. Font color of the currently hovered tab. Does not apply to the selected tab.
  554. .. rst-class:: classref-item-separator
  555. ----
  556. .. _class_TabBar_theme_color_font_outline_color:
  557. .. rst-class:: classref-themeproperty
  558. :ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)``
  559. The tint of text outline of the tab name.
  560. .. rst-class:: classref-item-separator
  561. ----
  562. .. _class_TabBar_theme_color_font_selected_color:
  563. .. rst-class:: classref-themeproperty
  564. :ref:`Color<class_Color>` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)``
  565. Font color of the currently selected tab.
  566. .. rst-class:: classref-item-separator
  567. ----
  568. .. _class_TabBar_theme_color_font_unselected_color:
  569. .. rst-class:: classref-themeproperty
  570. :ref:`Color<class_Color>` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)``
  571. Font color of the other, unselected tabs.
  572. .. rst-class:: classref-item-separator
  573. ----
  574. .. _class_TabBar_theme_constant_h_separation:
  575. .. rst-class:: classref-themeproperty
  576. :ref:`int<class_int>` **h_separation** = ``4``
  577. The horizontal separation between the elements inside tabs.
  578. .. rst-class:: classref-item-separator
  579. ----
  580. .. _class_TabBar_theme_constant_icon_max_width:
  581. .. rst-class:: classref-themeproperty
  582. :ref:`int<class_int>` **icon_max_width** = ``0``
  583. 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:`set_tab_icon_max_width<class_TabBar_method_set_tab_icon_max_width>`. The height is adjusted according to the icon's ratio.
  584. .. rst-class:: classref-item-separator
  585. ----
  586. .. _class_TabBar_theme_constant_outline_size:
  587. .. rst-class:: classref-themeproperty
  588. :ref:`int<class_int>` **outline_size** = ``0``
  589. The size of the tab text outline.
  590. \ **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_TabBar_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  591. .. rst-class:: classref-item-separator
  592. ----
  593. .. _class_TabBar_theme_font_font:
  594. .. rst-class:: classref-themeproperty
  595. :ref:`Font<class_Font>` **font**
  596. The font used to draw tab names.
  597. .. rst-class:: classref-item-separator
  598. ----
  599. .. _class_TabBar_theme_font_size_font_size:
  600. .. rst-class:: classref-themeproperty
  601. :ref:`int<class_int>` **font_size**
  602. Font size of the tab names.
  603. .. rst-class:: classref-item-separator
  604. ----
  605. .. _class_TabBar_theme_icon_close:
  606. .. rst-class:: classref-themeproperty
  607. :ref:`Texture2D<class_Texture2D>` **close**
  608. The icon for the close button (see :ref:`tab_close_display_policy<class_TabBar_property_tab_close_display_policy>`).
  609. .. rst-class:: classref-item-separator
  610. ----
  611. .. _class_TabBar_theme_icon_decrement:
  612. .. rst-class:: classref-themeproperty
  613. :ref:`Texture2D<class_Texture2D>` **decrement**
  614. 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.
  615. .. rst-class:: classref-item-separator
  616. ----
  617. .. _class_TabBar_theme_icon_decrement_highlight:
  618. .. rst-class:: classref-themeproperty
  619. :ref:`Texture2D<class_Texture2D>` **decrement_highlight**
  620. 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.
  621. .. rst-class:: classref-item-separator
  622. ----
  623. .. _class_TabBar_theme_icon_drop_mark:
  624. .. rst-class:: classref-themeproperty
  625. :ref:`Texture2D<class_Texture2D>` **drop_mark**
  626. Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_to_rearrange_enabled<class_TabBar_property_drag_to_rearrange_enabled>`).
  627. .. rst-class:: classref-item-separator
  628. ----
  629. .. _class_TabBar_theme_icon_increment:
  630. .. rst-class:: classref-themeproperty
  631. :ref:`Texture2D<class_Texture2D>` **increment**
  632. 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.
  633. .. rst-class:: classref-item-separator
  634. ----
  635. .. _class_TabBar_theme_icon_increment_highlight:
  636. .. rst-class:: classref-themeproperty
  637. :ref:`Texture2D<class_Texture2D>` **increment_highlight**
  638. 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.
  639. .. rst-class:: classref-item-separator
  640. ----
  641. .. _class_TabBar_theme_style_button_highlight:
  642. .. rst-class:: classref-themeproperty
  643. :ref:`StyleBox<class_StyleBox>` **button_highlight**
  644. Background of the tab and close buttons when they're being hovered with the cursor.
  645. .. rst-class:: classref-item-separator
  646. ----
  647. .. _class_TabBar_theme_style_button_pressed:
  648. .. rst-class:: classref-themeproperty
  649. :ref:`StyleBox<class_StyleBox>` **button_pressed**
  650. Background of the tab and close buttons when it's being pressed.
  651. .. rst-class:: classref-item-separator
  652. ----
  653. .. _class_TabBar_theme_style_tab_disabled:
  654. .. rst-class:: classref-themeproperty
  655. :ref:`StyleBox<class_StyleBox>` **tab_disabled**
  656. The style of disabled tabs.
  657. .. rst-class:: classref-item-separator
  658. ----
  659. .. _class_TabBar_theme_style_tab_hovered:
  660. .. rst-class:: classref-themeproperty
  661. :ref:`StyleBox<class_StyleBox>` **tab_hovered**
  662. The style of the currently hovered tab. Does not apply to the selected tab.
  663. \ **Note:** This style will be drawn with the same width as :ref:`tab_unselected<class_TabBar_theme_style_tab_unselected>` at minimum.
  664. .. rst-class:: classref-item-separator
  665. ----
  666. .. _class_TabBar_theme_style_tab_selected:
  667. .. rst-class:: classref-themeproperty
  668. :ref:`StyleBox<class_StyleBox>` **tab_selected**
  669. The style of the currently selected tab.
  670. .. rst-class:: classref-item-separator
  671. ----
  672. .. _class_TabBar_theme_style_tab_unselected:
  673. .. rst-class:: classref-themeproperty
  674. :ref:`StyleBox<class_StyleBox>` **tab_unselected**
  675. The style of the other, unselected tabs.
  676. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  677. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  678. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  679. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  680. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  681. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  682. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`