Files
godot-docs-l10n/classes/es/class_theme.rst
Rémi Verschelde cf78697eea Add localized class reference as pre-generated RST files
Currently including `zh_CN` and `es` which both have very high completion
ratios. Others will be added once they reach a significant percentage too.

These RST files will be used by godot-docs in place of its `classes` folder
after we sync with https://github.com/godotengine/godot-docs/pull/5458.

The update workflow is manual for now (example for `zh_CN`):

- Build `godotengine/godot` in the branch we currently track (now `3.x`)
- Run `godot --doctool -l zh_CN`
- Run `cd doc && make rst LANGARG=zh_CN`
- Copy `doc/_build/rst/*` to `classes/zh_CN/` here
- Make sure to have `classes/zh_CN/index.rst` copied from `docs/classes`
2021-12-21 16:07:55 +01:00

610 lines
46 KiB
ReStructuredText

:github_url: hide
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the Theme.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_Theme:
Theme
=====
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
Tema para los controles.
Descripción
----------------------
Un tema para los tratamientos de los controles. Los controles pueden ser modificados individualmente, pero para aplicaciones complejas, es más práctico crear un tema global que lo defina todo. Este tema puede aplicarse a cualquier :ref:`Control<class_Control>`; el Control y sus hijos lo usarán automáticamente.
Los recursos del tema pueden cargarse alternativamente escribiéndolos en un archivo ``.theme``, vea la documentación para más información.
Tutoriales
--------------------
- :doc:`../tutorials/ui/gui_skinning`
Propiedades
----------------------
+-------------------------+--------------------------------------------------------+
| :ref:`Font<class_Font>` | :ref:`default_font<class_Theme_property_default_font>` |
+-------------------------+--------------------------------------------------------+
Métodos
--------------
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear<class_Theme_method_clear>` **(** **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_color<class_Theme_method_clear_color>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_constant<class_Theme_method_clear_constant>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_font<class_Theme_method_clear_font>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_icon<class_Theme_method_clear_icon>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_stylebox<class_Theme_method_clear_stylebox>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_theme_item<class_Theme_method_clear_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`copy_default_theme<class_Theme_method_copy_default_theme>` **(** **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`copy_theme<class_Theme_method_copy_theme>` **(** :ref:`Theme<class_Theme>` other **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`get_color<class_Theme_method_get_color>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_color_list<class_Theme_method_get_color_list>` **(** :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_color_types<class_Theme_method_get_color_types>` **(** **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_constant<class_Theme_method_get_constant>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_constant_list<class_Theme_method_get_constant_list>` **(** :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_constant_types<class_Theme_method_get_constant_types>` **(** **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Font<class_Font>` | :ref:`get_font<class_Theme_method_get_font>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_font_list<class_Theme_method_get_font_list>` **(** :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_font_types<class_Theme_method_get_font_types>` **(** **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Texture<class_Texture>` | :ref:`get_icon<class_Theme_method_get_icon>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_icon_list<class_Theme_method_get_icon_list>` **(** :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_icon_types<class_Theme_method_get_icon_types>` **(** **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`get_stylebox<class_Theme_method_get_stylebox>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_stylebox_list<class_Theme_method_get_stylebox_list>` **(** :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_stylebox_types<class_Theme_method_get_stylebox_types>` **(** **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`get_theme_item<class_Theme_method_get_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_theme_item_list<class_Theme_method_get_theme_item_list>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_theme_item_types<class_Theme_method_get_theme_item_types>` **(** :ref:`DataType<enum_Theme_DataType>` data_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_type_list<class_Theme_method_get_type_list>` **(** :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_color<class_Theme_method_has_color>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_constant<class_Theme_method_has_constant>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_default_font<class_Theme_method_has_default_font>` **(** **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_font<class_Theme_method_has_font>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_icon<class_Theme_method_has_icon>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_stylebox<class_Theme_method_has_stylebox>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_item<class_Theme_method_has_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`merge_with<class_Theme_method_merge_with>` **(** :ref:`Theme<class_Theme>` other **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`rename_color<class_Theme_method_rename_color>` **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`rename_constant<class_Theme_method_rename_constant>` **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`rename_font<class_Theme_method_rename_font>` **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`rename_icon<class_Theme_method_rename_icon>` **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`rename_stylebox<class_Theme_method_rename_stylebox>` **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`rename_theme_item<class_Theme_method_rename_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_color<class_Theme_method_set_color>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`Color<class_Color>` color **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_constant<class_Theme_method_set_constant>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`int<class_int>` constant **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_font<class_Theme_method_set_font>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`Font<class_Font>` font **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_icon<class_Theme_method_set_icon>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`Texture<class_Texture>` texture **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_stylebox<class_Theme_method_set_stylebox>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`StyleBox<class_StyleBox>` texture **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_theme_item<class_Theme_method_set_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`Variant<class_Variant>` value **)** |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Enumeraciones
--------------------------
.. _enum_Theme_DataType:
.. _class_Theme_constant_DATA_TYPE_COLOR:
.. _class_Theme_constant_DATA_TYPE_CONSTANT:
.. _class_Theme_constant_DATA_TYPE_FONT:
.. _class_Theme_constant_DATA_TYPE_ICON:
.. _class_Theme_constant_DATA_TYPE_STYLEBOX:
.. _class_Theme_constant_DATA_TYPE_MAX:
enum **DataType**:
- **DATA_TYPE_COLOR** = **0** --- Theme's :ref:`Color<class_Color>` item type.
- **DATA_TYPE_CONSTANT** = **1** --- Theme's constant item type.
- **DATA_TYPE_FONT** = **2** --- Theme's :ref:`Font<class_Font>` item type.
- **DATA_TYPE_ICON** = **3** --- Theme's icon :ref:`Texture<class_Texture>` item type.
- **DATA_TYPE_STYLEBOX** = **4** --- Theme's :ref:`StyleBox<class_StyleBox>` item type.
- **DATA_TYPE_MAX** = **5** --- Maximum value for the DataType enum.
Descripciones de Propiedades
--------------------------------------------------------
.. _class_Theme_property_default_font:
- :ref:`Font<class_Font>` **default_font**
+----------+-------------------------+
| *Setter* | set_default_font(value) |
+----------+-------------------------+
| *Getter* | get_default_font() |
+----------+-------------------------+
The default font of this ``Theme`` resource. Used as a fallback value for font items defined in this theme, but having invalid values. If this value is also invalid, the global default value is used.
Use :ref:`has_default_font<class_Theme_method_has_default_font>` to check if this value is valid.
Descripciones de Métodos
------------------------------------------------
.. _class_Theme_method_clear:
- void **clear** **(** **)**
Borra todos los valores del tema.
----
.. _class_Theme_method_clear_color:
- void **clear_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Clears the :ref:`Color<class_Color>` at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_clear_constant:
- void **clear_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Clears the constant at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_clear_font:
- void **clear_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Clears the :ref:`Font<class_Font>` at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_clear_icon:
- void **clear_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Clears the icon at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_clear_stylebox:
- void **clear_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Clears :ref:`StyleBox<class_StyleBox>` at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_clear_theme_item:
- void **clear_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Clears the theme item of ``data_type`` at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_copy_default_theme:
- void **copy_default_theme** **(** **)**
Establece los valores del tema a una copia de los valores del tema por defecto.
----
.. _class_Theme_method_copy_theme:
- void **copy_theme** **(** :ref:`Theme<class_Theme>` other **)**
Establece los valores del tema a una copia de un tema dado.
----
.. _class_Theme_method_get_color:
- :ref:`Color<class_Color>` **get_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns the :ref:`Color<class_Color>` at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_get_color_list:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_color_list** **(** :ref:`String<class_String>` node_type **)** |const|
Returns all the :ref:`Color<class_Color>`\ s as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each :ref:`Color<class_Color>`'s name, for use in :ref:`get_color<class_Theme_method_get_color>`, if the theme has ``node_type``.
----
.. _class_Theme_method_get_color_types:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_color_types** **(** **)** |const|
Returns all the :ref:`Color<class_Color>` types as a :ref:`PoolStringArray<class_PoolStringArray>` filled with unique type names, for use in :ref:`get_color<class_Theme_method_get_color>` and/or :ref:`get_color_list<class_Theme_method_get_color_list>`.
----
.. _class_Theme_method_get_constant:
- :ref:`int<class_int>` **get_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns the constant at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_get_constant_list:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_constant_list** **(** :ref:`String<class_String>` node_type **)** |const|
Returns all the constants as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each constant's name, for use in :ref:`get_constant<class_Theme_method_get_constant>`, if the theme has ``node_type``.
----
.. _class_Theme_method_get_constant_types:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_constant_types** **(** **)** |const|
Returns all the constant types as a :ref:`PoolStringArray<class_PoolStringArray>` filled with unique type names, for use in :ref:`get_constant<class_Theme_method_get_constant>` and/or :ref:`get_constant_list<class_Theme_method_get_constant_list>`.
----
.. _class_Theme_method_get_font:
- :ref:`Font<class_Font>` **get_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns the :ref:`Font<class_Font>` at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_get_font_list:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_font_list** **(** :ref:`String<class_String>` node_type **)** |const|
Returns all the :ref:`Font<class_Font>`\ s as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each :ref:`Font<class_Font>`'s name, for use in :ref:`get_font<class_Theme_method_get_font>`, if the theme has ``node_type``.
----
.. _class_Theme_method_get_font_types:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_font_types** **(** **)** |const|
Returns all the :ref:`Font<class_Font>` types as a :ref:`PoolStringArray<class_PoolStringArray>` filled with unique type names, for use in :ref:`get_font<class_Theme_method_get_font>` and/or :ref:`get_font_list<class_Theme_method_get_font_list>`.
----
.. _class_Theme_method_get_icon:
- :ref:`Texture<class_Texture>` **get_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns the icon :ref:`Texture<class_Texture>` at ``name`` if the theme has ``node_type``.
----
.. _class_Theme_method_get_icon_list:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_icon_list** **(** :ref:`String<class_String>` node_type **)** |const|
Returns all the icons as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each :ref:`Texture<class_Texture>`'s name, for use in :ref:`get_icon<class_Theme_method_get_icon>`, if the theme has ``node_type``.
----
.. _class_Theme_method_get_icon_types:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_icon_types** **(** **)** |const|
Returns all the icon types as a :ref:`PoolStringArray<class_PoolStringArray>` filled with unique type names, for use in :ref:`get_icon<class_Theme_method_get_icon>` and/or :ref:`get_icon_list<class_Theme_method_get_icon_list>`.
----
.. _class_Theme_method_get_stylebox:
- :ref:`StyleBox<class_StyleBox>` **get_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns the :ref:`StyleBox<class_StyleBox>` at ``name`` if the theme has ``node_type``.
Valid ``name``\ s may be found using :ref:`get_stylebox_list<class_Theme_method_get_stylebox_list>`. Valid ``node_type``\ s may be found using :ref:`get_stylebox_types<class_Theme_method_get_stylebox_types>`.
----
.. _class_Theme_method_get_stylebox_list:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_stylebox_list** **(** :ref:`String<class_String>` node_type **)** |const|
Returns all the :ref:`StyleBox<class_StyleBox>`\ s as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each :ref:`StyleBox<class_StyleBox>`'s name, for use in :ref:`get_stylebox<class_Theme_method_get_stylebox>`, if the theme has ``node_type``.
Valid ``node_type``\ s may be found using :ref:`get_stylebox_types<class_Theme_method_get_stylebox_types>`.
----
.. _class_Theme_method_get_stylebox_types:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_stylebox_types** **(** **)** |const|
Returns all the :ref:`StyleBox<class_StyleBox>` types as a :ref:`PoolStringArray<class_PoolStringArray>` filled with unique type names, for use in :ref:`get_stylebox<class_Theme_method_get_stylebox>` and/or :ref:`get_stylebox_list<class_Theme_method_get_stylebox_list>`.
----
.. _class_Theme_method_get_theme_item:
- :ref:`Variant<class_Variant>` **get_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns the theme item of ``data_type`` at ``name`` if the theme has ``node_type``.
Valid ``name``\ s may be found using :ref:`get_theme_item_list<class_Theme_method_get_theme_item_list>` or a data type specific method. Valid ``node_type``\ s may be found using :ref:`get_theme_item_types<class_Theme_method_get_theme_item_types>` or a data type specific method.
----
.. _class_Theme_method_get_theme_item_list:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_theme_item_list** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` node_type **)** |const|
Returns all the theme items of ``data_type`` as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each theme items's name, for use in :ref:`get_theme_item<class_Theme_method_get_theme_item>` or a data type specific method, if the theme has ``node_type``.
Valid ``node_type``\ s may be found using :ref:`get_theme_item_types<class_Theme_method_get_theme_item_types>` or a data type specific method.
----
.. _class_Theme_method_get_theme_item_types:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_theme_item_types** **(** :ref:`DataType<enum_Theme_DataType>` data_type **)** |const|
Returns all the theme items of ``data_type`` types as a :ref:`PoolStringArray<class_PoolStringArray>` filled with unique type names, for use in :ref:`get_theme_item<class_Theme_method_get_theme_item>`, :ref:`get_theme_item_list<class_Theme_method_get_theme_item_list>` or data type specific methods.
----
.. _class_Theme_method_get_type_list:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_type_list** **(** :ref:`String<class_String>` node_type **)** |const|
Returns all the theme types as a :ref:`PoolStringArray<class_PoolStringArray>` filled with unique type names, for use in other ``get_*`` functions of this theme.
\ **Note:** ``node_type`` has no effect and will be removed in future version.
----
.. _class_Theme_method_has_color:
- :ref:`bool<class_bool>` **has_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns ``true`` if :ref:`Color<class_Color>` with ``name`` is in ``node_type``.
Returns ``false`` if the theme does not have ``node_type``.
----
.. _class_Theme_method_has_constant:
- :ref:`bool<class_bool>` **has_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns ``true`` if constant with ``name`` is in ``node_type``.
Returns ``false`` if the theme does not have ``node_type``.
----
.. _class_Theme_method_has_default_font:
- :ref:`bool<class_bool>` **has_default_font** **(** **)** |const|
Returns ``true`` if this theme has a valid :ref:`default_font<class_Theme_property_default_font>` value.
----
.. _class_Theme_method_has_font:
- :ref:`bool<class_bool>` **has_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns ``true`` if :ref:`Font<class_Font>` with ``name`` is in ``node_type``.
Returns ``false`` if the theme does not have ``node_type``.
----
.. _class_Theme_method_has_icon:
- :ref:`bool<class_bool>` **has_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns ``true`` if icon :ref:`Texture<class_Texture>` with ``name`` is in ``node_type``.
Returns ``false`` if the theme does not have ``node_type``.
----
.. _class_Theme_method_has_stylebox:
- :ref:`bool<class_bool>` **has_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns ``true`` if :ref:`StyleBox<class_StyleBox>` with ``name`` is in ``node_type``.
Returns ``false`` if the theme does not have ``node_type``.
----
.. _class_Theme_method_has_theme_item:
- :ref:`bool<class_bool>` **has_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)** |const|
Returns ``true`` if a theme item of ``data_type`` with ``name`` is in ``node_type``.
Returns ``false`` if the theme does not have ``node_type``.
----
.. _class_Theme_method_merge_with:
- void **merge_with** **(** :ref:`Theme<class_Theme>` other **)**
Adds missing and overrides existing definitions with values from the ``other`` ``Theme``.
\ **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.
----
.. _class_Theme_method_rename_color:
- void **rename_color** **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Renames the :ref:`Color<class_Color>` at ``old_name`` to ``name`` if the theme has ``node_type``. If ``name`` is already taken, this method fails.
----
.. _class_Theme_method_rename_constant:
- void **rename_constant** **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Renames the constant at ``old_name`` to ``name`` if the theme has ``node_type``. If ``name`` is already taken, this method fails.
----
.. _class_Theme_method_rename_font:
- void **rename_font** **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Renames the :ref:`Font<class_Font>` at ``old_name`` to ``name`` if the theme has ``node_type``. If ``name`` is already taken, this method fails.
----
.. _class_Theme_method_rename_icon:
- void **rename_icon** **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Renames the icon at ``old_name`` to ``name`` if the theme has ``node_type``. If ``name`` is already taken, this method fails.
----
.. _class_Theme_method_rename_stylebox:
- void **rename_stylebox** **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Renames :ref:`StyleBox<class_StyleBox>` at ``old_name`` to ``name`` if the theme has ``node_type``. If ``name`` is already taken, this method fails.
----
.. _class_Theme_method_rename_theme_item:
- void **rename_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` old_name, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type **)**
Renames the theme item of ``data_type`` at ``old_name`` to ``name`` if the theme has ``node_type``. If ``name`` is already taken, this method fails.
----
.. _class_Theme_method_set_color:
- void **set_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`Color<class_Color>` color **)**
Sets the theme's :ref:`Color<class_Color>` to ``color`` at ``name`` in ``node_type``.
Creates ``node_type`` if the theme does not have it.
----
.. _class_Theme_method_set_constant:
- void **set_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`int<class_int>` constant **)**
Sets the theme's constant to ``constant`` at ``name`` in ``node_type``.
Creates ``node_type`` if the theme does not have it.
----
.. _class_Theme_method_set_font:
- void **set_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`Font<class_Font>` font **)**
Sets the theme's :ref:`Font<class_Font>` to ``font`` at ``name`` in ``node_type``.
Creates ``node_type`` if the theme does not have it.
----
.. _class_Theme_method_set_icon:
- void **set_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`Texture<class_Texture>` texture **)**
Sets the theme's icon :ref:`Texture<class_Texture>` to ``texture`` at ``name`` in ``node_type``.
Creates ``node_type`` if the theme does not have it.
----
.. _class_Theme_method_set_stylebox:
- void **set_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`StyleBox<class_StyleBox>` texture **)**
Sets theme's :ref:`StyleBox<class_StyleBox>` to ``stylebox`` at ``name`` in ``node_type``.
Creates ``node_type`` if the theme does not have it.
----
.. _class_Theme_method_set_theme_item:
- void **set_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` name, :ref:`String<class_String>` node_type, :ref:`Variant<class_Variant>` value **)**
Sets the theme item of ``data_type`` to ``value`` at ``name`` in ``node_type``.
Does nothing if the ``value`` type does not match ``data_type``.
Creates ``node_type`` if the theme does not have it.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`