aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/Window.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/controls/Window.hpp')
-rw-r--r--include/cru/ui/controls/Window.hpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/cru/ui/controls/Window.hpp b/include/cru/ui/controls/Window.hpp
new file mode 100644
index 00000000..616e2ee7
--- /dev/null
+++ b/include/cru/ui/controls/Window.hpp
@@ -0,0 +1,36 @@
+#pragma once
+#include "LayoutControl.hpp"
+
+namespace cru::ui::controls {
+class Window final : public LayoutControl {
+ public:
+ static constexpr std::u16string_view control_type = u"Window";
+
+ public:
+ static Window* CreateOverlapped();
+
+ private:
+ Window();
+
+ public:
+ Window(const Window& other) = delete;
+ Window(Window&& other) = delete;
+ Window& operator=(const Window& other) = delete;
+ Window& operator=(Window&& other) = delete;
+ ~Window() override;
+
+ public:
+ std::u16string_view GetControlType() const final;
+
+ render::RenderObject* GetRenderObject() const override;
+
+ protected:
+ void OnAddChild(Control* child, Index position) override;
+ void OnRemoveChild(Control* child, Index position) override;
+
+ private:
+ std::unique_ptr<host::WindowHost> window_host_;
+
+ std::unique_ptr<render::StackLayoutRenderObject> render_object_;
+};
+} // namespace cru::ui