From fdbb02b2cbdd4e4069005d0535a343229f7c4d32 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 21 Mar 2019 21:42:28 +0800 Subject: ... --- src/ui/controls/flex_layout.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/ui/controls/flex_layout.hpp') 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; -- cgit v1.2.3