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.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/cru/ui/controls/Container.h b/include/cru/ui/controls/Container.h
index 926e395e..adb0fad1 100644
--- a/include/cru/ui/controls/Container.h
+++ b/include/cru/ui/controls/Container.h
@@ -1,11 +1,12 @@
#pragma once
-#include "ContentControl.h"
+#include "SingleChildControl.h"
-#include "cru/ui/render/BorderRenderObject.h"
+#include "../render/BorderRenderObject.h"
namespace cru::ui::controls {
-class CRU_UI_API Container : public ContentControl {
- static constexpr StringView control_type = u"Container";
+class CRU_UI_API Container
+ : public SingleChildControl<render::BorderRenderObject> {
+ static constexpr StringView kControlType = u"Container";
protected:
Container();
@@ -17,11 +18,6 @@ class CRU_UI_API Container : public ContentControl {
~Container() override;
public:
- String GetControlType() const final { return control_type.ToString(); }
-
- render::RenderObject* GetRenderObject() const override;
-
- private:
- std::unique_ptr<render::BorderRenderObject> render_object_;
+ String GetControlType() const final { return kControlType.ToString(); }
};
} // namespace cru::ui::controls