Chesto 0.9
A declarative and element-based library for creating GUIs on homebrew'd consoles
Screen.cpp
1#include "Screen.hpp"
2#include "RootDisplay.hpp"
3
4namespace Chesto {
5
6Screen::Screen()
7{
8 // Set to full screen dimensions by default
9 this->width = RootDisplay::screenWidth;
10 this->height = RootDisplay::screenHeight;
11}
12
13Screen::~Screen()
14{
15 // Base destructor - unique_ptr handles cleanup automatically
16}
17
18int Screen::getScreenWidth() const
19{
20 return RootDisplay::screenWidth;
21}
22
23int Screen::getScreenHeight() const
24{
25 return RootDisplay::screenHeight;
26}
27
29 this->width = RootDisplay::screenWidth;
30 this->height = RootDisplay::screenHeight;
31 this->removeAll();
32}
33
34} // namespace Chesto
int width
width and height of this element (must be manually set, isn't usually calculated (but is in some case...
Definition: Element.hpp:132
virtual void rebuildUI()=0
Definition: Screen.cpp:28