MayaFlux 1.0.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 395 of file ViewportPreset.cpp.

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

References cancel_event_handler(), name, and window.

+ Here is the call graph for this function: