aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/border_control.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/controls/border_control.h')
-rw-r--r--src/ui/controls/border_control.h61
1 files changed, 61 insertions, 0 deletions
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<ID2D1Brush> GetBrush() const
+ {
+ return brush_;
+ }
+
+ float GetWidth() const
+ {
+ return width_;
+ }
+
+ Microsoft::WRL::ComPtr<ID2D1StrokeStyle> GetStrokeStyle() const
+ {
+ return stroke_style_;
+ }
+
+ float GetRadiusX() const
+ {
+ return radius_x_;
+ }
+
+ float GetRadiusY() const
+ {
+ return radius_y_;
+ }
+
+ void SetBrush(Microsoft::WRL::ComPtr<ID2D1Brush> brush);
+ void SetWidth(float width);
+ void SetStrokeStyle(Microsoft::WRL::ComPtr<ID2D1StrokeStyle> stroke_style);
+ void SetRadiusX(float radius_x);
+ void SetRadiusY(float radius_y);
+
+ private:
+ Microsoft::WRL::ComPtr<ID2D1Brush> brush_ = nullptr;
+ float width_ = 1.0f;
+ Microsoft::WRL::ComPtr<ID2D1StrokeStyle> stroke_style_ = nullptr;
+ float radius_x_ = 0.0f;
+ float radius_y_ = 0.0f;
+ };
+
+ class BorderControl : public Control
+ {
+
+ };
+}