mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
1193 lines
63 KiB
ReStructuredText
1193 lines
63 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_TabContainer:
|
||
|
||
TabContainer
|
||
============
|
||
|
||
**Успадковує:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
Контейнер, який створює вкладку для кожного контролю дитини, відображає тільки активний контроль вкладки.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Опис
|
||
--------
|
||
|
||
Влаштовує контроль дитини в вкладку, створюючи вкладку для кожного. Відповідний контроль за активними вкладками здійснюється видимим, при цьому всі інші дитячі елементи приховані. Неконтрольовані діти.
|
||
|
||
\ **Примітка:** Розмальовка натискних вкладок здійснюється за допомогою цього вузла; :ref:`TabBar<class_TabBar>` не потрібно.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Посібники
|
||
------------------
|
||
|
||
- :doc:`Використання контейнерів <../tutorials/ui/gui_containers>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості
|
||
----------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`all_tabs_in_front<class_TabContainer_property_all_tabs_in_front>` | ``false`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`clip_tabs<class_TabContainer_property_clip_tabs>` | ``true`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`int<class_int>` | :ref:`current_tab<class_TabContainer_property_current_tab>` | ``-1`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`deselect_enabled<class_TabContainer_property_deselect_enabled>` | ``false`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>` | ``false`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` | :ref:`tab_alignment<class_TabContainer_property_tab_alignment>` | ``0`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`FocusMode<enum_Control_FocusMode>` | :ref:`tab_focus_mode<class_TabContainer_property_tab_focus_mode>` | ``2`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`TabPosition<enum_TabContainer_TabPosition>` | :ref:`tabs_position<class_TabContainer_property_tabs_position>` | ``0`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`int<class_int>` | :ref:`tabs_rearrange_group<class_TabContainer_property_tabs_rearrange_group>` | ``-1`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`tabs_visible<class_TabContainer_property_tabs_visible>` | ``true`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`use_hidden_tabs_for_min_size<class_TabContainer_property_use_hidden_tabs_for_min_size>` | ``false`` |
|
||
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методи
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Control<class_Control>` | :ref:`get_current_tab_control<class_TabContainer_method_get_current_tab_control>`\ (\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Popup<class_Popup>` | :ref:`get_popup<class_TabContainer_method_get_popup>`\ (\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_previous_tab<class_TabContainer_method_get_previous_tab>`\ (\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TabBar<class_TabBar>` | :ref:`get_tab_bar<class_TabContainer_method_get_tab_bar>`\ (\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_button_icon<class_TabContainer_method_get_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Control<class_Control>` | :ref:`get_tab_control<class_TabContainer_method_get_tab_control>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_tab_count<class_TabContainer_method_get_tab_count>`\ (\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_icon<class_TabContainer_method_get_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :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| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_tab_idx_at_point<class_TabContainer_method_get_tab_idx_at_point>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_tab_idx_from_control<class_TabContainer_method_get_tab_idx_from_control>`\ (\ control\: :ref:`Control<class_Control>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`get_tab_metadata<class_TabContainer_method_get_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_tab_title<class_TabContainer_method_get_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_tab_tooltip<class_TabContainer_method_get_tab_tooltip>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_tab_disabled<class_TabContainer_method_is_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_tab_hidden<class_TabContainer_method_is_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`select_next_available<class_TabContainer_method_select_next_available>`\ (\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`select_previous_available<class_TabContainer_method_select_previous_available>`\ (\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_popup<class_TabContainer_method_set_popup>`\ (\ popup\: :ref:`Node<class_Node>`\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_tab_button_icon<class_TabContainer_method_set_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_tab_disabled<class_TabContainer_method_set_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_tab_hidden<class_TabContainer_method_set_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_tab_icon<class_TabContainer_method_set_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |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>`\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_tab_metadata<class_TabContainer_method_set_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_tab_title<class_TabContainer_method_set_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_tab_tooltip<class_TabContainer_method_set_tab_tooltip>`\ (\ tab_idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
|
||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості теми
|
||
--------------------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`drop_mark_color<class_TabContainer_theme_color_drop_mark_color>` | ``Color(1, 1, 1, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_TabContainer_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_TabContainer_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TabContainer_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_selected_color<class_TabContainer_theme_color_font_selected_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`font_unselected_color<class_TabContainer_theme_color_font_unselected_color>` | ``Color(0.7, 0.7, 0.7, 1)`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`icon_max_width<class_TabContainer_theme_constant_icon_max_width>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`icon_separation<class_TabContainer_theme_constant_icon_separation>` | ``4`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`outline_size<class_TabContainer_theme_constant_outline_size>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`side_margin<class_TabContainer_theme_constant_side_margin>` | ``8`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`tab_separation<class_TabContainer_theme_constant_tab_separation>` | ``0`` |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Font<class_Font>` | :ref:`font<class_TabContainer_theme_font_font>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_size<class_TabContainer_theme_font_size_font_size>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`decrement<class_TabContainer_theme_icon_decrement>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_highlight<class_TabContainer_theme_icon_decrement_highlight>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`increment<class_TabContainer_theme_icon_increment>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`increment_highlight<class_TabContainer_theme_icon_increment_highlight>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`menu<class_TabContainer_theme_icon_menu>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`menu_highlight<class_TabContainer_theme_icon_menu_highlight>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_TabContainer_theme_style_panel>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`tab_disabled<class_TabContainer_theme_style_tab_disabled>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`tab_focus<class_TabContainer_theme_style_tab_focus>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`tab_hovered<class_TabContainer_theme_style_tab_hovered>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`tab_selected<class_TabContainer_theme_style_tab_selected>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`tab_unselected<class_TabContainer_theme_style_tab_unselected>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
| :ref:`StyleBox<class_StyleBox>` | :ref:`tabbar_background<class_TabContainer_theme_style_tabbar_background>` | |
|
||
+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Сигнали
|
||
--------------
|
||
|
||
.. _class_TabContainer_signal_active_tab_rearranged:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**active_tab_rearranged**\ (\ idx_to\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_active_tab_rearranged>`
|
||
|
||
Викликається, коли активну вкладку перевпорядковують перетягуванням миші. Див. :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_signal_pre_popup_pressed:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**pre_popup_pressed**\ (\ ) :ref:`🔗<class_TabContainer_signal_pre_popup_pressed>`
|
||
|
||
Після натискання кнопки **TabContainer** натисніть кнопку :ref:`Popup<class_Popup>`. Див. :ref:`set_popup()<class_TabContainer_method_set_popup>` для деталей.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_signal_tab_button_pressed:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**tab_button_pressed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_button_pressed>`
|
||
|
||
Увімкніть, коли користувач натискає на значок кнопки на цій вкладці.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_signal_tab_changed:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**tab_changed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_changed>`
|
||
|
||
Випробувано при переході на іншу вкладку.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_signal_tab_clicked:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**tab_clicked**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_clicked>`
|
||
|
||
При натисканні вкладки, навіть якщо це поточна вкладка.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_signal_tab_hovered:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**tab_hovered**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_hovered>`
|
||
|
||
Увімкніть, коли вкладка передається мишкою.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_signal_tab_selected:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**tab_selected**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_selected>`
|
||
|
||
Увімкнено, коли вкладка вибрана за допомогою кнопок, спрямованого введення, або скрипта, навіть якщо це поточний вкладок.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Переліки
|
||
----------------
|
||
|
||
.. _enum_TabContainer_TabPosition:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **TabPosition**: :ref:`🔗<enum_TabContainer_TabPosition>`
|
||
|
||
.. _class_TabContainer_constant_POSITION_TOP:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_TOP** = ``0``
|
||
|
||
Помістіть вкладку вгорі.
|
||
|
||
.. _class_TabContainer_constant_POSITION_BOTTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_BOTTOM** = ``1``
|
||
|
||
Помістіть вкладку в нижній частині. Вкладка-бар :ref:`StyleBox<class_StyleBox>` буде переповнена вертикально.
|
||
|
||
.. _class_TabContainer_constant_POSITION_MAX:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_MAX** = ``2``
|
||
|
||
Представляємо розмір tabPosition enum.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи властивостей
|
||
------------------------------------
|
||
|
||
.. _class_TabContainer_property_all_tabs_in_front:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **all_tabs_in_front** = ``false`` :ref:`🔗<class_TabContainer_property_all_tabs_in_front>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_all_tabs_in_front**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_all_tabs_in_front**\ (\ )
|
||
|
||
Якщо ``true``, всі вкладки витягуються перед панеллю. Якщо ``false``, неактивні вкладки витягуються за панеллю.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_clip_tabs:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **clip_tabs** = ``true`` :ref:`🔗<class_TabContainer_property_clip_tabs>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_clip_tabs**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_clip_tabs**\ (\ )
|
||
|
||
Якщо ``true``, вкладки, що переповнюють ширину цього вузла, будуть приховані, відображають дві кнопки навігації замість. В іншому випадку цей розмір вузла оновлюється таким чином, щоб всі вкладки були видимими.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_current_tab:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **current_tab** = ``-1`` :ref:`🔗<class_TabContainer_property_current_tab>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_current_tab**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_current_tab**\ (\ )
|
||
|
||
Індекс поточного вкладки. Коли встановлено, цей індекс :ref:`Control<class_Control>` вершина ``видких`` має значення ``true`` і всі інші встановлюються до ``false``.
|
||
|
||
Значення ``-1`` означає, що не вибрано вкладку.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_deselect_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **deselect_enabled** = ``false`` :ref:`🔗<class_TabContainer_property_deselect_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_deselect_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_deselect_enabled**\ (\ )
|
||
|
||
Якщо ``true``, всі вкладки можна видалити так, щоб не вибрано вкладку. Натисніть на :ref:`current_tab<class_TabContainer_property_current_tab>`, щоб видалити його.
|
||
|
||
Тільки заголовок вкладки буде показано, якщо не вибрано вкладки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_drag_to_rearrange_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **drag_to_rearrange_enabled** = ``false`` :ref:`🔗<class_TabContainer_property_drag_to_rearrange_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_drag_to_rearrange_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_drag_to_rearrange_enabled**\ (\ )
|
||
|
||
Якщо ``true``, вкладки можна перепланувати з перетягуванням миші.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_tab_alignment:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **tab_alignment** = ``0`` :ref:`🔗<class_TabContainer_property_tab_alignment>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tab_alignment**\ (\ value\: :ref:`AlignmentMode<enum_TabBar_AlignmentMode>`\ )
|
||
- :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **get_tab_alignment**\ (\ )
|
||
|
||
Позиція, в якій будуть розміщені вкладки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_tab_focus_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`FocusMode<enum_Control_FocusMode>` **tab_focus_mode** = ``2`` :ref:`🔗<class_TabContainer_property_tab_focus_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tab_focus_mode**\ (\ value\: :ref:`FocusMode<enum_Control_FocusMode>`\ )
|
||
- :ref:`FocusMode<enum_Control_FocusMode>` **get_tab_focus_mode**\ (\ )
|
||
|
||
Режим доступу фокусу для внутрішнього вузла :ref:`TabBar<class_TabBar>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_tabs_position:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`TabPosition<enum_TabContainer_TabPosition>` **tabs_position** = ``0`` :ref:`🔗<class_TabContainer_property_tabs_position>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tabs_position**\ (\ value\: :ref:`TabPosition<enum_TabContainer_TabPosition>`\ )
|
||
- :ref:`TabPosition<enum_TabContainer_TabPosition>` **get_tabs_position**\ (\ )
|
||
|
||
Положення панелі вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_tabs_rearrange_group:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **tabs_rearrange_group** = ``-1`` :ref:`🔗<class_TabContainer_property_tabs_rearrange_group>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tabs_rearrange_group**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_tabs_rearrange_group**\ (\ )
|
||
|
||
**TabContainer** з тим самим ідентифікатором групи задніх груп дозволить перетягування вкладок між ними. Увімкнути перетягування :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`.
|
||
|
||
Налаштування цього до ``-1`` буде відключати перетягування між **TabContainer**\ s.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_tabs_visible:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **tabs_visible** = ``true`` :ref:`🔗<class_TabContainer_property_tabs_visible>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tabs_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **are_tabs_visible**\ (\ )
|
||
|
||
Якщо ``true``, вкладки видно. Якщо ``false``, вміст вкладок і заголовки приховані.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_property_use_hidden_tabs_for_min_size:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **use_hidden_tabs_for_min_size** = ``false`` :ref:`🔗<class_TabContainer_property_use_hidden_tabs_for_min_size>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_use_hidden_tabs_for_min_size**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_use_hidden_tabs_for_min_size**\ (\ )
|
||
|
||
Якщо ``true``, дитина :ref:`Control<class_Control>` вершини, які приховані, мають мінімальний розмір, враховуються в цілому, замість того, що в даний час видно один.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи методів
|
||
--------------------------
|
||
|
||
.. _class_TabContainer_method_get_current_tab_control:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Control<class_Control>` **get_current_tab_control**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_current_tab_control>`
|
||
|
||
Повертаємо дитину :ref:`Control<class_Control>` вершину, розташованого в активному індексі вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_popup:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Popup<class_Popup>` **get_popup**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_popup>`
|
||
|
||
Повертаємо вузол :ref:`Popup<class_Popup>`, якщо один був встановлений вже з :ref:`set_popup()<class_TabContainer_method_set_popup>`.
|
||
|
||
\ **Попередження:** Це необхідний внутрішній вузол, видаляючи і звільняючи його може призвести до аварії. Якщо ви хочете приховати його або будь-який з своїх дітей, скористайтеся їх :ref:`Window.visible<class_Window_property_visible>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_previous_tab:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_previous_tab**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_previous_tab>`
|
||
|
||
Повернути індекс раніше активної вкладки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_bar:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TabBar<class_TabBar>` **get_tab_bar**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_bar>`
|
||
|
||
Повернення :ref:`TabBar<class_TabBar>`, що міститься в цьому контейнері.
|
||
|
||
\ **Попередження:** Це необхідний внутрішній вузол, видаляючи і звільняючи його або редагування вкладок може призвести до аварії. Якщо ви хочете редагувати вкладки, скористайтеся способами, передбаченими **TabContainer**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_button_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **get_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_button_icon>`
|
||
|
||
Повертаємо значок кнопки з вкладки в індекс ``tab_idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_control:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Control<class_Control>` **get_tab_control**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_control>`
|
||
|
||
Повертає вузол :ref:`Control<class_Control>` з вкладки в індекс ``tab_idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_tab_count**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_count>`
|
||
|
||
Повертає кількість вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **get_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_icon>`
|
||
|
||
Повернення :ref:`Texture2D<class_Texture2D>` для вкладки в індекс ``tab_idx`` або ``null``, якщо вкладка не має :ref:`Texture2D<class_Texture2D>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_icon_max_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
: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>`
|
||
|
||
Повертаємо максимальну допустиму ширину іконки для вкладки в індекс ``tab_idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_idx_at_point:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_tab_idx_at_point**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_idx_at_point>`
|
||
|
||
Повернення індексу вкладки в локальні координати ``пункт абзаців``. Повертаємо ``-1``, якщо точка знаходиться поза межами контролю або якщо у вас немає вкладки на переглянуту позицію.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_idx_from_control:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_tab_idx_from_control**\ (\ control\: :ref:`Control<class_Control>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_idx_from_control>`
|
||
|
||
Повертає індекс вкладки, що прив'язується до вказаного ``control``. Контроль повинен бути дитиною **TabContainer**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_metadata:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **get_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_metadata>`
|
||
|
||
Повертає набір значень метаданих до вкладки в індекс ``tab_idx`` за допомогою :ref:`set_tab_metadata()<class_TabContainer_method_set_tab_metadata>`. Якщо раніше не встановлено метадані, повертає ``null`` за замовчуванням.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_title:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_title>`
|
||
|
||
Повертає назву вкладки в індекс ``tab_idx``. Заголовок вкладки за замовчуванням до назви індексованої дочірньої вершини, але це може бути перейменден з :ref:`set_tab_title()<class_TabContainer_method_set_tab_title>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_get_tab_tooltip:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_tooltip>`
|
||
|
||
Повертає текст вкладки в індекс ``tab_idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_is_tab_disabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_is_tab_disabled>`
|
||
|
||
Повертає ``true``, якщо вкладка в індексі ``tab_idx`` вимкнена.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_is_tab_hidden:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_is_tab_hidden>`
|
||
|
||
Повертає ``true``, якщо вкладка в індексі ``tab_idx`` прихована.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_select_next_available:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **select_next_available**\ (\ ) :ref:`🔗<class_TabContainer_method_select_next_available>`
|
||
|
||
Виберіть перший доступний вкладку з більшим індексом, ніж обраний в даний час. Повернення ``true`` якщо змінено вибір вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_select_previous_available:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **select_previous_available**\ (\ ) :ref:`🔗<class_TabContainer_method_select_previous_available>`
|
||
|
||
Виберіть перший доступний вкладку з меншим індексом, ніж обраний в даний час. Повертає ``true``, якщо змінено вибір вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_set_popup:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_popup**\ (\ popup\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_TabContainer_method_set_popup>`
|
||
|
||
Якщо встановити на :ref:`Popup<class_Popup>` екземпляр вершини, пікап меню з'являється в верхньому правому куті **TabContainer** (встановивши його на ``null``, зробіть його відкатно). Клацання він буде розширювати вузол :ref:`Popup<class_Popup>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_set_tab_button_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_button_icon>`
|
||
|
||
Встановлює іконку кнопки з вкладки в індекс ``tab_idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_set_tab_disabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_disabled>`
|
||
|
||
Якщо ``disabled`` має значення ``true``, вкладка за індексом ``tab_idx`` вимикається, що робить її невзаємодіючою.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_set_tab_hidden:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_hidden>`
|
||
|
||
Якщо ``hidden`` має значення ``true``, приховує вкладку за індексом ``tab_idx``, що зникає з області вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_set_tab_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_icon>`
|
||
|
||
Встановіть іконку для вкладки в індекс ``tab_idx``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_set_tab_icon_max_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|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>`
|
||
|
||
Встановлює максимально допустиму ширину значка для вкладки з індексом ``tab_idx``. Це обмеження застосовується поверх стандартного розміру значка та поверх :ref:`icon_max_width<class_TabContainer_theme_constant_icon_max_width>`. Висота налаштовується відповідно до співвідношення сторін значка.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_set_tab_metadata:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_metadata>`
|
||
|
||
Встановіть значення метаданих для вкладки в індекс ``tab_idx``, який можна отримати пізніше за допомогою :ref:`get_tab_metadata()<class_TabContainer_method_get_tab_metadata>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_set_tab_title:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_title>`
|
||
|
||
Встановлює користувацький титул для вкладки в індекс ``tab_idx`` (tab titles default to name indexed child node). Встановіть його назад до назви дитини, щоб зробити за замовчуванням вкладки до неї знову.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_method_set_tab_tooltip:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_tooltip>`
|
||
|
||
Встановлює користувальницький інструмент для вкладки в індекс ``tab_idx``.
|
||
|
||
\ **Примітка:** За замовчуванням, якщо ``tooltip`` є порожнім і текст вкладки truncated (не всі символи вписуються в вкладку), назву буде відображатися як інструмент. Щоб приховати прилади, призначте ``" "`` як текст ``tooltip``.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи тематичної нерухомості
|
||
--------------------------------------------------------
|
||
|
||
.. _class_TabContainer_theme_color_drop_mark_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **drop_mark_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_TabContainer_theme_color_drop_mark_color>`
|
||
|
||
Модуляційний колір для іконки :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_color_font_disabled_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_TabContainer_theme_color_font_disabled_color>`
|
||
|
||
Колір шрифту відключених вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_color_font_hovered_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_TabContainer_theme_color_font_hovered_color>`
|
||
|
||
Колір шрифту в даний час ховається вкладка.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_color_font_outline_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_TabContainer_theme_color_font_outline_color>`
|
||
|
||
Вміст текстового контуру імені вкладки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_color_font_selected_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_TabContainer_theme_color_font_selected_color>`
|
||
|
||
Колір шрифту вказаної вкладки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_color_font_unselected_color:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Color<class_Color>` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)`` :ref:`🔗<class_TabContainer_theme_color_font_unselected_color>`
|
||
|
||
Колір шрифту іншого, невибрані вкладки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_constant_icon_max_width:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **icon_max_width** = ``0`` :ref:`🔗<class_TabContainer_theme_constant_icon_max_width>`
|
||
|
||
Максимальна допустима ширина іконки вкладки. Цей ліміт наноситься зверху за замовчуванням розмір іконки, але перед значенням, встановленим :ref:`TabBar.set_tab_icon_max_width()<class_TabBar_method_set_tab_icon_max_width>`. Висота регульована відповідно до співвідношення ікони.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_constant_icon_separation:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **icon_separation** = ``4`` :ref:`🔗<class_TabContainer_theme_constant_icon_separation>`
|
||
|
||
Простір між назвою вкладки та його іконою.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_constant_outline_size:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_TabContainer_theme_constant_outline_size>`
|
||
|
||
Розмір тексту вкладки.
|
||
|
||
\ **Примітка:** Якщо за допомогою шрифту :ref:`FontFile.multiканал_signed_distance_field<class_FontFile_property_multiканал_signed_distance_field>` ввімкнено, його :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` необхідно встановити принаймні *twice* значення :ref:`index_size<class_TabContainer_theme_item_index_size>` для позначення, що дає змогу виглядати правильно. В іншому випадку контур може з'явитися, щоб зрізати раніше, ніж призначений.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_constant_side_margin:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **side_margin** = ``8`` :ref:`🔗<class_TabContainer_theme_constant_side_margin>`
|
||
|
||
Проміжок на лівому або правому краях панелі вкладок, відповідно до поточного :ref:`tab_alignment<class_TabContainer_property_tab_alignment>`.
|
||
|
||
Відступ ігнорується з :ref:`TabBar.ALIGNMENT_RIGHT<class_TabBar_constant_ALIGNMENT_RIGHT>`, якщо вкладки обрізані (див. :ref:`clip_tabs<class_TabContainer_property_clip_tabs>`) або встановлено спливаюче вікно (див. :ref:`set_popup()<class_TabContainer_method_set_popup>`). Відступ завжди ігнорується з :ref:`TabBar.ALIGNMENT_CENTER<class_TabBar_constant_ALIGNMENT_CENTER>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_constant_tab_separation:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **tab_separation** = ``0`` :ref:`🔗<class_TabContainer_theme_constant_tab_separation>`
|
||
|
||
Простір між вкладками на панелі вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_font_font:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Font<class_Font>` **font** :ref:`🔗<class_TabContainer_theme_font_font>`
|
||
|
||
Шрифт, який використовується для позначення назв вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_font_size_font_size:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`int<class_int>` **font_size** :ref:`🔗<class_TabContainer_theme_font_size_font_size>`
|
||
|
||
Розмір шрифту назв вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_icon_decrement:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **decrement** :ref:`🔗<class_TabContainer_theme_icon_decrement>`
|
||
|
||
Ікона для лівої стрілки, яка з'являється, коли є занадто багато вкладок, щоб відповідати в ширину контейнера. Коли кнопка вимкнена (тобто видно першу вкладку), вона з'являється напівпрозорою.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_icon_decrement_highlight:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **decrement_highlight** :ref:`🔗<class_TabContainer_theme_icon_decrement_highlight>`
|
||
|
||
Ікона для лівої стрілки, яка з'являється, коли є занадто багато вкладок, щоб відповідати в ширину контейнера. Використовуються при натисканні кнопки з курсором.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_icon_drop_mark:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **drop_mark** :ref:`🔗<class_TabContainer_theme_icon_drop_mark>`
|
||
|
||
Ікона показана до того, що вкладка перетягування (див. :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_icon_increment:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **increment** :ref:`🔗<class_TabContainer_theme_icon_increment>`
|
||
|
||
Ікона для правої стрілки, яка з'являється, коли є занадто багато вкладок, щоб відповідати в ширину контейнера. Коли кнопка вимкнена (тобто остання вкладка видима) вона з'являється напівпрозорою.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_icon_increment_highlight:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **increment_highlight** :ref:`🔗<class_TabContainer_theme_icon_increment_highlight>`
|
||
|
||
Ікона для правої стрілки, яка з'являється, коли є занадто багато вкладок, щоб відповідати в ширину контейнера. Використовуються при натисканні кнопки з курсором.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_icon_menu:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **menu** :ref:`🔗<class_TabContainer_theme_icon_menu>`
|
||
|
||
Піктограма кнопки меню (див. :ref:`set_popup()<class_TabContainer_method_set_popup>`).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_icon_menu_highlight:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **menu_highlight** :ref:`🔗<class_TabContainer_theme_icon_menu_highlight>`
|
||
|
||
Ікона для кнопки меню (див. :ref:`set_popup()<class_TabContainer_method_set_popup>`), коли він переховається курсором.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_style_panel:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_TabContainer_theme_style_panel>`
|
||
|
||
Стиль для заповнення фону.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_style_tab_disabled:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **tab_disabled** :ref:`🔗<class_TabContainer_theme_style_tab_disabled>`
|
||
|
||
Стиль відключених вкладок.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_style_tab_focus:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **tab_focus** :ref:`🔗<class_TabContainer_theme_style_tab_focus>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` використовується при фокусі :ref:`TabBar<class_TabBar>`. :ref:`tab_focus<class_TabContainer_theme_style_tab_focus>` :ref:`StyleBox<class_StyleBox>` відображається *over* бази :ref:`StyleBox<class_StyleBox>` вибраної вкладки, тому частково прозора :ref:`StyleBox<class_StyleBox>` повинна бути використана для забезпечення бази :ref:`StyleBox<class_StyleBox>`. :ref:`StyleBox<class_StyleBox>`, який добре працює для цього. Щоб вимкнути візуальний ефект фокусу, призначте ресурс :ref:`StyleBoxEmpty<class_StyleBoxEmpty>`. Зверніть увагу, що відключення візуального ефекту фокусу буде завдати шкоди клавіатурі / керованій навігації, тому це не рекомендується для причин доступності.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_style_tab_hovered:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **tab_hovered** :ref:`🔗<class_TabContainer_theme_style_tab_hovered>`
|
||
|
||
Стиль в даний час ховається вкладка.
|
||
|
||
\ **Примітка:** Цей стиль буде складений з такою ж шириною, як :ref:`tab_unselected<class_TabContainer_theme_style_tab_unselected>` при мінімальному.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_style_tab_selected:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **tab_selected** :ref:`🔗<class_TabContainer_theme_style_tab_selected>`
|
||
|
||
Стиль вказаної вкладки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_style_tab_unselected:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **tab_unselected** :ref:`🔗<class_TabContainer_theme_style_tab_unselected>`
|
||
|
||
Стиль іншого, невибрані вкладки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TabContainer_theme_style_tabbar_background:
|
||
|
||
.. rst-class:: classref-themeproperty
|
||
|
||
:ref:`StyleBox<class_StyleBox>` **tabbar_background** :ref:`🔗<class_TabContainer_theme_style_tabbar_background>`
|
||
|
||
Стиль для фонового заповнення площі :ref:`TabBar<class_TabBar>`.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
|
||
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
|
||
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
|
||
.. |void| replace:: :abbr:`void (Значення не повертається.)`
|