aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/ThemeManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/ThemeManager.hpp')
-rw-r--r--include/cru/ui/ThemeManager.hpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/cru/ui/ThemeManager.hpp b/include/cru/ui/ThemeManager.hpp
index 9908658c..45cd810c 100644
--- a/include/cru/ui/ThemeManager.hpp
+++ b/include/cru/ui/ThemeManager.hpp
@@ -2,19 +2,20 @@
#include "Base.hpp"
#include "cru/common/Base.hpp"
#include "cru/common/Event.hpp"
+#include "cru/common/Exception.hpp"
#include "cru/platform/graphics/Brush.hpp"
-#include <boost/property_tree/ptree.hpp>
-#include <cstddef>
-#include <memory>
-#include <stdexcept>
-#include <string_view>
#include <unordered_map>
namespace cru::ui {
-class BadThemeResourceException : public std::runtime_error {
+class ThemeResourceKeyNotExistException : public Exception {
public:
- using std::runtime_error::runtime_error;
+ using Exception::Exception;
+};
+
+class BadThemeResourceException : public Exception {
+ public:
+ using Exception::Exception;
};
class ThemeManager : public Object {
@@ -42,7 +43,7 @@ class ThemeManager : public Object {
private:
Event<std::nullptr_t> theme_resource_change_event_;
- boost::property_tree::ptree theme_tree_;
+ std::unordered_map<String, String> theme_resource_map_;
std::unordered_map<String, std::shared_ptr<platform::graphics::IBrush>>
brushes_;
};