aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/frame_layout.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/controls/frame_layout.hpp')
-rw-r--r--src/ui/controls/frame_layout.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/ui/controls/frame_layout.hpp b/src/ui/controls/frame_layout.hpp
new file mode 100644
index 00000000..ca022780
--- /dev/null
+++ b/src/ui/controls/frame_layout.hpp
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <initializer_list>
+
+#include "ui/control.hpp"
+
+namespace cru::ui::controls
+{
+ class FrameLayout : public Control
+ {
+ public:
+ static constexpr auto control_type = L"FrameLayout";
+
+ static FrameLayout* Create(const std::initializer_list<Control*>& children = std::initializer_list<Control*>{})
+ {
+ const auto layout = new FrameLayout();
+ for (auto child : children)
+ layout->AddChild(child);
+ return layout;
+ }
+
+ protected:
+ FrameLayout();
+ public:
+ FrameLayout(const FrameLayout& other) = delete;
+ FrameLayout(FrameLayout&& other) = delete;
+ FrameLayout& operator=(const FrameLayout& other) = delete;
+ FrameLayout& operator=(FrameLayout&& other) = delete;
+ ~FrameLayout() override;
+
+ StringView GetControlType() const override final;
+ };
+}