#pragma once #include "Base.hpp" #include "controls/Base.hpp" #include "cru/platform/graphics/Brush.hpp" #include "cru/ui/helper/ClickDetector.hpp" #include "style/StyleRuleSet.hpp" #include #include #include #include namespace cru::ui { struct ThemeResources { String default_font_family; std::shared_ptr default_font; std::shared_ptr text_brush; std::shared_ptr text_selection_brush; std::shared_ptr caret_brush; std::shared_ptr button_style; std::shared_ptr text_box_style; style::StyleRuleSet menu_item_style; }; class CRU_UI_API 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_; } void ReadResourcesFile(const String& file_path); private: ThemeResources theme_resource_; }; } // namespace cru::ui