aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/controls')
-rw-r--r--include/cru/ui/controls/Popup.hpp5
-rw-r--r--include/cru/ui/controls/RootControl.hpp17
-rw-r--r--include/cru/ui/controls/Window.hpp5
3 files changed, 3 insertions, 24 deletions
diff --git a/include/cru/ui/controls/Popup.hpp b/include/cru/ui/controls/Popup.hpp
index cd5e1813..2e40bb5b 100644
--- a/include/cru/ui/controls/Popup.hpp
+++ b/include/cru/ui/controls/Popup.hpp
@@ -22,10 +22,5 @@ class Popup : public RootControl {
~Popup() override;
String GetControlType() const override { return kControlType.ToString(); }
-
- protected:
- gsl::not_null<platform::gui::INativeWindow*> CreateNativeWindow(
- gsl::not_null<host::WindowHost*> host,
- platform::gui::INativeWindow* parent) override;
};
} // namespace cru::ui::controls
diff --git a/include/cru/ui/controls/RootControl.hpp b/include/cru/ui/controls/RootControl.hpp
index a795f322..44722cef 100644
--- a/include/cru/ui/controls/RootControl.hpp
+++ b/include/cru/ui/controls/RootControl.hpp
@@ -4,11 +4,13 @@
#include "cru/common/Base.hpp"
#include "cru/platform/gui/Base.hpp"
#include "cru/ui/Base.hpp"
+#include "cru/ui/host/WindowHost.hpp"
namespace cru::ui::controls {
class RootControl : public LayoutControl {
protected:
- explicit RootControl(Control* attached_control);
+ explicit RootControl(Control* attached_control,
+ host::CreateWindowParams params);
public:
CRU_DELETE_COPY(RootControl)
@@ -18,20 +20,7 @@ class RootControl : public LayoutControl {
public:
render::RenderObject* GetRenderObject() const override;
- void EnsureWindowCreated();
-
- // If create is false and native window is not create, it will not be created
- // and shown.
- void Show(bool create = true);
-
- Rect GetRect();
- void SetRect(const Rect& rect);
-
protected:
- virtual gsl::not_null<platform::gui::INativeWindow*> CreateNativeWindow(
- gsl::not_null<host::WindowHost*> host,
- platform::gui::INativeWindow* parent) = 0;
-
void SetGainFocusOnCreateAndDestroyWhenLoseFocus(bool value);
private:
diff --git a/include/cru/ui/controls/Window.hpp b/include/cru/ui/controls/Window.hpp
index 63b4d1e3..b0828f70 100644
--- a/include/cru/ui/controls/Window.hpp
+++ b/include/cru/ui/controls/Window.hpp
@@ -23,10 +23,5 @@ class Window final : public RootControl {
public:
String GetControlType() const final { return control_type.ToString(); }
-
- protected:
- gsl::not_null<platform::gui::INativeWindow*> CreateNativeWindow(
- gsl::not_null<host::WindowHost*> host,
- platform::gui::INativeWindow* parent) override;
};
} // namespace cru::ui::controls