aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/win/win_brush.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-04-01 15:28:07 +0800
committercrupest <crupest@outlook.com>2019-04-01 15:28:07 +0800
commit3e89aa733587043645f5fda72596e4ff3cd21d2a (patch)
tree7daadddf1073f537bb580a0cdf77208cf26e6271 /include/cru/platform/win/win_brush.hpp
parent8ca0873597eb05a2f120d3ea107660abcff4533c (diff)
downloadcru-3e89aa733587043645f5fda72596e4ff3cd21d2a.tar.gz
cru-3e89aa733587043645f5fda72596e4ff3cd21d2a.tar.bz2
cru-3e89aa733587043645f5fda72596e4ff3cd21d2a.zip
...
Diffstat (limited to 'include/cru/platform/win/win_brush.hpp')
-rw-r--r--include/cru/platform/win/win_brush.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/cru/platform/win/win_brush.hpp b/include/cru/platform/win/win_brush.hpp
new file mode 100644
index 00000000..2668215d
--- /dev/null
+++ b/include/cru/platform/win/win_brush.hpp
@@ -0,0 +1,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