mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 04:08:08 +00:00
19 lines
494 B
C++
19 lines
494 B
C++
#include "WindowList.h"
|
|
|
|
Window& WindowList::ensure_window(const WindowIdentifier& identifier)
|
|
{
|
|
auto it = m_windows.find(identifier);
|
|
if (it != m_windows.end())
|
|
return *it->value;
|
|
auto window = make<Window>(identifier);
|
|
window->set_button(aid_create_button());
|
|
auto& window_ref = *window;
|
|
m_windows.set(identifier, move(window));
|
|
return window_ref;
|
|
}
|
|
|
|
void WindowList::remove_window(const WindowIdentifier& identifier)
|
|
{
|
|
m_windows.remove(identifier);
|
|
}
|