.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_TabContainer: TabContainer ============ **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Tabbed Container. Member Functions ---------------- +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`are_tabs_visible` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_current_tab` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`get_current_tab_control` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Popup` | :ref:`get_popup` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_previous_tab` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_align` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`get_tab_control` **(** :ref:`int` idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_count` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_current_tab` **(** :ref:`int` tab_idx **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_popup` **(** :ref:`Popup` popup **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_align` **(** :ref:`int` align **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture` icon **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tabs_visible` **(** :ref:`bool` visible **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- - **pre_popup_pressed** **(** **)** - **tab_changed** **(** :ref:`int` tab **)** Emitted when a tab gets selected. Same behavior as tab_selected signal for backward compatibility. Note: In Godot v3.0+ this will change to be only emitted when tab gets changed. - **tab_selected** **(** :ref:`int` tab **)** Emitted when a tab is being selected, even if it is the same tab. Description ----------- Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one. Children controls of this one automatically. Member Function Description --------------------------- .. _class_TabContainer_are_tabs_visible: - :ref:`bool` **are_tabs_visible** **(** **)** const Return whether the tabs should be visible or hidden. .. _class_TabContainer_get_current_tab: - :ref:`int` **get_current_tab** **(** **)** const Return the current tab index that is being shown. .. _class_TabContainer_get_current_tab_control: - :ref:`Control` **get_current_tab_control** **(** **)** const Return the current tab control that is being shown. .. _class_TabContainer_get_popup: - :ref:`Popup` **get_popup** **(** **)** const .. _class_TabContainer_get_previous_tab: - :ref:`int` **get_previous_tab** **(** **)** const Return the previous tab index that was being shown. .. _class_TabContainer_get_tab_align: - :ref:`int` **get_tab_align** **(** **)** const Return tab alignment, from the ALIGN\_\* enum. .. _class_TabContainer_get_tab_control: - :ref:`Control` **get_tab_control** **(** :ref:`int` idx **)** const Return the current tab control that is being shown. .. _class_TabContainer_get_tab_count: - :ref:`int` **get_tab_count** **(** **)** const Return the amount of tabs. .. _class_TabContainer_get_tab_disabled: - :ref:`bool` **get_tab_disabled** **(** :ref:`int` tab_idx **)** const .. _class_TabContainer_get_tab_icon: - :ref:`Texture` **get_tab_icon** **(** :ref:`int` tab_idx **)** const .. _class_TabContainer_get_tab_title: - :ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** const Return the title for the tab. Tab titles are by default the children node name, but this can be overridden. .. _class_TabContainer_set_current_tab: - void **set_current_tab** **(** :ref:`int` tab_idx **)** Bring a tab (and the Control it represents) to the front, and hide the rest. .. _class_TabContainer_set_popup: - void **set_popup** **(** :ref:`Node` popup **)** .. _class_TabContainer_set_tab_align: - void **set_tab_align** **(** :ref:`int` align **)** Set tab alignment, from the ALIGN\_\* enum. Moves tabs to the left, right or center. .. _class_TabContainer_set_tab_disabled: - void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** .. _class_TabContainer_set_tab_icon: - void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture` icon **)** Set an icon for a tab. .. _class_TabContainer_set_tab_title: - void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** Set a title for the tab. Tab titles are by default the children node name, but this can be overridden. .. _class_TabContainer_set_tabs_visible: - void **set_tabs_visible** **(** :ref:`bool` visible **)** Set whether the tabs should be visible or hidden.