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

◆ destroy_window()

void MayaFlux::Core::WindowManager::destroy_window ( const std::shared_ptr< Window > &  window)

Destroys a window by pointer.

Parameters
windowPointer to window to destroy

Definition at line 56 of file WindowManager.cpp.

57{
58 if (!window)
59 return;
60
61 auto pr_it = std::ranges::find(m_processing_windows, window);
62 if (pr_it != m_processing_windows.end()) {
63 m_processing_windows.erase(pr_it);
64 }
65
66 const std::string title = window->get_create_info().title;
67 remove_from_lookup(window);
68
69 auto it = std::ranges::find(m_windows, window);
70 if (it != m_windows.end()) {
71 m_windows.erase(it);
73 "Destroyed window '{}' - remaining: {}", title, m_windows.size());
74 }
75}
#define MF_INFO(comp, ctx,...)
std::vector< std::shared_ptr< Window > > m_windows
void remove_from_lookup(const std::shared_ptr< Window > &window)
Removes window from lookup table.
std::vector< std::shared_ptr< Window > > m_processing_windows
@ WindowingSubsystem
Windowing system operations (GLFW, SDL)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, m_processing_windows, m_windows, MF_INFO, remove_from_lookup(), and MayaFlux::Journal::WindowingSubsystem.

Referenced by destroy_closed_windows(), and destroy_window_by_title().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: