class_tabcontainer.rst 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_TabContainer:
  4. TabContainer
  5. ============
  6. **Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Tabbed Container.
  11. Member Functions
  12. ----------------
  13. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`bool<class_bool>` | :ref:`are_tabs_visible<class_TabContainer_are_tabs_visible>` **(** **)** const |
  15. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`get_current_tab<class_TabContainer_get_current_tab>` **(** **)** const |
  17. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`Control<class_control>` | :ref:`get_current_tab_control<class_TabContainer_get_current_tab_control>` **(** **)** const |
  19. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`Popup<class_popup>` | :ref:`get_popup<class_TabContainer_get_popup>` **(** **)** const |
  21. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`get_previous_tab<class_TabContainer_get_previous_tab>` **(** **)** const |
  23. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`int<class_int>` | :ref:`get_tab_align<class_TabContainer_get_tab_align>` **(** **)** const |
  25. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`Control<class_control>` | :ref:`get_tab_control<class_TabContainer_get_tab_control>` **(** :ref:`int<class_int>` idx **)** const |
  27. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`int<class_int>` | :ref:`get_tab_count<class_TabContainer_get_tab_count>` **(** **)** const |
  29. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`Texture<class_texture>` | :ref:`get_tab_icon<class_TabContainer_get_tab_icon>` **(** :ref:`int<class_int>` tab_idx **)** const |
  31. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`String<class_string>` | :ref:`get_tab_title<class_TabContainer_get_tab_title>` **(** :ref:`int<class_int>` tab_idx **)** const |
  33. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`set_current_tab<class_TabContainer_set_current_tab>` **(** :ref:`int<class_int>` tab_idx **)** |
  35. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`set_popup<class_TabContainer_set_popup>` **(** :ref:`Popup<class_popup>` popup **)** |
  37. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`set_tab_align<class_TabContainer_set_tab_align>` **(** :ref:`int<class_int>` align **)** |
  39. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`set_tab_icon<class_TabContainer_set_tab_icon>` **(** :ref:`int<class_int>` tab_idx, :ref:`Texture<class_texture>` icon **)** |
  41. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`set_tab_title<class_TabContainer_set_tab_title>` **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_string>` title **)** |
  43. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  44. | void | :ref:`set_tabs_visible<class_TabContainer_set_tabs_visible>` **(** :ref:`bool<class_bool>` visible **)** |
  45. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  46. Signals
  47. -------
  48. - **pre_popup_pressed** **(** **)**
  49. - **tab_changed** **(** :ref:`int<class_int>` tab **)**
  50. 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.
  51. - **tab_selected** **(** :ref:`int<class_int>` tab **)**
  52. Emitted when a tab is being selected, even if it is the same tab.
  53. Description
  54. -----------
  55. 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.
  56. Children controls of this one automatically.
  57. Member Function Description
  58. ---------------------------
  59. .. _class_TabContainer_are_tabs_visible:
  60. - :ref:`bool<class_bool>` **are_tabs_visible** **(** **)** const
  61. Return whether the tabs should be visible or hidden.
  62. .. _class_TabContainer_get_current_tab:
  63. - :ref:`int<class_int>` **get_current_tab** **(** **)** const
  64. Return the current tab index that is being shown.
  65. .. _class_TabContainer_get_current_tab_control:
  66. - :ref:`Control<class_control>` **get_current_tab_control** **(** **)** const
  67. Return the current tab control that is being shown.
  68. .. _class_TabContainer_get_popup:
  69. - :ref:`Popup<class_popup>` **get_popup** **(** **)** const
  70. .. _class_TabContainer_get_previous_tab:
  71. - :ref:`int<class_int>` **get_previous_tab** **(** **)** const
  72. Return the previous tab index that was being shown.
  73. .. _class_TabContainer_get_tab_align:
  74. - :ref:`int<class_int>` **get_tab_align** **(** **)** const
  75. Return tab alignment, from the ALIGN\_\* enum.
  76. .. _class_TabContainer_get_tab_control:
  77. - :ref:`Control<class_control>` **get_tab_control** **(** :ref:`int<class_int>` idx **)** const
  78. .. _class_TabContainer_get_tab_count:
  79. - :ref:`int<class_int>` **get_tab_count** **(** **)** const
  80. Return the amount of tabs.
  81. .. _class_TabContainer_get_tab_icon:
  82. - :ref:`Texture<class_texture>` **get_tab_icon** **(** :ref:`int<class_int>` tab_idx **)** const
  83. .. _class_TabContainer_get_tab_title:
  84. - :ref:`String<class_string>` **get_tab_title** **(** :ref:`int<class_int>` tab_idx **)** const
  85. Return the title for the tab. Tab titles are by default the children node name, but this can be overridden.
  86. .. _class_TabContainer_set_current_tab:
  87. - void **set_current_tab** **(** :ref:`int<class_int>` tab_idx **)**
  88. Bring a tab (and the Control it represents) to the front, and hide the rest.
  89. .. _class_TabContainer_set_popup:
  90. - void **set_popup** **(** :ref:`Popup<class_popup>` popup **)**
  91. .. _class_TabContainer_set_tab_align:
  92. - void **set_tab_align** **(** :ref:`int<class_int>` align **)**
  93. Set tab alignment, from the ALIGN\_\* enum. Moves tabs to the left, right or center.
  94. .. _class_TabContainer_set_tab_icon:
  95. - void **set_tab_icon** **(** :ref:`int<class_int>` tab_idx, :ref:`Texture<class_texture>` icon **)**
  96. Set an icon for a tab.
  97. .. _class_TabContainer_set_tab_title:
  98. - void **set_tab_title** **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_string>` title **)**
  99. Set a title for the tab. Tab titles are by default the children node name, but this can be overridden.
  100. .. _class_TabContainer_set_tabs_visible:
  101. - void **set_tabs_visible** **(** :ref:`bool<class_bool>` visible **)**
  102. Set whether the tabs should be visible or hidden.