2023-08-03 15:38:49 +00:00
|
|
|
#pragma once
|
|
|
|
#include <luna/LinkedList.h>
|
2023-08-14 16:15:29 +00:00
|
|
|
#include <luna/String.h>
|
2023-08-03 15:38:49 +00:00
|
|
|
#include <ui/Canvas.h>
|
|
|
|
#include <ui/Color.h>
|
|
|
|
#include <ui/Rect.h>
|
|
|
|
|
|
|
|
struct Window : public LinkedListNode<Window>
|
|
|
|
{
|
|
|
|
ui::Rect surface;
|
2023-08-04 14:08:58 +00:00
|
|
|
ui::Rect titlebar;
|
2023-08-04 19:17:50 +00:00
|
|
|
ui::Rect close_button;
|
2023-08-04 14:08:58 +00:00
|
|
|
ui::Rect contents;
|
2023-08-03 15:38:49 +00:00
|
|
|
ui::Color color;
|
2023-08-14 16:15:29 +00:00
|
|
|
String name;
|
2023-08-03 15:38:49 +00:00
|
|
|
|
2023-08-14 16:15:29 +00:00
|
|
|
static int titlebar_height();
|
|
|
|
|
|
|
|
Window(ui::Rect, ui::Color, String&&);
|
2023-08-03 15:38:49 +00:00
|
|
|
|
|
|
|
void focus();
|
|
|
|
|
|
|
|
void draw(ui::Canvas& screen);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern LinkedList<Window> g_windows;
|