Nui
nui
include
nui
frontend
elements
impl
make_children_update_event.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
nui/frontend/event_system/event_context.hpp
>
4
5
namespace
Nui::Detail
6
{
7
inline
void
makeChildrenUpdateEvent
(
auto
& observedValues,
auto
& childrenRefabricator,
auto
& createdSelfWeak)
8
{
9
const
auto
eventId =
Nui::globalEventContext
.
registerEvent
(
Event
{
10
[childrenRefabricator](int) ->
bool
{
11
(*childrenRefabricator)();
12
return
false
;
13
},
14
[createdSelfWeak]() {
15
return
!createdSelfWeak.expired();
16
}});
17
observedValues.attachOneshotEvent(eventId);
18
}
19
}
Nui::EventContext::registerEvent
EventIdType registerEvent(Event event)
Definition:
event_context.hpp:52
Nui::Event
Definition:
event.hpp:40
event_context.hpp
Nui::Detail
Definition:
rpc_hub.hpp:23
Nui::Detail::makeChildrenUpdateEvent
void makeChildrenUpdateEvent(auto &observedValues, auto &childrenRefabricator, auto &createdSelfWeak)
Definition:
make_children_update_event.hpp:7
Nui::globalEventContext
thread_local EventContext globalEventContext
Definition:
event_context.cpp:5
Generated by
1.9.1