class_theme.rst 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Theme.xml.
  6. .. _class_Theme:
  7. Theme
  8. =====
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A resource used for styling/skinning :ref:`Control<class_Control>`\ s and :ref:`Window<class_Window>`\ s.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A resource used for styling/skinning :ref:`Control<class_Control>` and :ref:`Window<class_Window>` nodes. While individual controls can be styled using their local theme overrides (see :ref:`Control.add_theme_color_override<class_Control_method_add_theme_color_override>`), theme resources allow you to store and apply the same settings across all controls sharing the same type (e.g. style all :ref:`Button<class_Button>`\ s the same). One theme resource can be used for the entire project, but you can also set a separate theme resource to a branch of control nodes. A theme resource assigned to a control applies to the control itself, as well as all of its direct and indirect children (as long as a chain of controls is uninterrupted).
  15. Use :ref:`ProjectSettings.gui/theme/custom<class_ProjectSettings_property_gui/theme/custom>` to set up a project-scope theme that will be available to every control in your project.
  16. Use :ref:`Control.theme<class_Control_property_theme>` of any control node to set up a theme that will be available to that control and all of its direct and indirect children.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`GUI skinning <../tutorials/ui/gui_skinning>`
  21. - :doc:`Using the theme editor <../tutorials/ui/gui_using_theme_editor>`
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +---------------------------+--------------------------------------------------------------------+---------+
  28. | :ref:`float<class_float>` | :ref:`default_base_scale<class_Theme_property_default_base_scale>` | ``0.0`` |
  29. +---------------------------+--------------------------------------------------------------------+---------+
  30. | :ref:`Font<class_Font>` | :ref:`default_font<class_Theme_property_default_font>` | |
  31. +---------------------------+--------------------------------------------------------------------+---------+
  32. | :ref:`int<class_int>` | :ref:`default_font_size<class_Theme_property_default_font_size>` | ``-1`` |
  33. +---------------------------+--------------------------------------------------------------------+---------+
  34. .. rst-class:: classref-reftable-group
  35. Methods
  36. -------
  37. .. table::
  38. :widths: auto
  39. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | |void| | :ref:`add_type<class_Theme_method_add_type>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |
  41. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | |void| | :ref:`clear<class_Theme_method_clear>`\ (\ ) |
  43. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`clear_color<class_Theme_method_clear_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  45. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | |void| | :ref:`clear_constant<class_Theme_method_clear_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  47. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | |void| | :ref:`clear_font<class_Theme_method_clear_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  49. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | |void| | :ref:`clear_font_size<class_Theme_method_clear_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  51. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | |void| | :ref:`clear_icon<class_Theme_method_clear_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  53. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | |void| | :ref:`clear_stylebox<class_Theme_method_clear_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  55. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | |void| | :ref:`clear_theme_item<class_Theme_method_clear_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  57. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | |void| | :ref:`clear_type_variation<class_Theme_method_clear_type_variation>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |
  59. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`Color<class_Color>` | :ref:`get_color<class_Theme_method_get_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  61. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_color_list<class_Theme_method_get_color_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
  63. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_color_type_list<class_Theme_method_get_color_type_list>`\ (\ ) |const| |
  65. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`get_constant<class_Theme_method_get_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  67. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_constant_list<class_Theme_method_get_constant_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
  69. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_constant_type_list<class_Theme_method_get_constant_type_list>`\ (\ ) |const| |
  71. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`Font<class_Font>` | :ref:`get_font<class_Theme_method_get_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  73. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_list<class_Theme_method_get_font_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
  75. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`int<class_int>` | :ref:`get_font_size<class_Theme_method_get_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  77. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_size_list<class_Theme_method_get_font_size_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
  79. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_size_type_list<class_Theme_method_get_font_size_type_list>`\ (\ ) |const| |
  81. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_type_list<class_Theme_method_get_font_type_list>`\ (\ ) |const| |
  83. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon<class_Theme_method_get_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  85. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_icon_list<class_Theme_method_get_icon_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
  87. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_icon_type_list<class_Theme_method_get_icon_type_list>`\ (\ ) |const| |
  89. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`StyleBox<class_StyleBox>` | :ref:`get_stylebox<class_Theme_method_get_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  91. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_stylebox_list<class_Theme_method_get_stylebox_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
  93. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_stylebox_type_list<class_Theme_method_get_stylebox_type_list>`\ (\ ) |const| |
  95. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`Variant<class_Variant>` | :ref:`get_theme_item<class_Theme_method_get_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  97. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_theme_item_list<class_Theme_method_get_theme_item_list>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, theme_type\: :ref:`String<class_String>`\ ) |const| |
  99. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_theme_item_type_list<class_Theme_method_get_theme_item_type_list>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`\ ) |const| |
  101. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_type_list<class_Theme_method_get_type_list>`\ (\ ) |const| |
  103. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`StringName<class_StringName>` | :ref:`get_type_variation_base<class_Theme_method_get_type_variation_base>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  105. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_type_variation_list<class_Theme_method_get_type_variation_list>`\ (\ base_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  107. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`bool<class_bool>` | :ref:`has_color<class_Theme_method_has_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  109. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`bool<class_bool>` | :ref:`has_constant<class_Theme_method_has_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  111. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`bool<class_bool>` | :ref:`has_default_base_scale<class_Theme_method_has_default_base_scale>`\ (\ ) |const| |
  113. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`bool<class_bool>` | :ref:`has_default_font<class_Theme_method_has_default_font>`\ (\ ) |const| |
  115. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`bool<class_bool>` | :ref:`has_default_font_size<class_Theme_method_has_default_font_size>`\ (\ ) |const| |
  117. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`bool<class_bool>` | :ref:`has_font<class_Theme_method_has_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  119. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`bool<class_bool>` | :ref:`has_font_size<class_Theme_method_has_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  121. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`bool<class_bool>` | :ref:`has_icon<class_Theme_method_has_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  123. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`bool<class_bool>` | :ref:`has_stylebox<class_Theme_method_has_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  125. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`bool<class_bool>` | :ref:`has_theme_item<class_Theme_method_has_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  127. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`bool<class_bool>` | :ref:`is_type_variation<class_Theme_method_is_type_variation>`\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) |const| |
  129. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | |void| | :ref:`merge_with<class_Theme_method_merge_with>`\ (\ other\: :ref:`Theme<class_Theme>`\ ) |
  131. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | |void| | :ref:`remove_type<class_Theme_method_remove_type>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |
  133. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | |void| | :ref:`rename_color<class_Theme_method_rename_color>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  135. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | |void| | :ref:`rename_constant<class_Theme_method_rename_constant>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  137. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | |void| | :ref:`rename_font<class_Theme_method_rename_font>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  139. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | |void| | :ref:`rename_font_size<class_Theme_method_rename_font_size>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  141. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | |void| | :ref:`rename_icon<class_Theme_method_rename_icon>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  143. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | |void| | :ref:`rename_stylebox<class_Theme_method_rename_stylebox>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  145. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | |void| | :ref:`rename_theme_item<class_Theme_method_rename_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
  147. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | |void| | :ref:`set_color<class_Theme_method_set_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) |
  149. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | |void| | :ref:`set_constant<class_Theme_method_set_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) |
  151. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | |void| | :ref:`set_font<class_Theme_method_set_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) |
  153. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | |void| | :ref:`set_font_size<class_Theme_method_set_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) |
  155. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | |void| | :ref:`set_icon<class_Theme_method_set_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
  157. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | |void| | :ref:`set_stylebox<class_Theme_method_set_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`StyleBox<class_StyleBox>`\ ) |
  159. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | |void| | :ref:`set_theme_item<class_Theme_method_set_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |
  161. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | |void| | :ref:`set_type_variation<class_Theme_method_set_type_variation>`\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) |
  163. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. .. rst-class:: classref-section-separator
  165. ----
  166. .. rst-class:: classref-descriptions-group
  167. Enumerations
  168. ------------
  169. .. _enum_Theme_DataType:
  170. .. rst-class:: classref-enumeration
  171. enum **DataType**: :ref:`๐Ÿ”—<enum_Theme_DataType>`
  172. .. _class_Theme_constant_DATA_TYPE_COLOR:
  173. .. rst-class:: classref-enumeration-constant
  174. :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_COLOR** = ``0``
  175. Theme's :ref:`Color<class_Color>` item type.
  176. .. _class_Theme_constant_DATA_TYPE_CONSTANT:
  177. .. rst-class:: classref-enumeration-constant
  178. :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_CONSTANT** = ``1``
  179. Theme's constant item type.
  180. .. _class_Theme_constant_DATA_TYPE_FONT:
  181. .. rst-class:: classref-enumeration-constant
  182. :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_FONT** = ``2``
  183. Theme's :ref:`Font<class_Font>` item type.
  184. .. _class_Theme_constant_DATA_TYPE_FONT_SIZE:
  185. .. rst-class:: classref-enumeration-constant
  186. :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_FONT_SIZE** = ``3``
  187. Theme's font size item type.
  188. .. _class_Theme_constant_DATA_TYPE_ICON:
  189. .. rst-class:: classref-enumeration-constant
  190. :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_ICON** = ``4``
  191. Theme's icon :ref:`Texture2D<class_Texture2D>` item type.
  192. .. _class_Theme_constant_DATA_TYPE_STYLEBOX:
  193. .. rst-class:: classref-enumeration-constant
  194. :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_STYLEBOX** = ``5``
  195. Theme's :ref:`StyleBox<class_StyleBox>` item type.
  196. .. _class_Theme_constant_DATA_TYPE_MAX:
  197. .. rst-class:: classref-enumeration-constant
  198. :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_MAX** = ``6``
  199. Maximum value for the DataType enum.
  200. .. rst-class:: classref-section-separator
  201. ----
  202. .. rst-class:: classref-descriptions-group
  203. Property Descriptions
  204. ---------------------
  205. .. _class_Theme_property_default_base_scale:
  206. .. rst-class:: classref-property
  207. :ref:`float<class_float>` **default_base_scale** = ``0.0`` :ref:`๐Ÿ”—<class_Theme_property_default_base_scale>`
  208. .. rst-class:: classref-property-setget
  209. - |void| **set_default_base_scale**\ (\ value\: :ref:`float<class_float>`\ )
  210. - :ref:`float<class_float>` **get_default_base_scale**\ (\ )
  211. The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to ``0.0``, the global scale factor is used (see :ref:`ThemeDB.fallback_base_scale<class_ThemeDB_property_fallback_base_scale>`).
  212. Use :ref:`has_default_base_scale<class_Theme_method_has_default_base_scale>` to check if this value is valid.
  213. .. rst-class:: classref-item-separator
  214. ----
  215. .. _class_Theme_property_default_font:
  216. .. rst-class:: classref-property
  217. :ref:`Font<class_Font>` **default_font** :ref:`๐Ÿ”—<class_Theme_property_default_font>`
  218. .. rst-class:: classref-property-setget
  219. - |void| **set_default_font**\ (\ value\: :ref:`Font<class_Font>`\ )
  220. - :ref:`Font<class_Font>` **get_default_font**\ (\ )
  221. The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font<class_ThemeDB_property_fallback_font>`).
  222. Use :ref:`has_default_font<class_Theme_method_has_default_font>` to check if this value is valid.
  223. .. rst-class:: classref-item-separator
  224. ----
  225. .. _class_Theme_property_default_font_size:
  226. .. rst-class:: classref-property
  227. :ref:`int<class_int>` **default_font_size** = ``-1`` :ref:`๐Ÿ”—<class_Theme_property_default_font_size>`
  228. .. rst-class:: classref-property-setget
  229. - |void| **set_default_font_size**\ (\ value\: :ref:`int<class_int>`\ )
  230. - :ref:`int<class_int>` **get_default_font_size**\ (\ )
  231. The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font_size<class_ThemeDB_property_fallback_font_size>`).
  232. Values below ``1`` are invalid and can be used to unset the property. Use :ref:`has_default_font_size<class_Theme_method_has_default_font_size>` to check if this value is valid.
  233. .. rst-class:: classref-section-separator
  234. ----
  235. .. rst-class:: classref-descriptions-group
  236. Method Descriptions
  237. -------------------
  238. .. _class_Theme_method_add_type:
  239. .. rst-class:: classref-method
  240. |void| **add_type**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_add_type>`
  241. Adds an empty theme type for every valid data type.
  242. \ **Note:** Empty types are not saved with the theme. This method only exists to perform in-memory changes to the resource. Use available ``set_*`` methods to add theme items.
  243. .. rst-class:: classref-item-separator
  244. ----
  245. .. _class_Theme_method_clear:
  246. .. rst-class:: classref-method
  247. |void| **clear**\ (\ ) :ref:`๐Ÿ”—<class_Theme_method_clear>`
  248. Removes all the theme properties defined on the theme resource.
  249. .. rst-class:: classref-item-separator
  250. ----
  251. .. _class_Theme_method_clear_color:
  252. .. rst-class:: classref-method
  253. |void| **clear_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_clear_color>`
  254. Removes the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type``, if it exists.
  255. Fails if it doesn't exist. Use :ref:`has_color<class_Theme_method_has_color>` to check for existence.
  256. .. rst-class:: classref-item-separator
  257. ----
  258. .. _class_Theme_method_clear_constant:
  259. .. rst-class:: classref-method
  260. |void| **clear_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_clear_constant>`
  261. Removes the constant property defined by ``name`` and ``theme_type``, if it exists.
  262. Fails if it doesn't exist. Use :ref:`has_constant<class_Theme_method_has_constant>` to check for existence.
  263. .. rst-class:: classref-item-separator
  264. ----
  265. .. _class_Theme_method_clear_font:
  266. .. rst-class:: classref-method
  267. |void| **clear_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_clear_font>`
  268. Removes the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type``, if it exists.
  269. Fails if it doesn't exist. Use :ref:`has_font<class_Theme_method_has_font>` to check for existence.
  270. .. rst-class:: classref-item-separator
  271. ----
  272. .. _class_Theme_method_clear_font_size:
  273. .. rst-class:: classref-method
  274. |void| **clear_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_clear_font_size>`
  275. Removes the font size property defined by ``name`` and ``theme_type``, if it exists.
  276. Fails if it doesn't exist. Use :ref:`has_font_size<class_Theme_method_has_font_size>` to check for existence.
  277. .. rst-class:: classref-item-separator
  278. ----
  279. .. _class_Theme_method_clear_icon:
  280. .. rst-class:: classref-method
  281. |void| **clear_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_clear_icon>`
  282. Removes the icon property defined by ``name`` and ``theme_type``, if it exists.
  283. Fails if it doesn't exist. Use :ref:`has_icon<class_Theme_method_has_icon>` to check for existence.
  284. .. rst-class:: classref-item-separator
  285. ----
  286. .. _class_Theme_method_clear_stylebox:
  287. .. rst-class:: classref-method
  288. |void| **clear_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_clear_stylebox>`
  289. Removes the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type``, if it exists.
  290. Fails if it doesn't exist. Use :ref:`has_stylebox<class_Theme_method_has_stylebox>` to check for existence.
  291. .. rst-class:: classref-item-separator
  292. ----
  293. .. _class_Theme_method_clear_theme_item:
  294. .. rst-class:: classref-method
  295. |void| **clear_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_clear_theme_item>`
  296. Removes the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists.
  297. Fails if it doesn't exist. Use :ref:`has_theme_item<class_Theme_method_has_theme_item>` to check for existence.
  298. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
  299. .. rst-class:: classref-item-separator
  300. ----
  301. .. _class_Theme_method_clear_type_variation:
  302. .. rst-class:: classref-method
  303. |void| **clear_type_variation**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_clear_type_variation>`
  304. Unmarks ``theme_type`` as being a variation of another theme type. See :ref:`set_type_variation<class_Theme_method_set_type_variation>`.
  305. .. rst-class:: classref-item-separator
  306. ----
  307. .. _class_Theme_method_get_color:
  308. .. rst-class:: classref-method
  309. :ref:`Color<class_Color>` **get_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_color>`
  310. Returns the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type``, if it exists.
  311. Returns the default color value if the property doesn't exist. Use :ref:`has_color<class_Theme_method_has_color>` to check for existence.
  312. .. rst-class:: classref-item-separator
  313. ----
  314. .. _class_Theme_method_get_color_list:
  315. .. rst-class:: classref-method
  316. :ref:`PackedStringArray<class_PackedStringArray>` **get_color_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_color_list>`
  317. Returns a list of names for :ref:`Color<class_Color>` properties defined with ``theme_type``. Use :ref:`get_color_type_list<class_Theme_method_get_color_type_list>` to get a list of possible theme type names.
  318. .. rst-class:: classref-item-separator
  319. ----
  320. .. _class_Theme_method_get_color_type_list:
  321. .. rst-class:: classref-method
  322. :ref:`PackedStringArray<class_PackedStringArray>` **get_color_type_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_color_type_list>`
  323. Returns a list of all unique theme type names for :ref:`Color<class_Color>` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
  324. .. rst-class:: classref-item-separator
  325. ----
  326. .. _class_Theme_method_get_constant:
  327. .. rst-class:: classref-method
  328. :ref:`int<class_int>` **get_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_constant>`
  329. Returns the constant property defined by ``name`` and ``theme_type``, if it exists.
  330. Returns ``0`` if the property doesn't exist. Use :ref:`has_constant<class_Theme_method_has_constant>` to check for existence.
  331. .. rst-class:: classref-item-separator
  332. ----
  333. .. _class_Theme_method_get_constant_list:
  334. .. rst-class:: classref-method
  335. :ref:`PackedStringArray<class_PackedStringArray>` **get_constant_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_constant_list>`
  336. Returns a list of names for constant properties defined with ``theme_type``. Use :ref:`get_constant_type_list<class_Theme_method_get_constant_type_list>` to get a list of possible theme type names.
  337. .. rst-class:: classref-item-separator
  338. ----
  339. .. _class_Theme_method_get_constant_type_list:
  340. .. rst-class:: classref-method
  341. :ref:`PackedStringArray<class_PackedStringArray>` **get_constant_type_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_constant_type_list>`
  342. Returns a list of all unique theme type names for constant properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
  343. .. rst-class:: classref-item-separator
  344. ----
  345. .. _class_Theme_method_get_font:
  346. .. rst-class:: classref-method
  347. :ref:`Font<class_Font>` **get_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_font>`
  348. Returns the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type``, if it exists.
  349. Returns the default theme font if the property doesn't exist and the default theme font is set up (see :ref:`default_font<class_Theme_property_default_font>`). Use :ref:`has_font<class_Theme_method_has_font>` to check for existence of the property and :ref:`has_default_font<class_Theme_method_has_default_font>` to check for existence of the default theme font.
  350. Returns the engine fallback font value, if neither exist (see :ref:`ThemeDB.fallback_font<class_ThemeDB_property_fallback_font>`).
  351. .. rst-class:: classref-item-separator
  352. ----
  353. .. _class_Theme_method_get_font_list:
  354. .. rst-class:: classref-method
  355. :ref:`PackedStringArray<class_PackedStringArray>` **get_font_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_font_list>`
  356. Returns a list of names for :ref:`Font<class_Font>` properties defined with ``theme_type``. Use :ref:`get_font_type_list<class_Theme_method_get_font_type_list>` to get a list of possible theme type names.
  357. .. rst-class:: classref-item-separator
  358. ----
  359. .. _class_Theme_method_get_font_size:
  360. .. rst-class:: classref-method
  361. :ref:`int<class_int>` **get_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_font_size>`
  362. Returns the font size property defined by ``name`` and ``theme_type``, if it exists.
  363. Returns the default theme font size if the property doesn't exist and the default theme font size is set up (see :ref:`default_font_size<class_Theme_property_default_font_size>`). Use :ref:`has_font_size<class_Theme_method_has_font_size>` to check for existence of the property and :ref:`has_default_font_size<class_Theme_method_has_default_font_size>` to check for existence of the default theme font.
  364. Returns the engine fallback font size value, if neither exist (see :ref:`ThemeDB.fallback_font_size<class_ThemeDB_property_fallback_font_size>`).
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_Theme_method_get_font_size_list:
  368. .. rst-class:: classref-method
  369. :ref:`PackedStringArray<class_PackedStringArray>` **get_font_size_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_font_size_list>`
  370. Returns a list of names for font size properties defined with ``theme_type``. Use :ref:`get_font_size_type_list<class_Theme_method_get_font_size_type_list>` to get a list of possible theme type names.
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_Theme_method_get_font_size_type_list:
  374. .. rst-class:: classref-method
  375. :ref:`PackedStringArray<class_PackedStringArray>` **get_font_size_type_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_font_size_type_list>`
  376. Returns a list of all unique theme type names for font size properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_Theme_method_get_font_type_list:
  380. .. rst-class:: classref-method
  381. :ref:`PackedStringArray<class_PackedStringArray>` **get_font_type_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_font_type_list>`
  382. Returns a list of all unique theme type names for :ref:`Font<class_Font>` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_Theme_method_get_icon:
  386. .. rst-class:: classref-method
  387. :ref:`Texture2D<class_Texture2D>` **get_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_icon>`
  388. Returns the icon property defined by ``name`` and ``theme_type``, if it exists.
  389. Returns the engine fallback icon value if the property doesn't exist (see :ref:`ThemeDB.fallback_icon<class_ThemeDB_property_fallback_icon>`). Use :ref:`has_icon<class_Theme_method_has_icon>` to check for existence.
  390. .. rst-class:: classref-item-separator
  391. ----
  392. .. _class_Theme_method_get_icon_list:
  393. .. rst-class:: classref-method
  394. :ref:`PackedStringArray<class_PackedStringArray>` **get_icon_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_icon_list>`
  395. Returns a list of names for icon properties defined with ``theme_type``. Use :ref:`get_icon_type_list<class_Theme_method_get_icon_type_list>` to get a list of possible theme type names.
  396. .. rst-class:: classref-item-separator
  397. ----
  398. .. _class_Theme_method_get_icon_type_list:
  399. .. rst-class:: classref-method
  400. :ref:`PackedStringArray<class_PackedStringArray>` **get_icon_type_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_icon_type_list>`
  401. Returns a list of all unique theme type names for icon properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
  402. .. rst-class:: classref-item-separator
  403. ----
  404. .. _class_Theme_method_get_stylebox:
  405. .. rst-class:: classref-method
  406. :ref:`StyleBox<class_StyleBox>` **get_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_stylebox>`
  407. Returns the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type``, if it exists.
  408. Returns the engine fallback stylebox value if the property doesn't exist (see :ref:`ThemeDB.fallback_stylebox<class_ThemeDB_property_fallback_stylebox>`). Use :ref:`has_stylebox<class_Theme_method_has_stylebox>` to check for existence.
  409. .. rst-class:: classref-item-separator
  410. ----
  411. .. _class_Theme_method_get_stylebox_list:
  412. .. rst-class:: classref-method
  413. :ref:`PackedStringArray<class_PackedStringArray>` **get_stylebox_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_stylebox_list>`
  414. Returns a list of names for :ref:`StyleBox<class_StyleBox>` properties defined with ``theme_type``. Use :ref:`get_stylebox_type_list<class_Theme_method_get_stylebox_type_list>` to get a list of possible theme type names.
  415. .. rst-class:: classref-item-separator
  416. ----
  417. .. _class_Theme_method_get_stylebox_type_list:
  418. .. rst-class:: classref-method
  419. :ref:`PackedStringArray<class_PackedStringArray>` **get_stylebox_type_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_stylebox_type_list>`
  420. Returns a list of all unique theme type names for :ref:`StyleBox<class_StyleBox>` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
  421. .. rst-class:: classref-item-separator
  422. ----
  423. .. _class_Theme_method_get_theme_item:
  424. .. rst-class:: classref-method
  425. :ref:`Variant<class_Variant>` **get_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_theme_item>`
  426. Returns the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists.
  427. Returns the engine fallback value if the property doesn't exist (see :ref:`ThemeDB<class_ThemeDB>`). Use :ref:`has_theme_item<class_Theme_method_has_theme_item>` to check for existence.
  428. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_Theme_method_get_theme_item_list:
  432. .. rst-class:: classref-method
  433. :ref:`PackedStringArray<class_PackedStringArray>` **get_theme_item_list**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_theme_item_list>`
  434. Returns a list of names for properties of ``data_type`` defined with ``theme_type``. Use :ref:`get_theme_item_type_list<class_Theme_method_get_theme_item_type_list>` to get a list of possible theme type names.
  435. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
  436. .. rst-class:: classref-item-separator
  437. ----
  438. .. _class_Theme_method_get_theme_item_type_list:
  439. .. rst-class:: classref-method
  440. :ref:`PackedStringArray<class_PackedStringArray>` **get_theme_item_type_list**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_theme_item_type_list>`
  441. Returns a list of all unique theme type names for ``data_type`` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
  442. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
  443. .. rst-class:: classref-item-separator
  444. ----
  445. .. _class_Theme_method_get_type_list:
  446. .. rst-class:: classref-method
  447. :ref:`PackedStringArray<class_PackedStringArray>` **get_type_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_type_list>`
  448. Returns a list of all unique theme type names. Use the appropriate ``get_*_type_list`` method to get a list of unique theme types for a single data type.
  449. .. rst-class:: classref-item-separator
  450. ----
  451. .. _class_Theme_method_get_type_variation_base:
  452. .. rst-class:: classref-method
  453. :ref:`StringName<class_StringName>` **get_type_variation_base**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_type_variation_base>`
  454. Returns the name of the base theme type if ``theme_type`` is a valid variation type. Returns an empty string otherwise.
  455. .. rst-class:: classref-item-separator
  456. ----
  457. .. _class_Theme_method_get_type_variation_list:
  458. .. rst-class:: classref-method
  459. :ref:`PackedStringArray<class_PackedStringArray>` **get_type_variation_list**\ (\ base_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_get_type_variation_list>`
  460. Returns a list of all type variations for the given ``base_type``.
  461. .. rst-class:: classref-item-separator
  462. ----
  463. .. _class_Theme_method_has_color:
  464. .. rst-class:: classref-method
  465. :ref:`bool<class_bool>` **has_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_color>`
  466. Returns ``true`` if the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type`` exists.
  467. Returns ``false`` if it doesn't exist. Use :ref:`set_color<class_Theme_method_set_color>` to define it.
  468. .. rst-class:: classref-item-separator
  469. ----
  470. .. _class_Theme_method_has_constant:
  471. .. rst-class:: classref-method
  472. :ref:`bool<class_bool>` **has_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_constant>`
  473. Returns ``true`` if the constant property defined by ``name`` and ``theme_type`` exists.
  474. Returns ``false`` if it doesn't exist. Use :ref:`set_constant<class_Theme_method_set_constant>` to define it.
  475. .. rst-class:: classref-item-separator
  476. ----
  477. .. _class_Theme_method_has_default_base_scale:
  478. .. rst-class:: classref-method
  479. :ref:`bool<class_bool>` **has_default_base_scale**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_default_base_scale>`
  480. Returns ``true`` if :ref:`default_base_scale<class_Theme_property_default_base_scale>` has a valid value.
  481. Returns ``false`` if it doesn't. The value must be greater than ``0.0`` to be considered valid.
  482. .. rst-class:: classref-item-separator
  483. ----
  484. .. _class_Theme_method_has_default_font:
  485. .. rst-class:: classref-method
  486. :ref:`bool<class_bool>` **has_default_font**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_default_font>`
  487. Returns ``true`` if :ref:`default_font<class_Theme_property_default_font>` has a valid value.
  488. Returns ``false`` if it doesn't.
  489. .. rst-class:: classref-item-separator
  490. ----
  491. .. _class_Theme_method_has_default_font_size:
  492. .. rst-class:: classref-method
  493. :ref:`bool<class_bool>` **has_default_font_size**\ (\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_default_font_size>`
  494. Returns ``true`` if :ref:`default_font_size<class_Theme_property_default_font_size>` has a valid value.
  495. Returns ``false`` if it doesn't. The value must be greater than ``0`` to be considered valid.
  496. .. rst-class:: classref-item-separator
  497. ----
  498. .. _class_Theme_method_has_font:
  499. .. rst-class:: classref-method
  500. :ref:`bool<class_bool>` **has_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_font>`
  501. Returns ``true`` if the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type`` exists, or if the default theme font is set up (see :ref:`has_default_font<class_Theme_method_has_default_font>`).
  502. Returns ``false`` if neither exist. Use :ref:`set_font<class_Theme_method_set_font>` to define the property.
  503. .. rst-class:: classref-item-separator
  504. ----
  505. .. _class_Theme_method_has_font_size:
  506. .. rst-class:: classref-method
  507. :ref:`bool<class_bool>` **has_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_font_size>`
  508. Returns ``true`` if the font size property defined by ``name`` and ``theme_type`` exists, or if the default theme font size is set up (see :ref:`has_default_font_size<class_Theme_method_has_default_font_size>`).
  509. Returns ``false`` if neither exist. Use :ref:`set_font_size<class_Theme_method_set_font_size>` to define the property.
  510. .. rst-class:: classref-item-separator
  511. ----
  512. .. _class_Theme_method_has_icon:
  513. .. rst-class:: classref-method
  514. :ref:`bool<class_bool>` **has_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_icon>`
  515. Returns ``true`` if the icon property defined by ``name`` and ``theme_type`` exists.
  516. Returns ``false`` if it doesn't exist. Use :ref:`set_icon<class_Theme_method_set_icon>` to define it.
  517. .. rst-class:: classref-item-separator
  518. ----
  519. .. _class_Theme_method_has_stylebox:
  520. .. rst-class:: classref-method
  521. :ref:`bool<class_bool>` **has_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_stylebox>`
  522. Returns ``true`` if the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type`` exists.
  523. Returns ``false`` if it doesn't exist. Use :ref:`set_stylebox<class_Theme_method_set_stylebox>` to define it.
  524. .. rst-class:: classref-item-separator
  525. ----
  526. .. _class_Theme_method_has_theme_item:
  527. .. rst-class:: classref-method
  528. :ref:`bool<class_bool>` **has_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_has_theme_item>`
  529. Returns ``true`` if the theme property of ``data_type`` defined by ``name`` and ``theme_type`` exists.
  530. Returns ``false`` if it doesn't exist. Use :ref:`set_theme_item<class_Theme_method_set_theme_item>` to define it.
  531. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
  532. .. rst-class:: classref-item-separator
  533. ----
  534. .. _class_Theme_method_is_type_variation:
  535. .. rst-class:: classref-method
  536. :ref:`bool<class_bool>` **is_type_variation**\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Theme_method_is_type_variation>`
  537. Returns ``true`` if ``theme_type`` is marked as a variation of ``base_type``.
  538. .. rst-class:: classref-item-separator
  539. ----
  540. .. _class_Theme_method_merge_with:
  541. .. rst-class:: classref-method
  542. |void| **merge_with**\ (\ other\: :ref:`Theme<class_Theme>`\ ) :ref:`๐Ÿ”—<class_Theme_method_merge_with>`
  543. Adds missing and overrides existing definitions with values from the ``other`` theme resource.
  544. \ **Note:** This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another.
  545. .. rst-class:: classref-item-separator
  546. ----
  547. .. _class_Theme_method_remove_type:
  548. .. rst-class:: classref-method
  549. |void| **remove_type**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_remove_type>`
  550. Removes the theme type, gracefully discarding defined theme items. If the type is a variation, this information is also erased. If the type is a base for type variations, those variations lose their base.
  551. .. rst-class:: classref-item-separator
  552. ----
  553. .. _class_Theme_method_rename_color:
  554. .. rst-class:: classref-method
  555. |void| **rename_color**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_rename_color>`
  556. Renames the :ref:`Color<class_Color>` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
  557. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_color<class_Theme_method_has_color>` to check for existence, and :ref:`clear_color<class_Theme_method_clear_color>` to remove the existing property.
  558. .. rst-class:: classref-item-separator
  559. ----
  560. .. _class_Theme_method_rename_constant:
  561. .. rst-class:: classref-method
  562. |void| **rename_constant**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_rename_constant>`
  563. Renames the constant property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
  564. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_constant<class_Theme_method_has_constant>` to check for existence, and :ref:`clear_constant<class_Theme_method_clear_constant>` to remove the existing property.
  565. .. rst-class:: classref-item-separator
  566. ----
  567. .. _class_Theme_method_rename_font:
  568. .. rst-class:: classref-method
  569. |void| **rename_font**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_rename_font>`
  570. Renames the :ref:`Font<class_Font>` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
  571. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font<class_Theme_method_has_font>` to check for existence, and :ref:`clear_font<class_Theme_method_clear_font>` to remove the existing property.
  572. .. rst-class:: classref-item-separator
  573. ----
  574. .. _class_Theme_method_rename_font_size:
  575. .. rst-class:: classref-method
  576. |void| **rename_font_size**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_rename_font_size>`
  577. Renames the font size property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
  578. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font_size<class_Theme_method_has_font_size>` to check for existence, and :ref:`clear_font_size<class_Theme_method_clear_font_size>` to remove the existing property.
  579. .. rst-class:: classref-item-separator
  580. ----
  581. .. _class_Theme_method_rename_icon:
  582. .. rst-class:: classref-method
  583. |void| **rename_icon**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_rename_icon>`
  584. Renames the icon property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
  585. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_icon<class_Theme_method_has_icon>` to check for existence, and :ref:`clear_icon<class_Theme_method_clear_icon>` to remove the existing property.
  586. .. rst-class:: classref-item-separator
  587. ----
  588. .. _class_Theme_method_rename_stylebox:
  589. .. rst-class:: classref-method
  590. |void| **rename_stylebox**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_rename_stylebox>`
  591. Renames the :ref:`StyleBox<class_StyleBox>` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
  592. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_stylebox<class_Theme_method_has_stylebox>` to check for existence, and :ref:`clear_stylebox<class_Theme_method_clear_stylebox>` to remove the existing property.
  593. .. rst-class:: classref-item-separator
  594. ----
  595. .. _class_Theme_method_rename_theme_item:
  596. .. rst-class:: classref-method
  597. |void| **rename_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_rename_theme_item>`
  598. Renames the theme property of ``data_type`` defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
  599. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_theme_item<class_Theme_method_has_theme_item>` to check for existence, and :ref:`clear_theme_item<class_Theme_method_clear_theme_item>` to remove the existing property.
  600. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
  601. .. rst-class:: classref-item-separator
  602. ----
  603. .. _class_Theme_method_set_color:
  604. .. rst-class:: classref-method
  605. |void| **set_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) :ref:`๐Ÿ”—<class_Theme_method_set_color>`
  606. Creates or changes the value of the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type``. Use :ref:`clear_color<class_Theme_method_clear_color>` to remove the property.
  607. .. rst-class:: classref-item-separator
  608. ----
  609. .. _class_Theme_method_set_constant:
  610. .. rst-class:: classref-method
  611. |void| **set_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_Theme_method_set_constant>`
  612. Creates or changes the value of the constant property defined by ``name`` and ``theme_type``. Use :ref:`clear_constant<class_Theme_method_clear_constant>` to remove the property.
  613. .. rst-class:: classref-item-separator
  614. ----
  615. .. _class_Theme_method_set_font:
  616. .. rst-class:: classref-method
  617. |void| **set_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) :ref:`๐Ÿ”—<class_Theme_method_set_font>`
  618. Creates or changes the value of the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type``. Use :ref:`clear_font<class_Theme_method_clear_font>` to remove the property.
  619. .. rst-class:: classref-item-separator
  620. ----
  621. .. _class_Theme_method_set_font_size:
  622. .. rst-class:: classref-method
  623. |void| **set_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_Theme_method_set_font_size>`
  624. Creates or changes the value of the font size property defined by ``name`` and ``theme_type``. Use :ref:`clear_font_size<class_Theme_method_clear_font_size>` to remove the property.
  625. .. rst-class:: classref-item-separator
  626. ----
  627. .. _class_Theme_method_set_icon:
  628. .. rst-class:: classref-method
  629. |void| **set_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_Theme_method_set_icon>`
  630. Creates or changes the value of the icon property defined by ``name`` and ``theme_type``. Use :ref:`clear_icon<class_Theme_method_clear_icon>` to remove the property.
  631. .. rst-class:: classref-item-separator
  632. ----
  633. .. _class_Theme_method_set_stylebox:
  634. .. rst-class:: classref-method
  635. |void| **set_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`StyleBox<class_StyleBox>`\ ) :ref:`๐Ÿ”—<class_Theme_method_set_stylebox>`
  636. Creates or changes the value of the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type``. Use :ref:`clear_stylebox<class_Theme_method_clear_stylebox>` to remove the property.
  637. .. rst-class:: classref-item-separator
  638. ----
  639. .. _class_Theme_method_set_theme_item:
  640. .. rst-class:: classref-method
  641. |void| **set_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_Theme_method_set_theme_item>`
  642. Creates or changes the value of the theme property of ``data_type`` defined by ``name`` and ``theme_type``. Use :ref:`clear_theme_item<class_Theme_method_clear_theme_item>` to remove the property.
  643. Fails if the ``value`` type is not accepted by ``data_type``.
  644. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
  645. .. rst-class:: classref-item-separator
  646. ----
  647. .. _class_Theme_method_set_type_variation:
  648. .. rst-class:: classref-method
  649. |void| **set_type_variation**\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Theme_method_set_type_variation>`
  650. Marks ``theme_type`` as a variation of ``base_type``.
  651. This adds ``theme_type`` as a suggested option for :ref:`Control.theme_type_variation<class_Control_property_theme_type_variation>` on a :ref:`Control<class_Control>` that is of the ``base_type`` class.
  652. Variations can also be nested, i.e. ``base_type`` can be another variation. If a chain of variations ends with a ``base_type`` matching the class of the :ref:`Control<class_Control>`, the whole chain is going to be suggested as options.
  653. \ **Note:** Suggestions only show up if this theme resource is set as the project default theme. See :ref:`ProjectSettings.gui/theme/custom<class_ProjectSettings_property_gui/theme/custom>`.
  654. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  655. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  656. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  657. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  658. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  659. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  660. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  661. .. |void| replace:: :abbr:`void (No return value.)`