MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ Context() [1/3]

MayaFlux::Portal::Forma::Context::Context ( std::shared_ptr< Layer >  layer,
std::shared_ptr< Core::Window >  window,
Vruta::EventManager &  event_manager,
std::string  name 
)

Construct and immediately register event coroutines.

Parameters
layerLayer to hit-test against. Must outlive Context.
windowWindow whose surface the layer lives on.
event_managerEngine EventManager for coroutine registration.
nameUnique name scoping all registered event handlers. Must be unique across all live Contexts.

Definition at line 12 of file Context.cpp.

16 : m_layer(std::move(layer))
17 , m_window(std::move(window))
18 , m_event_manager(event_manager)
19 , m_name(std::move(name))
20{
21 if (m_window) {
22 const auto& state = m_window->get_state();
23 m_known_width = state.current_width;
24 m_known_height = state.current_height;
25 }
27}
std::weak_ptr< Core::Window > window
Definition Picker.cpp:23
std::string name
Definition VKDevice.cpp:123
std::shared_ptr< Layer > m_layer
Definition Context.hpp:355
Vruta::EventManager & m_event_manager
Definition Context.hpp:357
std::shared_ptr< Core::Window > m_window
Definition Context.hpp:356
const std::shared_ptr< Layer > & layer() const noexcept
The Layer this Context hit-tests against.
Definition Context.hpp:315

References m_known_height, m_known_width, m_window, and register_handlers().

+ Here is the call graph for this function: