aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/win/win_brush.hpp
blob: 2668215d9c412bd1ade1052918d385df2ad6bf9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include "win_pre_config.hpp"

#include "../brush.hpp"

namespace cru::platform::win {
class WinSolidColorBrush : public Object, public virtual SolidColorBrush {
 public:
  explicit WinSolidColorBrush(
      Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> brush);
  WinSolidColorBrush(const WinSolidColorBrush& other) = delete;
  WinSolidColorBrush(WinSolidColorBrush&& other) = delete;
  WinSolidColorBrush& operator=(const WinSolidColorBrush& other) = delete;
  WinSolidColorBrush& operator=(WinSolidColorBrush&& other) = delete;
  ~WinSolidColorBrush() override = default;

  ui::Color GetColor() override;
  void SetColor(const ui::Color& color) override;

 private:
  Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> brush_;
};
}  // namespace cru::platform::win