aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/Container.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/controls/Container.h')
-rw-r--r--include/cru/ui/controls/Container.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/cru/ui/controls/Container.h b/include/cru/ui/controls/Container.h
index 98958b3b..c8bf3f32 100644
--- a/include/cru/ui/controls/Container.h
+++ b/include/cru/ui/controls/Container.h
@@ -2,10 +2,12 @@
#include "SingleChildControl.h"
#include "../render/BorderRenderObject.h"
+#include "IBorderControl.h"
namespace cru::ui::controls {
class CRU_UI_API Container
- : public SingleChildControl<render::BorderRenderObject> {
+ : public SingleChildControl<render::BorderRenderObject>,
+ public virtual IBorderControl {
static constexpr StringView kControlType = u"Container";
public:
@@ -16,6 +18,13 @@ class CRU_UI_API Container
~Container() override;
public:
+ bool IsBorderEnabled() const {
+ return GetContainerRenderObject()->IsBorderEnabled();
+ }
+ void SetBorderEnabled(bool enabled) {
+ GetContainerRenderObject()->SetBorderEnabled(enabled);
+ }
+
std::shared_ptr<platform::graphics::IBrush> GetForegroundBrush() const {
return GetContainerRenderObject()->GetForegroundBrush();
}
@@ -32,6 +41,10 @@ class CRU_UI_API Container
GetContainerRenderObject()->SetBackgroundBrush(brush);
}
+ void ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) override {
+ GetContainerRenderObject()->ApplyBorderStyle(style);
+ }
+
public:
String GetControlType() const final { return kControlType.ToString(); }
};