aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/controls')
-rw-r--r--include/cru/ui/controls/Button.hpp8
-rw-r--r--include/cru/ui/controls/IBorderControl.hpp10
2 files changed, 17 insertions, 1 deletions
diff --git a/include/cru/ui/controls/Button.hpp b/include/cru/ui/controls/Button.hpp
index 0d2f4898..7299c146 100644
--- a/include/cru/ui/controls/Button.hpp
+++ b/include/cru/ui/controls/Button.hpp
@@ -2,11 +2,15 @@
#include "ContentControl.hpp"
#include "../helper/ClickDetector.hpp"
+#include "IBorderControl.hpp"
#include "IClickableControl.hpp"
#include "cru/common/Event.hpp"
+#include "cru/ui/style/ApplyBorderStyleInfo.hpp"
namespace cru::ui::controls {
-class Button : public ContentControl, public virtual IClickableControl {
+class Button : public ContentControl,
+ public virtual IClickableControl,
+ public virtual IBorderControl {
public:
static constexpr std::u16string_view control_type = u"Button";
@@ -35,6 +39,8 @@ class Button : public ContentControl, public virtual IClickableControl {
return click_detector_.StateChangeEvent();
}
+ void ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) override;
+
const ButtonStyle& GetStyle() const { return style_; }
void SetStyle(ButtonStyle style);
diff --git a/include/cru/ui/controls/IBorderControl.hpp b/include/cru/ui/controls/IBorderControl.hpp
new file mode 100644
index 00000000..817305ef
--- /dev/null
+++ b/include/cru/ui/controls/IBorderControl.hpp
@@ -0,0 +1,10 @@
+#pragma once
+#include "../style/ApplyBorderStyleInfo.hpp"
+#include "Base.hpp"
+#include "cru/common/Base.hpp"
+
+namespace cru::ui::controls {
+struct IBorderControl : virtual Interface {
+ virtual void ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) = 0;
+};
+} // namespace cru::ui::controls