aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/style
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-12-02 19:38:25 +0800
committercrupest <crupest@outlook.com>2020-12-02 19:38:25 +0800
commitd7dca1be0dd0814e30fa63924a20af3d924e974c (patch)
tree0a5ea0b637dc8392eee67ec625a51cef09ec8731 /include/cru/ui/style
parent145cfd5b82d76e0c937eceda707aa22427899943 (diff)
downloadcru-d7dca1be0dd0814e30fa63924a20af3d924e974c.tar.gz
cru-d7dca1be0dd0814e30fa63924a20af3d924e974c.tar.bz2
cru-d7dca1be0dd0814e30fa63924a20af3d924e974c.zip
...
Diffstat (limited to 'include/cru/ui/style')
-rw-r--r--include/cru/ui/style/ApplyBorderStyleInfo.hpp12
-rw-r--r--include/cru/ui/style/Condition.hpp4
-rw-r--r--include/cru/ui/style/Styler.hpp13
3 files changed, 26 insertions, 3 deletions
diff --git a/include/cru/ui/style/ApplyBorderStyleInfo.hpp b/include/cru/ui/style/ApplyBorderStyleInfo.hpp
new file mode 100644
index 00000000..e9c4ca44
--- /dev/null
+++ b/include/cru/ui/style/ApplyBorderStyleInfo.hpp
@@ -0,0 +1,12 @@
+#pragma once
+#include "../Base.hpp"
+
+namespace cru::ui::style {
+struct ApplyBorderStyleInfo {
+ std::shared_ptr<platform::graphics::IBrush> border_brush;
+ std::optional<Thickness> border_thickness;
+ std::optional<CornerRadius> border_radius;
+ std::shared_ptr<platform::graphics::IBrush> foreground_brush;
+ std::shared_ptr<platform::graphics::IBrush> background_brush;
+};
+} // namespace cru::ui::style
diff --git a/include/cru/ui/style/Condition.hpp b/include/cru/ui/style/Condition.hpp
index b88a338f..97d29287 100644
--- a/include/cru/ui/style/Condition.hpp
+++ b/include/cru/ui/style/Condition.hpp
@@ -10,10 +10,8 @@
#include <vector>
namespace cru::ui::style {
-class Condition {
+class Condition : public Object {
public:
- virtual ~Condition() = default;
-
virtual std::vector<IBaseEvent*> ChangeOn(
controls::Control* control) const = 0;
virtual bool Judge(controls::Control* control) const = 0;
diff --git a/include/cru/ui/style/Styler.hpp b/include/cru/ui/style/Styler.hpp
index e69de29b..0b48f1ce 100644
--- a/include/cru/ui/style/Styler.hpp
+++ b/include/cru/ui/style/Styler.hpp
@@ -0,0 +1,13 @@
+#pragma once
+#include "../Base.hpp"
+#include "cru/common/Base.hpp"
+
+#include <optional>
+
+namespace cru::ui::style {
+class Styler : public Object {
+ public:
+ virtual void Apply(controls::Control* control) const;
+};
+
+} // namespace cru::ui::style