class_button.rst 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  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/Button.xml.
  6. .. _class_Button:
  7. Button
  8. ======
  9. **Inherits:** :ref:`BaseButton<class_BaseButton>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`CheckBox<class_CheckBox>`, :ref:`CheckButton<class_CheckButton>`, :ref:`ColorPickerButton<class_ColorPickerButton>`, :ref:`MenuButton<class_MenuButton>`, :ref:`OptionButton<class_OptionButton>`
  11. Standard themed Button.
  12. Description
  13. -----------
  14. Button is the standard themed button. It can contain text and an icon, and will display them according to the current :ref:`Theme<class_Theme>`.
  15. \ **Example of creating a button and assigning an action when pressed by code:**\
  16. .. tabs::
  17. .. code-tab:: gdscript
  18. func _ready():
  19. var button = Button.new()
  20. button.text = "Click me"
  21. button.pressed.connect(self._button_pressed)
  22. add_child(button)
  23. func _button_pressed():
  24. print("Hello world!")
  25. .. code-tab:: csharp
  26. public override void _Ready()
  27. {
  28. var button = new Button();
  29. button.Text = "Click me";
  30. button.Pressed += ButtonPressed;
  31. AddChild(button);
  32. }
  33. private void ButtonPressed()
  34. {
  35. GD.Print("Hello world!");
  36. }
  37. Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code.
  38. See also :ref:`BaseButton<class_BaseButton>` which contains common properties and methods associated with this node.
  39. \ **Note:** Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton<class_TouchScreenButton>` for buttons that trigger gameplay movement or actions, as :ref:`TouchScreenButton<class_TouchScreenButton>` supports multitouch.
  40. Tutorials
  41. ---------
  42. - `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__
  43. - `OS Test Demo <https://godotengine.org/asset-library/asset/677>`__
  44. Properties
  45. ----------
  46. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  47. | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`alignment<class_Button_property_alignment>` | ``1`` |
  48. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  49. | :ref:`bool<class_bool>` | :ref:`clip_text<class_Button_property_clip_text>` | ``false`` |
  50. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  51. | :ref:`bool<class_bool>` | :ref:`expand_icon<class_Button_property_expand_icon>` | ``false`` |
  52. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  53. | :ref:`bool<class_bool>` | :ref:`flat<class_Button_property_flat>` | ``false`` |
  54. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  55. | :ref:`Texture2D<class_Texture2D>` | :ref:`icon<class_Button_property_icon>` | |
  56. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  57. | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`icon_alignment<class_Button_property_icon_alignment>` | ``0`` |
  58. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  59. | :ref:`String<class_String>` | :ref:`language<class_Button_property_language>` | ``""`` |
  60. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  61. | :ref:`String<class_String>` | :ref:`text<class_Button_property_text>` | ``""`` |
  62. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  63. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_Button_property_text_direction>` | ``0`` |
  64. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  65. | :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` | :ref:`text_overrun_behavior<class_Button_property_text_overrun_behavior>` | ``0`` |
  66. +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
  67. Theme Properties
  68. ----------------
  69. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  70. | :ref:`Color<class_Color>` | :ref:`font_color<class_Button_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  71. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  72. | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_Button_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  73. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  74. | :ref:`Color<class_Color>` | :ref:`font_focus_color<class_Button_theme_color_font_focus_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  75. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  76. | :ref:`Color<class_Color>` | :ref:`font_hover_color<class_Button_theme_color_font_hover_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  77. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  78. | :ref:`Color<class_Color>` | :ref:`font_hover_pressed_color<class_Button_theme_color_font_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  79. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  80. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_Button_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  81. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  82. | :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_Button_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  83. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  84. | :ref:`Color<class_Color>` | :ref:`icon_disabled_color<class_Button_theme_color_icon_disabled_color>` | ``Color(1, 1, 1, 0.4)`` |
  85. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  86. | :ref:`Color<class_Color>` | :ref:`icon_focus_color<class_Button_theme_color_icon_focus_color>` | ``Color(1, 1, 1, 1)`` |
  87. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  88. | :ref:`Color<class_Color>` | :ref:`icon_hover_color<class_Button_theme_color_icon_hover_color>` | ``Color(1, 1, 1, 1)`` |
  89. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  90. | :ref:`Color<class_Color>` | :ref:`icon_hover_pressed_color<class_Button_theme_color_icon_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  91. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  92. | :ref:`Color<class_Color>` | :ref:`icon_normal_color<class_Button_theme_color_icon_normal_color>` | ``Color(1, 1, 1, 1)`` |
  93. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  94. | :ref:`Color<class_Color>` | :ref:`icon_pressed_color<class_Button_theme_color_icon_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  95. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  96. | :ref:`int<class_int>` | :ref:`h_separation<class_Button_theme_constant_h_separation>` | ``2`` |
  97. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  98. | :ref:`int<class_int>` | :ref:`outline_size<class_Button_theme_constant_outline_size>` | ``0`` |
  99. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  100. | :ref:`Font<class_Font>` | :ref:`font<class_Button_theme_font_font>` | |
  101. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  102. | :ref:`int<class_int>` | :ref:`font_size<class_Button_theme_font_size_font_size>` | |
  103. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  104. | :ref:`StyleBox<class_StyleBox>` | :ref:`disabled<class_Button_theme_style_disabled>` | |
  105. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  106. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_Button_theme_style_focus>` | |
  107. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  108. | :ref:`StyleBox<class_StyleBox>` | :ref:`hover<class_Button_theme_style_hover>` | |
  109. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  110. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_Button_theme_style_normal>` | |
  111. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  112. | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed<class_Button_theme_style_pressed>` | |
  113. +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  114. Property Descriptions
  115. ---------------------
  116. .. _class_Button_property_alignment:
  117. - :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment**
  118. +-----------+---------------------------+
  119. | *Default* | ``1`` |
  120. +-----------+---------------------------+
  121. | *Setter* | set_text_alignment(value) |
  122. +-----------+---------------------------+
  123. | *Getter* | get_text_alignment() |
  124. +-----------+---------------------------+
  125. Text alignment policy for the button's text, use one of the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` constants.
  126. ----
  127. .. _class_Button_property_clip_text:
  128. - :ref:`bool<class_bool>` **clip_text**
  129. +-----------+----------------------+
  130. | *Default* | ``false`` |
  131. +-----------+----------------------+
  132. | *Setter* | set_clip_text(value) |
  133. +-----------+----------------------+
  134. | *Getter* | get_clip_text() |
  135. +-----------+----------------------+
  136. When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text.
  137. ----
  138. .. _class_Button_property_expand_icon:
  139. - :ref:`bool<class_bool>` **expand_icon**
  140. +-----------+------------------------+
  141. | *Default* | ``false`` |
  142. +-----------+------------------------+
  143. | *Setter* | set_expand_icon(value) |
  144. +-----------+------------------------+
  145. | *Getter* | is_expand_icon() |
  146. +-----------+------------------------+
  147. When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect.
  148. ----
  149. .. _class_Button_property_flat:
  150. - :ref:`bool<class_bool>` **flat**
  151. +-----------+-----------------+
  152. | *Default* | ``false`` |
  153. +-----------+-----------------+
  154. | *Setter* | set_flat(value) |
  155. +-----------+-----------------+
  156. | *Getter* | is_flat() |
  157. +-----------+-----------------+
  158. Flat buttons don't display decoration.
  159. ----
  160. .. _class_Button_property_icon:
  161. - :ref:`Texture2D<class_Texture2D>` **icon**
  162. +----------+------------------------+
  163. | *Setter* | set_button_icon(value) |
  164. +----------+------------------------+
  165. | *Getter* | get_button_icon() |
  166. +----------+------------------------+
  167. Button's icon, if text is present the icon will be placed before the text.
  168. To edit margin and spacing of the icon, use :ref:`h_separation<class_Button_theme_constant_h_separation>` theme property and ``content_margin_*`` properties of the used :ref:`StyleBox<class_StyleBox>`\ es.
  169. ----
  170. .. _class_Button_property_icon_alignment:
  171. - :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **icon_alignment**
  172. +-----------+---------------------------+
  173. | *Default* | ``0`` |
  174. +-----------+---------------------------+
  175. | *Setter* | set_icon_alignment(value) |
  176. +-----------+---------------------------+
  177. | *Getter* | get_icon_alignment() |
  178. +-----------+---------------------------+
  179. Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` constants as the text alignment. If centered, text will draw on top of the icon.
  180. ----
  181. .. _class_Button_property_language:
  182. - :ref:`String<class_String>` **language**
  183. +-----------+---------------------+
  184. | *Default* | ``""`` |
  185. +-----------+---------------------+
  186. | *Setter* | set_language(value) |
  187. +-----------+---------------------+
  188. | *Getter* | get_language() |
  189. +-----------+---------------------+
  190. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  191. ----
  192. .. _class_Button_property_text:
  193. - :ref:`String<class_String>` **text**
  194. +-----------+-----------------+
  195. | *Default* | ``""`` |
  196. +-----------+-----------------+
  197. | *Setter* | set_text(value) |
  198. +-----------+-----------------+
  199. | *Getter* | get_text() |
  200. +-----------+-----------------+
  201. The button's text that will be displayed inside the button's area.
  202. ----
  203. .. _class_Button_property_text_direction:
  204. - :ref:`TextDirection<enum_Control_TextDirection>` **text_direction**
  205. +-----------+---------------------------+
  206. | *Default* | ``0`` |
  207. +-----------+---------------------------+
  208. | *Setter* | set_text_direction(value) |
  209. +-----------+---------------------------+
  210. | *Getter* | get_text_direction() |
  211. +-----------+---------------------------+
  212. Base text writing direction.
  213. ----
  214. .. _class_Button_property_text_overrun_behavior:
  215. - :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior**
  216. +-----------+----------------------------------+
  217. | *Default* | ``0`` |
  218. +-----------+----------------------------------+
  219. | *Setter* | set_text_overrun_behavior(value) |
  220. +-----------+----------------------------------+
  221. | *Getter* | get_text_overrun_behavior() |
  222. +-----------+----------------------------------+
  223. Sets the clipping behavior when the text exceeds the node's bounding rectangle. See :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` for a description of all modes.
  224. Theme Property Descriptions
  225. ---------------------------
  226. .. _class_Button_theme_color_font_color:
  227. - :ref:`Color<class_Color>` **font_color**
  228. +-----------+-----------------------------------+
  229. | *Default* | ``Color(0.875, 0.875, 0.875, 1)`` |
  230. +-----------+-----------------------------------+
  231. Default text :ref:`Color<class_Color>` of the ``Button``.
  232. ----
  233. .. _class_Button_theme_color_font_disabled_color:
  234. - :ref:`Color<class_Color>` **font_disabled_color**
  235. +-----------+-------------------------------------+
  236. | *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  237. +-----------+-------------------------------------+
  238. Text :ref:`Color<class_Color>` used when the ``Button`` is disabled.
  239. ----
  240. .. _class_Button_theme_color_font_focus_color:
  241. - :ref:`Color<class_Color>` **font_focus_color**
  242. +-----------+--------------------------------+
  243. | *Default* | ``Color(0.95, 0.95, 0.95, 1)`` |
  244. +-----------+--------------------------------+
  245. Text :ref:`Color<class_Color>` used when the ``Button`` is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
  246. ----
  247. .. _class_Button_theme_color_font_hover_color:
  248. - :ref:`Color<class_Color>` **font_hover_color**
  249. +-----------+--------------------------------+
  250. | *Default* | ``Color(0.95, 0.95, 0.95, 1)`` |
  251. +-----------+--------------------------------+
  252. Text :ref:`Color<class_Color>` used when the ``Button`` is being hovered.
  253. ----
  254. .. _class_Button_theme_color_font_hover_pressed_color:
  255. - :ref:`Color<class_Color>` **font_hover_pressed_color**
  256. +-----------+-----------------------+
  257. | *Default* | ``Color(1, 1, 1, 1)`` |
  258. +-----------+-----------------------+
  259. Text :ref:`Color<class_Color>` used when the ``Button`` is being hovered and pressed.
  260. ----
  261. .. _class_Button_theme_color_font_outline_color:
  262. - :ref:`Color<class_Color>` **font_outline_color**
  263. +-----------+-----------------------+
  264. | *Default* | ``Color(1, 1, 1, 1)`` |
  265. +-----------+-----------------------+
  266. The tint of text outline of the ``Button``.
  267. ----
  268. .. _class_Button_theme_color_font_pressed_color:
  269. - :ref:`Color<class_Color>` **font_pressed_color**
  270. +-----------+-----------------------+
  271. | *Default* | ``Color(1, 1, 1, 1)`` |
  272. +-----------+-----------------------+
  273. Text :ref:`Color<class_Color>` used when the ``Button`` is being pressed.
  274. ----
  275. .. _class_Button_theme_color_icon_disabled_color:
  276. - :ref:`Color<class_Color>` **icon_disabled_color**
  277. +-----------+-------------------------+
  278. | *Default* | ``Color(1, 1, 1, 0.4)`` |
  279. +-----------+-------------------------+
  280. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is disabled.
  281. ----
  282. .. _class_Button_theme_color_icon_focus_color:
  283. - :ref:`Color<class_Color>` **icon_focus_color**
  284. +-----------+-----------------------+
  285. | *Default* | ``Color(1, 1, 1, 1)`` |
  286. +-----------+-----------------------+
  287. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is focused. Only replaces the normal modulate color of the button. Disabled, hovered, and pressed states take precedence over this color.
  288. ----
  289. .. _class_Button_theme_color_icon_hover_color:
  290. - :ref:`Color<class_Color>` **icon_hover_color**
  291. +-----------+-----------------------+
  292. | *Default* | ``Color(1, 1, 1, 1)`` |
  293. +-----------+-----------------------+
  294. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is being hovered.
  295. ----
  296. .. _class_Button_theme_color_icon_hover_pressed_color:
  297. - :ref:`Color<class_Color>` **icon_hover_pressed_color**
  298. +-----------+-----------------------+
  299. | *Default* | ``Color(1, 1, 1, 1)`` |
  300. +-----------+-----------------------+
  301. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is being hovered and pressed.
  302. ----
  303. .. _class_Button_theme_color_icon_normal_color:
  304. - :ref:`Color<class_Color>` **icon_normal_color**
  305. +-----------+-----------------------+
  306. | *Default* | ``Color(1, 1, 1, 1)`` |
  307. +-----------+-----------------------+
  308. Default icon modulate :ref:`Color<class_Color>` of the ``Button``.
  309. ----
  310. .. _class_Button_theme_color_icon_pressed_color:
  311. - :ref:`Color<class_Color>` **icon_pressed_color**
  312. +-----------+-----------------------+
  313. | *Default* | ``Color(1, 1, 1, 1)`` |
  314. +-----------+-----------------------+
  315. Icon modulate :ref:`Color<class_Color>` used when the ``Button`` is being pressed.
  316. ----
  317. .. _class_Button_theme_constant_h_separation:
  318. - :ref:`int<class_int>` **h_separation**
  319. +-----------+-------+
  320. | *Default* | ``2`` |
  321. +-----------+-------+
  322. The horizontal space between ``Button``'s icon and text. Negative values will be treated as ``0`` when used.
  323. ----
  324. .. _class_Button_theme_constant_outline_size:
  325. - :ref:`int<class_int>` **outline_size**
  326. +-----------+-------+
  327. | *Default* | ``0`` |
  328. +-----------+-------+
  329. The size of the text outline.
  330. ----
  331. .. _class_Button_theme_font_font:
  332. - :ref:`Font<class_Font>` **font**
  333. :ref:`Font<class_Font>` of the ``Button``'s text.
  334. ----
  335. .. _class_Button_theme_font_size_font_size:
  336. - :ref:`int<class_int>` **font_size**
  337. Font size of the ``Button``'s text.
  338. ----
  339. .. _class_Button_theme_style_disabled:
  340. - :ref:`StyleBox<class_StyleBox>` **disabled**
  341. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is disabled.
  342. ----
  343. .. _class_Button_theme_style_focus:
  344. - :ref:`StyleBox<class_StyleBox>` **focus**
  345. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is focused. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
  346. ----
  347. .. _class_Button_theme_style_hover:
  348. - :ref:`StyleBox<class_StyleBox>` **hover**
  349. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is being hovered.
  350. ----
  351. .. _class_Button_theme_style_normal:
  352. - :ref:`StyleBox<class_StyleBox>` **normal**
  353. Default :ref:`StyleBox<class_StyleBox>` for the ``Button``.
  354. ----
  355. .. _class_Button_theme_style_pressed:
  356. - :ref:`StyleBox<class_StyleBox>` **pressed**
  357. :ref:`StyleBox<class_StyleBox>` used when the ``Button`` is being pressed.
  358. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  359. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  360. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  361. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  362. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  363. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`