class_tabs.rst 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Tabs.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Tabs:
  5. Tabs
  6. ====
  7. **Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Tabs Control.
  12. Member Functions
  13. ----------------
  14. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`add_tab<class_Tabs_add_tab>` **(** :ref:`String<class_string>` title="", :ref:`Texture<class_texture>` icon=null **)** |
  16. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`ensure_tab_visible<class_Tabs_ensure_tab_visible>` **(** :ref:`int<class_int>` idx **)** |
  18. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`get_offset_buttons_visible<class_Tabs_get_offset_buttons_visible>` **(** **)** const |
  20. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`int<class_int>` | :ref:`get_tab_count<class_Tabs_get_tab_count>` **(** **)** const |
  22. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`get_tab_disabled<class_Tabs_get_tab_disabled>` **(** :ref:`int<class_int>` tab_idx **)** const |
  24. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`Texture<class_texture>` | :ref:`get_tab_icon<class_Tabs_get_tab_icon>` **(** :ref:`int<class_int>` tab_idx **)** const |
  26. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`get_tab_offset<class_Tabs_get_tab_offset>` **(** **)** const |
  28. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`Rect2<class_rect2>` | :ref:`get_tab_rect<class_Tabs_get_tab_rect>` **(** :ref:`int<class_int>` tab_idx **)** const |
  30. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`String<class_string>` | :ref:`get_tab_title<class_Tabs_get_tab_title>` **(** :ref:`int<class_int>` tab_idx **)** const |
  32. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`move_tab<class_Tabs_move_tab>` **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** |
  34. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`remove_tab<class_Tabs_remove_tab>` **(** :ref:`int<class_int>` tab_idx **)** |
  36. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_tab_disabled<class_Tabs_set_tab_disabled>` **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` disabled **)** |
  38. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_tab_icon<class_Tabs_set_tab_icon>` **(** :ref:`int<class_int>` tab_idx, :ref:`Texture<class_texture>` icon **)** |
  40. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`set_tab_title<class_Tabs_set_tab_title>` **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_string>` title **)** |
  42. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  43. Signals
  44. -------
  45. .. _class_Tabs_reposition_active_tab_request:
  46. - **reposition_active_tab_request** **(** :ref:`int<class_int>` idx_to **)**
  47. .. _class_Tabs_right_button_pressed:
  48. - **right_button_pressed** **(** :ref:`int<class_int>` tab **)**
  49. .. _class_Tabs_tab_changed:
  50. - **tab_changed** **(** :ref:`int<class_int>` tab **)**
  51. .. _class_Tabs_tab_clicked:
  52. - **tab_clicked** **(** :ref:`int<class_int>` tab **)**
  53. .. _class_Tabs_tab_close:
  54. - **tab_close** **(** :ref:`int<class_int>` tab **)**
  55. .. _class_Tabs_tab_hover:
  56. - **tab_hover** **(** :ref:`int<class_int>` tab **)**
  57. Member Variables
  58. ----------------
  59. .. _class_Tabs_current_tab:
  60. - :ref:`int<class_int>` **current_tab**
  61. .. _class_Tabs_scrolling_enabled:
  62. - :ref:`bool<class_bool>` **scrolling_enabled**
  63. .. _class_Tabs_tab_align:
  64. - :ref:`TabAlign<enum_tabs_tabalign>` **tab_align**
  65. .. _class_Tabs_tab_close_display_policy:
  66. - :ref:`CloseButtonDisplayPolicy<enum_tabs_closebuttondisplaypolicy>` **tab_close_display_policy**
  67. Enums
  68. -----
  69. .. _enum_Tabs_CloseButtonDisplayPolicy:
  70. enum **CloseButtonDisplayPolicy**
  71. - **CLOSE_BUTTON_SHOW_NEVER** = **0**
  72. - **CLOSE_BUTTON_SHOW_ACTIVE_ONLY** = **1**
  73. - **CLOSE_BUTTON_SHOW_ALWAYS** = **2**
  74. - **CLOSE_BUTTON_MAX** = **3**
  75. .. _enum_Tabs_TabAlign:
  76. enum **TabAlign**
  77. - **ALIGN_LEFT** = **0**
  78. - **ALIGN_CENTER** = **1**
  79. - **ALIGN_RIGHT** = **2**
  80. - **ALIGN_MAX** = **3**
  81. Description
  82. -----------
  83. Simple tabs control, similar to :ref:`TabContainer<class_tabcontainer>` but is only in charge of drawing tabs, not interact with children.
  84. Member Function Description
  85. ---------------------------
  86. .. _class_Tabs_add_tab:
  87. - void **add_tab** **(** :ref:`String<class_string>` title="", :ref:`Texture<class_texture>` icon=null **)**
  88. .. _class_Tabs_ensure_tab_visible:
  89. - void **ensure_tab_visible** **(** :ref:`int<class_int>` idx **)**
  90. .. _class_Tabs_get_offset_buttons_visible:
  91. - :ref:`bool<class_bool>` **get_offset_buttons_visible** **(** **)** const
  92. .. _class_Tabs_get_tab_count:
  93. - :ref:`int<class_int>` **get_tab_count** **(** **)** const
  94. .. _class_Tabs_get_tab_disabled:
  95. - :ref:`bool<class_bool>` **get_tab_disabled** **(** :ref:`int<class_int>` tab_idx **)** const
  96. .. _class_Tabs_get_tab_icon:
  97. - :ref:`Texture<class_texture>` **get_tab_icon** **(** :ref:`int<class_int>` tab_idx **)** const
  98. .. _class_Tabs_get_tab_offset:
  99. - :ref:`int<class_int>` **get_tab_offset** **(** **)** const
  100. .. _class_Tabs_get_tab_rect:
  101. - :ref:`Rect2<class_rect2>` **get_tab_rect** **(** :ref:`int<class_int>` tab_idx **)** const
  102. Returns tab :ref:`Rect2<class_rect2>` with local position and size.
  103. .. _class_Tabs_get_tab_title:
  104. - :ref:`String<class_string>` **get_tab_title** **(** :ref:`int<class_int>` tab_idx **)** const
  105. .. _class_Tabs_move_tab:
  106. - void **move_tab** **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)**
  107. Rearrange tab.
  108. .. _class_Tabs_remove_tab:
  109. - void **remove_tab** **(** :ref:`int<class_int>` tab_idx **)**
  110. .. _class_Tabs_set_tab_disabled:
  111. - void **set_tab_disabled** **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` disabled **)**
  112. .. _class_Tabs_set_tab_icon:
  113. - void **set_tab_icon** **(** :ref:`int<class_int>` tab_idx, :ref:`Texture<class_texture>` icon **)**
  114. .. _class_Tabs_set_tab_title:
  115. - void **set_tab_title** **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_string>` title **)**