aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/Popup.hpp
blob: cd5e18130232d4a98247a2ec07e93a6dbe7ddb63 (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
27
28
29
30
31
#pragma once
#include "RootControl.hpp"

#include "cru/platform/gui/Base.hpp"

#include <memory>

namespace cru::ui::controls {
class Popup : public RootControl {
 public:
  static constexpr StringView kControlType = u"Popup";

  static Popup* Create(Control* attached_control = nullptr) {
    return new Popup(attached_control);
  }

  explicit Popup(Control* attached_control = nullptr);

  CRU_DELETE_COPY(Popup)
  CRU_DELETE_MOVE(Popup)

  ~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