39 lines
593 B
C
39 lines
593 B
C
|
/**
|
||
|
* @file Window.h
|
||
|
* @author apio (cloudapio.eu)
|
||
|
* @brief UI windows.
|
||
|
*
|
||
|
* @copyright Copyright (c) 2023, the Luna authors.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
#include <luna/OwnedPtr.h>
|
||
|
#include <luna/StringView.h>
|
||
|
#include <ui/Canvas.h>
|
||
|
#include <ui/Rect.h>
|
||
|
|
||
|
namespace ui
|
||
|
{
|
||
|
class Window
|
||
|
{
|
||
|
public:
|
||
|
static Result<OwnedPtr<Window>> create(Rect rect);
|
||
|
|
||
|
void set_title(StringView title);
|
||
|
|
||
|
Canvas& canvas()
|
||
|
{
|
||
|
return m_canvas;
|
||
|
}
|
||
|
|
||
|
void update();
|
||
|
|
||
|
~Window();
|
||
|
|
||
|
private:
|
||
|
int m_id;
|
||
|
Canvas m_canvas;
|
||
|
};
|
||
|
}
|