blob: 515c7b3112e0a69dc32e7943b9f5e8832c1fb875 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "cru/ui/controls/Popup.hpp"
#include "cru/platform/gui/UiApplication.hpp"
#include "cru/ui/controls/RootControl.hpp"
#include "cru/ui/host/WindowHost.hpp"
#include "cru/ui/render/StackLayoutRenderObject.hpp"
#include <memory>
namespace cru::ui::controls {
Popup::Popup(Control* attached_control) : RootControl(attached_control) {
SetGainFocusOnCreateAndDestroyWhenLoseFocus(true);
}
Popup::~Popup() = default;
gsl::not_null<platform::gui::INativeWindow*> Popup::CreateNativeWindow(
gsl::not_null<host::WindowHost*> host,
platform::gui::INativeWindow* parent) {
auto window = host->CreateNativeWindow(
{parent, platform::gui::CreateWindowFlags::NoCaptionAndBorder});
return window;
}
} // namespace cru::ui::controls
|