MayaFlux 0.5.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 391 of file Context.cpp.

392{
393 if (!m_focused)
394 return;
395
396 auto it = m_callbacks.find(*m_focused);
397 if (it == m_callbacks.end())
398 return;
399
400 const int key_code = static_cast<int>(key);
401 auto key_it = it->second.key_press.find(key_code);
402 if (key_it != it->second.key_press.end())
403 key_it->second(*m_focused);
404}
std::unordered_map< uint32_t, ElementCallbacks > m_callbacks
Definition Context.hpp:269
std::optional< uint32_t > m_focused
Definition Context.hpp:286

References m_callbacks, and m_focused.

Referenced by on_press().

+ Here is the caller graph for this function: