aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/flex_layout.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-03-21 21:42:28 +0800
committercrupest <crupest@outlook.com>2019-03-21 21:42:28 +0800
commitfdbb02b2cbdd4e4069005d0535a343229f7c4d32 (patch)
tree3cc25c18b3b019f09d6478b8b9f7b4ddbaed9eb6 /src/ui/controls/flex_layout.hpp
parent616ebd78b543876388cb3d64f108abea041d4983 (diff)
downloadcru-fdbb02b2cbdd4e4069005d0535a343229f7c4d32.tar.gz
cru-fdbb02b2cbdd4e4069005d0535a343229f7c4d32.tar.bz2
cru-fdbb02b2cbdd4e4069005d0535a343229f7c4d32.zip
...
Diffstat (limited to 'src/ui/controls/flex_layout.hpp')
-rw-r--r--src/ui/controls/flex_layout.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/controls/flex_layout.hpp b/src/ui/controls/flex_layout.hpp
index 6acd25dc..682ed8dc 100644
--- a/src/ui/controls/flex_layout.hpp
+++ b/src/ui/controls/flex_layout.hpp
@@ -13,8 +13,12 @@ class FlexLayout : public Layout {
public:
static constexpr auto control_type = L"FlexLayout";
- public:
+ static FlexLayout* Create() { return new FlexLayout(); }
+
+ protected:
FlexLayout();
+
+ public:
FlexLayout(const FlexLayout& other) = delete;
FlexLayout(FlexLayout&& other) = delete;
FlexLayout& operator=(const FlexLayout& other) = delete;
@@ -23,9 +27,7 @@ class FlexLayout : public Layout {
StringView GetControlType() const override final { return control_type; }
- render::RenderObject* GetRenderObject() const override {
- return render_object_;
- }
+ render::RenderObject* GetRenderObject() const override;
protected:
void OnAddChild(Control* child, int position) override;