summaryrefslogtreecommitdiff
path: root/scene/resources/theme.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/theme.h')
-rw-r--r--scene/resources/theme.h85
1 files changed, 42 insertions, 43 deletions
diff --git a/scene/resources/theme.h b/scene/resources/theme.h
index d6d724e3f7..9c17a69e5d 100644
--- a/scene/resources/theme.h
+++ b/scene/resources/theme.h
@@ -31,15 +31,14 @@
#ifndef THEME_H
#define THEME_H
+#include "core/io/resource.h"
#include "core/io/resource_loader.h"
-#include "core/resource.h"
#include "scene/resources/font.h"
#include "scene/resources/shader.h"
#include "scene/resources/style_box.h"
#include "scene/resources/texture.h"
class Theme : public Resource {
-
GDCLASS(Theme, Resource);
RES_BASE_EXTENSION("theme");
@@ -52,13 +51,13 @@ class Theme : public Resource {
HashMap<StringName, HashMap<StringName, Color>> color_map;
HashMap<StringName, HashMap<StringName, int>> constant_map;
- Vector<String> _get_icon_list(const String &p_type) const;
- Vector<String> _get_stylebox_list(const String &p_type) const;
- Vector<String> _get_stylebox_types(void) const;
- Vector<String> _get_font_list(const String &p_type) const;
- Vector<String> _get_color_list(const String &p_type) const;
- Vector<String> _get_constant_list(const String &p_type) const;
- Vector<String> _get_type_list(const String &p_type) const;
+ Vector<String> _get_icon_list(const String &p_node_type) const;
+ Vector<String> _get_stylebox_list(const String &p_node_type) const;
+ Vector<String> _get_stylebox_types() const;
+ Vector<String> _get_font_list(const String &p_node_type) const;
+ Vector<String> _get_color_list(const String &p_node_type) const;
+ Vector<String> _get_constant_list(const String &p_node_type) const;
+ Vector<String> _get_type_list(const String &p_node_type) const;
protected:
bool _set(const StringName &p_name, const Variant &p_value);
@@ -89,42 +88,42 @@ public:
void set_default_theme_font(const Ref<Font> &p_default_font);
Ref<Font> get_default_theme_font() const;
- void set_icon(const StringName &p_name, const StringName &p_type, const Ref<Texture2D> &p_icon);
- Ref<Texture2D> get_icon(const StringName &p_name, const StringName &p_type) const;
- bool has_icon(const StringName &p_name, const StringName &p_type) const;
- void clear_icon(const StringName &p_name, const StringName &p_type);
- void get_icon_list(StringName p_type, List<StringName> *p_list) const;
-
- void set_shader(const StringName &p_name, const StringName &p_type, const Ref<Shader> &p_shader);
- Ref<Shader> get_shader(const StringName &p_name, const StringName &p_type) const;
- bool has_shader(const StringName &p_name, const StringName &p_type) const;
- void clear_shader(const StringName &p_name, const StringName &p_type);
- void get_shader_list(const StringName &p_type, List<StringName> *p_list) const;
-
- void set_stylebox(const StringName &p_name, const StringName &p_type, const Ref<StyleBox> &p_style);
- Ref<StyleBox> get_stylebox(const StringName &p_name, const StringName &p_type) const;
- bool has_stylebox(const StringName &p_name, const StringName &p_type) const;
- void clear_stylebox(const StringName &p_name, const StringName &p_type);
- void get_stylebox_list(StringName p_type, List<StringName> *p_list) const;
+ void set_icon(const StringName &p_name, const StringName &p_node_type, const Ref<Texture2D> &p_icon);
+ Ref<Texture2D> get_icon(const StringName &p_name, const StringName &p_node_type) const;
+ bool has_icon(const StringName &p_name, const StringName &p_node_type) const;
+ void clear_icon(const StringName &p_name, const StringName &p_node_type);
+ void get_icon_list(StringName p_node_type, List<StringName> *p_list) const;
+
+ void set_shader(const StringName &p_name, const StringName &p_node_type, const Ref<Shader> &p_shader);
+ Ref<Shader> get_shader(const StringName &p_name, const StringName &p_node_type) const;
+ bool has_shader(const StringName &p_name, const StringName &p_node_type) const;
+ void clear_shader(const StringName &p_name, const StringName &p_node_type);
+ void get_shader_list(const StringName &p_node_type, List<StringName> *p_list) const;
+
+ void set_stylebox(const StringName &p_name, const StringName &p_node_type, const Ref<StyleBox> &p_style);
+ Ref<StyleBox> get_stylebox(const StringName &p_name, const StringName &p_node_type) const;
+ bool has_stylebox(const StringName &p_name, const StringName &p_node_type) const;
+ void clear_stylebox(const StringName &p_name, const StringName &p_node_type);
+ void get_stylebox_list(StringName p_node_type, List<StringName> *p_list) const;
void get_stylebox_types(List<StringName> *p_list) const;
- void set_font(const StringName &p_name, const StringName &p_type, const Ref<Font> &p_font);
- Ref<Font> get_font(const StringName &p_name, const StringName &p_type) const;
- bool has_font(const StringName &p_name, const StringName &p_type) const;
- void clear_font(const StringName &p_name, const StringName &p_type);
- void get_font_list(StringName p_type, List<StringName> *p_list) const;
-
- void set_color(const StringName &p_name, const StringName &p_type, const Color &p_color);
- Color get_color(const StringName &p_name, const StringName &p_type) const;
- bool has_color(const StringName &p_name, const StringName &p_type) const;
- void clear_color(const StringName &p_name, const StringName &p_type);
- void get_color_list(StringName p_type, List<StringName> *p_list) const;
-
- void set_constant(const StringName &p_name, const StringName &p_type, int p_constant);
- int get_constant(const StringName &p_name, const StringName &p_type) const;
- bool has_constant(const StringName &p_name, const StringName &p_type) const;
- void clear_constant(const StringName &p_name, const StringName &p_type);
- void get_constant_list(StringName p_type, List<StringName> *p_list) const;
+ void set_font(const StringName &p_name, const StringName &p_node_type, const Ref<Font> &p_font);
+ Ref<Font> get_font(const StringName &p_name, const StringName &p_node_type) const;
+ bool has_font(const StringName &p_name, const StringName &p_node_type) const;
+ void clear_font(const StringName &p_name, const StringName &p_node_type);
+ void get_font_list(StringName p_node_type, List<StringName> *p_list) const;
+
+ void set_color(const StringName &p_name, const StringName &p_node_type, const Color &p_color);
+ Color get_color(const StringName &p_name, const StringName &p_node_type) const;
+ bool has_color(const StringName &p_name, const StringName &p_node_type) const;
+ void clear_color(const StringName &p_name, const StringName &p_node_type);
+ void get_color_list(StringName p_node_type, List<StringName> *p_list) const;
+
+ void set_constant(const StringName &p_name, const StringName &p_node_type, int p_constant);
+ int get_constant(const StringName &p_name, const StringName &p_node_type) const;
+ bool has_constant(const StringName &p_name, const StringName &p_node_type) const;
+ void clear_constant(const StringName &p_name, const StringName &p_node_type);
+ void get_constant_list(StringName p_node_type, List<StringName> *p_list) const;
void get_type_list(List<StringName> *p_list) const;