Tabs.xml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Tabs" inherits="Control" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Tabs Control.
  5. </brief_description>
  6. <description>
  7. Simple tabs control, similar to [TabContainer] but is only in charge of drawing tabs, not interact with children.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="add_tab">
  15. <return type="void">
  16. </return>
  17. <argument index="0" name="title" type="String" default="&quot;&quot;">
  18. </argument>
  19. <argument index="1" name="icon" type="Texture" default="null">
  20. </argument>
  21. <description>
  22. </description>
  23. </method>
  24. <method name="ensure_tab_visible">
  25. <return type="void">
  26. </return>
  27. <argument index="0" name="idx" type="int">
  28. </argument>
  29. <description>
  30. </description>
  31. </method>
  32. <method name="get_current_tab" qualifiers="const">
  33. <return type="int">
  34. </return>
  35. <description>
  36. </description>
  37. </method>
  38. <method name="get_tab_align" qualifiers="const">
  39. <return type="int" enum="Tabs.TabAlign">
  40. </return>
  41. <description>
  42. </description>
  43. </method>
  44. <method name="get_tab_close_display_policy" qualifiers="const">
  45. <return type="int" enum="Tabs.CloseButtonDisplayPolicy">
  46. </return>
  47. <description>
  48. </description>
  49. </method>
  50. <method name="get_tab_count" qualifiers="const">
  51. <return type="int">
  52. </return>
  53. <description>
  54. </description>
  55. </method>
  56. <method name="get_tab_disabled" qualifiers="const">
  57. <return type="bool">
  58. </return>
  59. <argument index="0" name="tab_idx" type="int">
  60. </argument>
  61. <description>
  62. </description>
  63. </method>
  64. <method name="get_tab_icon" qualifiers="const">
  65. <return type="Texture">
  66. </return>
  67. <argument index="0" name="tab_idx" type="int">
  68. </argument>
  69. <description>
  70. </description>
  71. </method>
  72. <method name="get_tab_rect" qualifiers="const">
  73. <return type="Rect2">
  74. </return>
  75. <argument index="0" name="tab_idx" type="int">
  76. </argument>
  77. <description>
  78. Returns tab [Rect2] with local position and size.
  79. </description>
  80. </method>
  81. <method name="get_tab_title" qualifiers="const">
  82. <return type="String">
  83. </return>
  84. <argument index="0" name="tab_idx" type="int">
  85. </argument>
  86. <description>
  87. </description>
  88. </method>
  89. <method name="move_tab">
  90. <return type="void">
  91. </return>
  92. <argument index="0" name="from" type="int">
  93. </argument>
  94. <argument index="1" name="to" type="int">
  95. </argument>
  96. <description>
  97. Rearrange tab.
  98. </description>
  99. </method>
  100. <method name="remove_tab">
  101. <return type="void">
  102. </return>
  103. <argument index="0" name="tab_idx" type="int">
  104. </argument>
  105. <description>
  106. </description>
  107. </method>
  108. <method name="set_current_tab">
  109. <return type="void">
  110. </return>
  111. <argument index="0" name="tab_idx" type="int">
  112. </argument>
  113. <description>
  114. </description>
  115. </method>
  116. <method name="set_tab_align">
  117. <return type="void">
  118. </return>
  119. <argument index="0" name="align" type="int" enum="Tabs.TabAlign">
  120. </argument>
  121. <description>
  122. </description>
  123. </method>
  124. <method name="set_tab_close_display_policy">
  125. <return type="void">
  126. </return>
  127. <argument index="0" name="policy" type="int" enum="Tabs.CloseButtonDisplayPolicy">
  128. </argument>
  129. <description>
  130. </description>
  131. </method>
  132. <method name="set_tab_disabled">
  133. <return type="void">
  134. </return>
  135. <argument index="0" name="tab_idx" type="int">
  136. </argument>
  137. <argument index="1" name="disabled" type="bool">
  138. </argument>
  139. <description>
  140. </description>
  141. </method>
  142. <method name="set_tab_icon">
  143. <return type="void">
  144. </return>
  145. <argument index="0" name="tab_idx" type="int">
  146. </argument>
  147. <argument index="1" name="icon" type="Texture">
  148. </argument>
  149. <description>
  150. </description>
  151. </method>
  152. <method name="set_tab_title">
  153. <return type="void">
  154. </return>
  155. <argument index="0" name="tab_idx" type="int">
  156. </argument>
  157. <argument index="1" name="title" type="String">
  158. </argument>
  159. <description>
  160. </description>
  161. </method>
  162. </methods>
  163. <members>
  164. <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab">
  165. </member>
  166. <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="Tabs.CloseButtonDisplayPolicy">
  167. </member>
  168. </members>
  169. <signals>
  170. <signal name="reposition_active_tab_request">
  171. <argument index="0" name="idx_to" type="int">
  172. </argument>
  173. <description>
  174. </description>
  175. </signal>
  176. <signal name="right_button_pressed">
  177. <argument index="0" name="tab" type="int">
  178. </argument>
  179. <description>
  180. </description>
  181. </signal>
  182. <signal name="tab_changed">
  183. <argument index="0" name="tab" type="int">
  184. </argument>
  185. <description>
  186. </description>
  187. </signal>
  188. <signal name="tab_clicked">
  189. <argument index="0" name="tab" type="int">
  190. </argument>
  191. <description>
  192. </description>
  193. </signal>
  194. <signal name="tab_close">
  195. <argument index="0" name="tab" type="int">
  196. </argument>
  197. <description>
  198. </description>
  199. </signal>
  200. <signal name="tab_hover">
  201. <argument index="0" name="tab" type="int">
  202. </argument>
  203. <description>
  204. </description>
  205. </signal>
  206. </signals>
  207. <constants>
  208. <constant name="ALIGN_LEFT" value="0">
  209. </constant>
  210. <constant name="ALIGN_CENTER" value="1">
  211. </constant>
  212. <constant name="ALIGN_RIGHT" value="2">
  213. </constant>
  214. <constant name="ALIGN_MAX" value="3">
  215. </constant>
  216. <constant name="CLOSE_BUTTON_SHOW_NEVER" value="0">
  217. </constant>
  218. <constant name="CLOSE_BUTTON_SHOW_ACTIVE_ONLY" value="1">
  219. </constant>
  220. <constant name="CLOSE_BUTTON_SHOW_ALWAYS" value="2">
  221. </constant>
  222. <constant name="CLOSE_BUTTON_MAX" value="3">
  223. </constant>
  224. </constants>
  225. <theme_items>
  226. <theme_item name="button" type="StyleBox">
  227. </theme_item>
  228. <theme_item name="button_pressed" type="StyleBox">
  229. </theme_item>
  230. <theme_item name="close" type="Texture">
  231. </theme_item>
  232. <theme_item name="decrement" type="Texture">
  233. </theme_item>
  234. <theme_item name="decrement_highlight" type="Texture">
  235. </theme_item>
  236. <theme_item name="font" type="Font">
  237. </theme_item>
  238. <theme_item name="font_color_bg" type="Color">
  239. </theme_item>
  240. <theme_item name="font_color_disabled" type="Color">
  241. </theme_item>
  242. <theme_item name="font_color_fg" type="Color">
  243. </theme_item>
  244. <theme_item name="hseparation" type="int">
  245. </theme_item>
  246. <theme_item name="increment" type="Texture">
  247. </theme_item>
  248. <theme_item name="increment_highlight" type="Texture">
  249. </theme_item>
  250. <theme_item name="label_valign_bg" type="int">
  251. </theme_item>
  252. <theme_item name="label_valign_fg" type="int">
  253. </theme_item>
  254. <theme_item name="panel" type="StyleBox">
  255. </theme_item>
  256. <theme_item name="tab_bg" type="StyleBox">
  257. </theme_item>
  258. <theme_item name="tab_fg" type="StyleBox">
  259. </theme_item>
  260. <theme_item name="top_margin" type="int">
  261. </theme_item>
  262. </theme_items>
  263. </class>