Luna/wind/Window.cpp

21 lines
365 B
C++

#include "Window.h"
LinkedList<Window> g_windows;
void Window::draw(ui::Canvas& screen)
{
screen.subcanvas(surface).fill(color);
}
void Window::focus()
{
// Bring the window to the front of the list.
g_windows.remove(this);
g_windows.append(this);
}
Window::Window(ui::Rect r, ui::Color c) : surface(r), color(c)
{
g_windows.append(this);
}