diff options
author | crupest <crupest@outlook.com> | 2020-11-09 16:18:20 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-11-09 16:18:20 +0800 |
commit | 349b26d350d46fd6c48c6895ee9d8ef81add1315 (patch) | |
tree | 05ad55ea728f9f5451c554f7faf7a76260aaddf8 /src/ui/controls/Popup.cpp | |
parent | 12301a4e71de0802019381215a821ce58723c39a (diff) | |
download | cru-349b26d350d46fd6c48c6895ee9d8ef81add1315.tar.gz cru-349b26d350d46fd6c48c6895ee9d8ef81add1315.tar.bz2 cru-349b26d350d46fd6c48c6895ee9d8ef81add1315.zip |
...
Diffstat (limited to 'src/ui/controls/Popup.cpp')
-rw-r--r-- | src/ui/controls/Popup.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ui/controls/Popup.cpp b/src/ui/controls/Popup.cpp new file mode 100644 index 00000000..f51f2b3b --- /dev/null +++ b/src/ui/controls/Popup.cpp @@ -0,0 +1,20 @@ +#include "cru/ui/controls/Popup.hpp" + +#include "cru/platform/gui/UiApplication.hpp" +#include "cru/ui/host/WindowHost.hpp" +#include "cru/ui/render/StackLayoutRenderObject.hpp" + +#include <memory> + +namespace cru::ui::controls { +Popup::Popup(Control* attached_control) : attached_control_(attached_control) { + render_object_ = std::make_unique<render::StackLayoutRenderObject>(); + SetContainerRenderObject(render_object_.get()); + + window_host_ = std::make_unique<host::WindowHost>( + this, host::CreateWindowParams( + nullptr, platform::gui::CreateWindowFlags::NoCaptionAndBorder)); +} + +Popup::~Popup() = default; +} // namespace cru::ui::controls |