aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/ui_manager.hpp
blob: 2dc9cf6bc2eb914d0a0233808e259e1332db585f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include "cru/common/base.hpp"

#include <memory>

namespace cru::platform::graph {
struct IBrush;
struct IFontDescriptor;
}  // 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::graph::IBrush> button_normal_border_brush;

  // region TextBlock
  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::IFontDescriptor> 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