ladybird/Widgets/AbstractScreen.h

25 lines
442 B
C
Raw Normal View History

2018-10-10 15:12:38 +02:00
#pragma once
2018-10-10 16:49:36 +02:00
#include "Object.h"
2018-10-14 00:21:42 +02:00
#include "Rect.h"
2018-10-10 16:49:36 +02:00
class AbstractScreen : public Object {
2018-10-10 15:12:38 +02:00
public:
virtual ~AbstractScreen();
int width() const { return m_width; }
int height() const { return m_height; }
2018-10-10 15:12:38 +02:00
static AbstractScreen& the();
2018-10-14 00:21:42 +02:00
Rect rect() const { return { 0, 0, width(), height() }; }
2018-10-10 15:12:38 +02:00
protected:
AbstractScreen(unsigned width, unsigned height);
private:
int m_width { 0 };
int m_height { 0 };
2018-10-10 15:12:38 +02:00
};