aboutsummaryrefslogtreecommitdiff
path: root/src/ui/border_property.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-07 21:40:04 +0800
committercrupest <crupest@outlook.com>2018-11-07 21:40:04 +0800
commitefdce672123284847bd7fb6f12ac1ec96f28f3ef (patch)
tree298e6313e9a48c5867b2355242b78d3cd23fdc61 /src/ui/border_property.h
parent634dab6ad2c9e4675beacfb77ac02b2d43cab132 (diff)
downloadcru-efdce672123284847bd7fb6f12ac1ec96f28f3ef.tar.gz
cru-efdce672123284847bd7fb6f12ac1ec96f28f3ef.tar.bz2
cru-efdce672123284847bd7fb6f12ac1ec96f28f3ef.zip
Make all header *.hpp .
Diffstat (limited to 'src/ui/border_property.h')
-rw-r--r--src/ui/border_property.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/src/ui/border_property.h b/src/ui/border_property.h
deleted file mode 100644
index ce16dea7..00000000
--- a/src/ui/border_property.h
+++ /dev/null
@@ -1,83 +0,0 @@
-#pragma once
-
-#include "system_headers.h"
-
-#include "base.h"
-
-
-namespace cru::ui
-{
- class BorderProperty final
- {
- public:
- BorderProperty();
- explicit BorderProperty(Microsoft::WRL::ComPtr<ID2D1Brush> brush);
- BorderProperty(const BorderProperty& other) = default;
- BorderProperty(BorderProperty&& other) = default;
- BorderProperty& operator=(const BorderProperty& other) = default;
- BorderProperty& operator=(BorderProperty&& other) = default;
- ~BorderProperty() = default;
-
-
- Microsoft::WRL::ComPtr<ID2D1Brush> GetBrush() const
- {
- return brush_;
- }
-
- float GetStrokeWidth() const
- {
- return stroke_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)
- {
- Require(brush == nullptr, "Brush of BorderProperty mustn't be null.");
- brush_ = std::move(brush);
- }
-
- void SetStrokeWidth(const float stroke_width)
- {
- Require(stroke_width >= 0.0f, "Stroke width must be no less than 0.");
- stroke_width_ = stroke_width;
- }
-
- void SetStrokeStyle(Microsoft::WRL::ComPtr<ID2D1StrokeStyle> stroke_style)
- {
- stroke_style_ = std::move(stroke_style);
- }
-
- void SetRadiusX(const float radius_x)
- {
- Require(radius_x >= 0.0f, "Radius-x must be no less than 0.");
- radius_x_ = radius_x;
- }
-
- void SetRadiusY(const float radius_y)
- {
- Require(radius_y >= 0.0f, "Radius-y must be no less than 0.");
- radius_y_ = radius_y;
- }
-
- private:
- Microsoft::WRL::ComPtr<ID2D1Brush> brush_;
- float stroke_width_ = 1.0f;
- Microsoft::WRL::ComPtr<ID2D1StrokeStyle> stroke_style_ = nullptr;
- float radius_x_ = 0.0f;
- float radius_y_ = 0.0f;
- };
-}