aboutsummaryrefslogtreecommitdiff
path: root/src/theme_builder/components/styler/BorderStylerEditor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/theme_builder/components/styler/BorderStylerEditor.h')
-rw-r--r--src/theme_builder/components/styler/BorderStylerEditor.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/theme_builder/components/styler/BorderStylerEditor.h b/src/theme_builder/components/styler/BorderStylerEditor.h
new file mode 100644
index 00000000..16ae64fb
--- /dev/null
+++ b/src/theme_builder/components/styler/BorderStylerEditor.h
@@ -0,0 +1,43 @@
+#pragma once
+#include "../properties/ColorPropertyEditor.h"
+#include "../properties/CornerRadiusPropertyEditor.h"
+#include "../properties/OptionalPropertyEditor.h"
+#include "../properties/ThicknessPropertyEditor.h"
+#include "cru/common/ClonablePtr.h"
+#include "cru/common/Event.h"
+#include "cru/ui/components/Component.h"
+#include "cru/ui/controls/CheckBox.h"
+#include "cru/ui/controls/FlexLayout.h"
+#include "cru/ui/style/Styler.h"
+
+namespace cru::theme_builder::components::styler {
+class BorderStylerEditor : public ui::components::Component {
+ public:
+ BorderStylerEditor();
+ ~BorderStylerEditor() override;
+
+ ui::controls::Control* GetRootControl() override { return nullptr; }
+
+ ClonablePtr<ui::style::BorderStyler> GetStyler();
+ void SetStyler(const ClonablePtr<ui::style::BorderStyler>& styler);
+
+ IEvent<ClonablePtr<ui::style::BorderStyler>>* ChangeEvent() {
+ return &change_event_;
+ }
+
+ private:
+ ui::controls::FlexLayout container_;
+ properties::OptionalPropertyEditor<properties::CornerRadiusPropertyEditor>
+ corner_radius_editor_;
+ properties::OptionalPropertyEditor<properties::ThicknessPropertyEditor>
+ thickness_editor_;
+ properties::OptionalPropertyEditor<properties::ColorPropertyEditor>
+ brush_editor_;
+ properties::OptionalPropertyEditor<properties::ColorPropertyEditor>
+ foreground_brush_editor_;
+ properties::OptionalPropertyEditor<properties::ColorPropertyEditor>
+ background_brush_editor_;
+
+ Event<ClonablePtr<ui::style::BorderStyler>> change_event_;
+};
+} // namespace cru::theme_builder::components::styler