|
AeonGUI
A portable video game graphic user interface library.
|
Represents a display window in the AeonGUI framework. More...
#include <aeongui/dom/Window.hpp>
Public Member Functions | |
| Window () | |
| Default constructor. Creates an empty window. | |
| Window (uint32_t aWidth, uint32_t aHeight) | |
| Construct a window with the given viewport size. | |
| ~Window () override final | |
| Destructor. | |
| void | ResizeViewport (uint32_t aWidth, uint32_t aHeight) |
| Resize the rendering viewport. | |
| const uint8_t * | GetPixels () const |
| Get a pointer to the rendered pixel data. | |
| size_t | GetWidth () const |
| Get the window width in pixels. | |
| size_t | GetHeight () const |
| Get the window height in pixels. | |
| size_t | GetStride () const |
| Get the stride (bytes per row) of the pixel buffer. | |
| void | Draw () |
| Render the current document to the internal canvas. | |
| const Document * | document () const |
| Get the associated Document. | |
| Location & | location () const |
| Get the Location object. | |
| Public Member Functions inherited from AeonGUI::DOM::EventTarget | |
| virtual | ~EventTarget ()=0 |
| Virtual destructor. | |
| void | addEventListener (const DOMString &type, EventListener *callback, const std::variant< std::monostate, AddEventListenerOptions, bool > &options={}) |
| Register an event listener. | |
| void | removeEventListener (const DOMString &type, EventListener *callback, const std::variant< std::monostate, EventListenerOptions, bool > &options={}) |
| Unregister an event listener. | |
| virtual bool | dispatchEvent (Event &event) |
| Dispatch an event to this target. | |
Represents a display window in the AeonGUI framework.
Owns a Document, a CairoCanvas, and a Location. Renders the document into a pixel buffer that can be blitted to the screen.
| AeonGUI::DOM::Window::Window | ( | uint32_t | aWidth, |
| uint32_t | aHeight ) |
Construct a window with the given viewport size.
| aWidth | Initial width in pixels. |
| aHeight | Initial height in pixels. |
| const Document * AeonGUI::DOM::Window::document | ( | ) | const |
| size_t AeonGUI::DOM::Window::GetHeight | ( | ) | const |
Get the window height in pixels.
| const uint8_t * AeonGUI::DOM::Window::GetPixels | ( | ) | const |
Get a pointer to the rendered pixel data.
| size_t AeonGUI::DOM::Window::GetStride | ( | ) | const |
Get the stride (bytes per row) of the pixel buffer.
| size_t AeonGUI::DOM::Window::GetWidth | ( | ) | const |
Get the window width in pixels.
| Location & AeonGUI::DOM::Window::location | ( | ) | const |
| void AeonGUI::DOM::Window::ResizeViewport | ( | uint32_t | aWidth, |
| uint32_t | aHeight ) |
Resize the rendering viewport.
| aWidth | New width in pixels. |
| aHeight | New height in pixels. |