From 20dc75e2ce6a9c38dd1888fdbf793fd8a3bc9cd3 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 29 Sep 2018 17:35:09 +0800 Subject: Add PropertyChangedNotifyObject and BorderProperty. --- src/ui/controls/border_control.h | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/ui/controls/border_control.h (limited to 'src/ui/controls/border_control.h') diff --git a/src/ui/controls/border_control.h b/src/ui/controls/border_control.h new file mode 100644 index 00000000..582d2436 --- /dev/null +++ b/src/ui/controls/border_control.h @@ -0,0 +1,61 @@ +#pragma once + +#include "ui/control.h" + +namespace cru::ui::controls +{ + class BorderProperty : public PropertyChangedNotifyObject + { + public: + BorderProperty() = default; + BorderProperty(const BorderProperty& other) = delete; + BorderProperty(BorderProperty&& other) = delete; + BorderProperty& operator=(const BorderProperty& other) = delete; + BorderProperty& operator=(BorderProperty&& other) = delete; + ~BorderProperty() override = default; + + + Microsoft::WRL::ComPtr GetBrush() const + { + return brush_; + } + + float GetWidth() const + { + return width_; + } + + Microsoft::WRL::ComPtr GetStrokeStyle() const + { + return stroke_style_; + } + + float GetRadiusX() const + { + return radius_x_; + } + + float GetRadiusY() const + { + return radius_y_; + } + + void SetBrush(Microsoft::WRL::ComPtr brush); + void SetWidth(float width); + void SetStrokeStyle(Microsoft::WRL::ComPtr stroke_style); + void SetRadiusX(float radius_x); + void SetRadiusY(float radius_y); + + private: + Microsoft::WRL::ComPtr brush_ = nullptr; + float width_ = 1.0f; + Microsoft::WRL::ComPtr stroke_style_ = nullptr; + float radius_x_ = 0.0f; + float radius_y_ = 0.0f; + }; + + class BorderControl : public Control + { + + }; +} -- cgit v1.2.3