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

◆ handle_key_press()

void MayaFlux::Portal::Forma::Context::handle_key_press ( IO::Keys  key)
private

Definition at line 377 of file Context.cpp.

378{
379 if (!m_focused)
380 return;
381
382 auto it = m_callbacks.find(*m_focused);
383 if (it == m_callbacks.end())
384 return;
385
386 const int key_code = static_cast<int>(key);
387 auto key_it = it->second.key_press.find(key_code);
388 if (key_it != it->second.key_press.end())
389 key_it->second(*m_focused);
390}
std::unordered_map< uint32_t, ElementCallbacks > m_callbacks
Definition Context.hpp:252
std::optional< uint32_t > m_focused
Definition Context.hpp:269

References m_callbacks, and m_focused.

Referenced by on_press().

+ Here is the caller graph for this function: