aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/ui_manager.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-12-13 01:02:47 +0800
committercrupest <crupest@outlook.com>2019-12-13 01:02:47 +0800
commit9110574bb51e9e2959842a7641f598d34c3cd847 (patch)
tree96ee1f5b3c40095e4e923fc763de0663ee6a01aa /include/cru/ui/ui_manager.hpp
parentf2aa96fba0b72eeeadf5160ea5df2c8143ec8aa0 (diff)
downloadcru-9110574bb51e9e2959842a7641f598d34c3cd847.tar.gz
cru-9110574bb51e9e2959842a7641f598d34c3cd847.tar.bz2
cru-9110574bb51e9e2959842a7641f598d34c3cd847.zip
...
Diffstat (limited to 'include/cru/ui/ui_manager.hpp')
-rw-r--r--include/cru/ui/ui_manager.hpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/cru/ui/ui_manager.hpp b/include/cru/ui/ui_manager.hpp
index 5501c62c..199ff28d 100644
--- a/include/cru/ui/ui_manager.hpp
+++ b/include/cru/ui/ui_manager.hpp
@@ -1,14 +1,13 @@
#pragma once
#include "base.hpp"
-#include "cru/common/base.hpp"
#include "controls/button.hpp"
#include <memory>
namespace cru::platform::graph {
-class Brush;
-class Font;
+struct IBrush;
+struct IFont;
} // namespace cru::platform::graph
namespace cru::ui {
@@ -23,12 +22,12 @@ class PredefineResources : public Object {
~PredefineResources() override = default;
// region Button
- std::shared_ptr<platform::graph::Brush> button_normal_border_brush;
+ std::shared_ptr<platform::graph::IBrush> button_normal_border_brush;
// region TextBlock
- std::shared_ptr<platform::graph::Brush> text_block_selection_brush;
- std::shared_ptr<platform::graph::Brush> text_block_text_brush;
- std::shared_ptr<platform::graph::Font> text_block_font;
+ std::shared_ptr<platform::graph::IBrush> text_block_selection_brush;
+ std::shared_ptr<platform::graph::IBrush> text_block_text_brush;
+ std::shared_ptr<platform::graph::IFont> text_block_font;
};
struct ThemeResources {
@@ -53,9 +52,7 @@ class UiManager : public Object {
return predefine_resources_.get();
}
- ThemeResources* GetThemeResources() {
- return &theme_resource_;
- }
+ ThemeResources* GetThemeResources() { return &theme_resource_; }
private:
std::unique_ptr<PredefineResources> predefine_resources_;