aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/Container.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-09 23:53:18 +0800
committercrupest <crupest@outlook.com>2022-02-09 23:53:18 +0800
commitb8863c403a44c1c7ac35f1a1da92bbf3c8858552 (patch)
tree7e38f029f0657e6c1210a53f1cba331cdb8feab6 /include/cru/ui/controls/Container.h
parentd18b5453d7ffd19667ee8ac125b34ab5328f0dc3 (diff)
downloadcru-b8863c403a44c1c7ac35f1a1da92bbf3c8858552.tar.gz
cru-b8863c403a44c1c7ac35f1a1da92bbf3c8858552.tar.bz2
cru-b8863c403a44c1c7ac35f1a1da92bbf3c8858552.zip
...
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