diff options
author | crupest <crupest@outlook.com> | 2019-04-04 17:12:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-04 17:12:25 +0800 |
commit | a410e2048db6f5ef6fb50e401a59b4b98b979050 (patch) | |
tree | 500680c63b074e8c3eefd756fd6a1d0f41840c1a /include/cru/ui/ui_manager.hpp | |
parent | fcaf471275a67d718887430ee63a53890915c4c7 (diff) | |
download | cru-a410e2048db6f5ef6fb50e401a59b4b98b979050.tar.gz cru-a410e2048db6f5ef6fb50e401a59b4b98b979050.tar.bz2 cru-a410e2048db6f5ef6fb50e401a59b4b98b979050.zip |
...
Diffstat (limited to 'include/cru/ui/ui_manager.hpp')
-rw-r--r-- | include/cru/ui/ui_manager.hpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/cru/ui/ui_manager.hpp b/include/cru/ui/ui_manager.hpp new file mode 100644 index 00000000..6f4a3bc0 --- /dev/null +++ b/include/cru/ui/ui_manager.hpp @@ -0,0 +1,51 @@ +#pragma once +#include "cru/common/base.hpp" + +#include <memory> + +namespace cru::platform { +struct Brush; +struct FontDescriptor; +} // namespace cru::platform + +namespace cru::ui { +class PredefineResources : public Object { + public: + PredefineResources(); + PredefineResources(const PredefineResources& other) = delete; + PredefineResources(PredefineResources&& other) = delete; + PredefineResources& operator=(const PredefineResources& other) = delete; + PredefineResources& operator=(PredefineResources&& other) = delete; + ~PredefineResources() override = default; + + // region Button + std::shared_ptr<platform::Brush> button_normal_border_brush; + + // region TextBlock + std::shared_ptr<platform::Brush> text_block_selection_brush; + std::shared_ptr<platform::Brush> text_block_text_brush; + std::shared_ptr<platform::FontDescriptor> text_block_font; +}; + +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 = default; + + const PredefineResources* GetPredefineResources() const { + return predefine_resources_.get(); + } + + private: + std::unique_ptr<PredefineResources> predefine_resources_; +}; +} // namespace cru::ui |