aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/Window.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-09 18:28:33 +0800
committercrupest <crupest@outlook.com>2020-11-09 18:28:33 +0800
commitddc6d6478f849ef10b832bc8b1d8ab7fe9454601 (patch)
treefe1fd08653d97a625d75040d5451081079f404f5 /include/cru/ui/controls/Window.hpp
parent349b26d350d46fd6c48c6895ee9d8ef81add1315 (diff)
downloadcru-ddc6d6478f849ef10b832bc8b1d8ab7fe9454601.tar.gz
cru-ddc6d6478f849ef10b832bc8b1d8ab7fe9454601.tar.bz2
cru-ddc6d6478f849ef10b832bc8b1d8ab7fe9454601.zip
...
Diffstat (limited to 'include/cru/ui/controls/Window.hpp')
-rw-r--r--include/cru/ui/controls/Window.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/cru/ui/controls/Window.hpp b/include/cru/ui/controls/Window.hpp
index 616e2ee7..996bc75e 100644
--- a/include/cru/ui/controls/Window.hpp
+++ b/include/cru/ui/controls/Window.hpp
@@ -24,13 +24,13 @@ class Window final : public LayoutControl {
render::RenderObject* GetRenderObject() const override;
- protected:
- void OnAddChild(Control* child, Index position) override;
- void OnRemoveChild(Control* child, Index position) override;
+ // If create is false and native window is not create, it will not be created
+ // and shown.
+ void Show(bool create = true);
private:
std::unique_ptr<host::WindowHost> window_host_;
std::unique_ptr<render::StackLayoutRenderObject> render_object_;
};
-} // namespace cru::ui
+} // namespace cru::ui::controls