aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/UiManager.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-05-24 01:40:02 +0800
committercrupest <crupest@outlook.com>2020-05-24 01:40:02 +0800
commitd86a71f79afe0e4dac768f61d6bff690567aca5b (patch)
tree4957e9a64c77680deb07201fbd879bf036616dae /include/cru/ui/UiManager.hpp
parentf3a8fd608a9776ef0a5f547da918a32cf6074060 (diff)
downloadcru-d86a71f79afe0e4dac768f61d6bff690567aca5b.tar.gz
cru-d86a71f79afe0e4dac768f61d6bff690567aca5b.tar.bz2
cru-d86a71f79afe0e4dac768f61d6bff690567aca5b.zip
...
Diffstat (limited to 'include/cru/ui/UiManager.hpp')
-rw-r--r--include/cru/ui/UiManager.hpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/cru/ui/UiManager.hpp b/include/cru/ui/UiManager.hpp
new file mode 100644
index 00000000..e6facdbd
--- /dev/null
+++ b/include/cru/ui/UiManager.hpp
@@ -0,0 +1,35 @@
+#pragma once
+#include "Base.hpp"
+
+#include "controls/Base.hpp"
+
+namespace cru::ui {
+struct ThemeResources {
+ std::shared_ptr<platform::graph::IFont> default_font;
+ std::shared_ptr<platform::graph::IBrush> text_brush;
+ std::shared_ptr<platform::graph::IBrush> text_selection_brush;
+ std::shared_ptr<platform::graph::IBrush> caret_brush;
+ controls::ButtonStyle button_style;
+ controls::TextBoxBorderStyle text_box_border_style;
+};
+
+class UiManager : public Object {
+ public:
+ static UiManager* GetInstance();
+
+ private:
+ UiManager();
+
+ public:
+ UiManager(const UiManager& other) = delete;
+ UiManager(UiManager&& other) = delete;
+ UiManager& operator=(const UiManager& other) = delete;
+ UiManager& operator=(UiManager&& other) = delete;
+ ~UiManager() override;
+
+ ThemeResources* GetThemeResources() { return &theme_resource_; }
+
+ private:
+ ThemeResources theme_resource_;
+};
+} // namespace cru::ui