aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/ui_manager.hpp
blob: 8e5c7075c778c0531b4c39492a67d417c5b23240 (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
#pragma once
#include "base.hpp"

#include "controls/button.hpp"

#include <memory>

namespace cru::platform::graph {
struct IBrush;
struct IFont;
}  // namespace cru::platform::graph

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;
};

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;

  ThemeResources* GetThemeResources() { return &theme_resource_; }

 private:
  ThemeResources theme_resource_;
};
}  // namespace cru::ui