opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
liboscar
ui
events
open_popup_event.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
liboscar/platform/events/event.h
>
4
#include <
liboscar/ui/popups/popup.h
>
5
6
#include <memory>
7
#include <utility>
8
9
namespace
osc
10
{
11
class
OpenPopupEvent
final
:
public
Event
{
12
public
:
13
explicit
OpenPopupEvent
(std::unique_ptr<Popup>
popup_to_open
) :
14
popup_to_open_{std::
move
(
popup_to_open
)}
15
{
16
enable_propagation
();
17
}
18
19
bool
has_popup
()
const
{
return
popup_to_open_ !=
nullptr
; }
20
std::unique_ptr<Popup>
take_popup
() {
return
std::move(popup_to_open_); }
21
private
:
22
std::unique_ptr<Popup> popup_to_open_;
23
};
24
}
osc::Event
Definition
event.h:13
osc::Event::enable_propagation
void enable_propagation()
Definition
event.h:27
osc::OpenPopupEvent
Definition
open_popup_event.h:11
osc::OpenPopupEvent::has_popup
bool has_popup() const
Definition
open_popup_event.h:19
osc::OpenPopupEvent::OpenPopupEvent
OpenPopupEvent(std::unique_ptr< Popup > popup_to_open)
Definition
open_popup_event.h:13
osc::OpenPopupEvent::take_popup
std::unique_ptr< Popup > take_popup()
Definition
open_popup_event.h:20
event.h
osc
Definition
custom_decoration_generator.h:5
osc::to
constexpr U to(T &&value)
Definition
conversion.h:56
popup.h
Generated by
1.9.8