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

◆ unbind_viewport_preset()

MAYAFLUX_API void MayaFlux::unbind_viewport_preset ( const std::shared_ptr< Core::Window > &  window,
const std::string &  name = "default" 
)

Cancel all event handlers registered by bind_viewport_preset() and restore the window input config to its state before bind was called.

Parameters
windowWindow passed to bind_viewport_preset()
nameName passed to bind_viewport_preset()

Definition at line 394 of file ViewportPreset.cpp.

397{
398 const std::string key = make_key(window, name);
399 auto it = s_registry.find(key);
400 if (it == s_registry.end())
401 return;
402
403 window->set_input_config(it->second.saved_config);
404
405 for (const auto& ev : it->second.registered_events)
407
408 s_registry.erase(it);
409}
std::vector< std::string > registered_events
bool cancel_event_handler(const std::string &name)
Cancel an event handler by name.
Definition Chronie.cpp:266

References cancel_event_handler().

+ Here is the call graph for this function: