Manages SDL windows and renderers for VPX displays. More...
#include <window_manager.h>
Public Member Functions | |
WindowManager (const Settings &settings) | |
Constructs a WindowManager instance. | |
~WindowManager ()=default | |
Destroys the WindowManager instance. | |
SDL_Window * | getPlayfieldWindow () override |
Gets the playfield window. | |
SDL_Window * | getBackglassWindow () override |
Gets the backglass window. | |
SDL_Window * | getDMDWindow () override |
Gets the DMD window. | |
SDL_Window * | getTopperWindow () override |
Gets the topper window. | |
SDL_Renderer * | getPlayfieldRenderer () override |
Gets the playfield renderer. | |
SDL_Renderer * | getBackglassRenderer () override |
Gets the backglass renderer. | |
SDL_Renderer * | getDMDRenderer () override |
Gets the DMD renderer. | |
SDL_Renderer * | getTopperRenderer () override |
Gets the topper renderer. | |
void | updateWindows (const Settings &settings) override |
Updates windows with new settings. | |
void | getWindowSetup (int &playfieldX, int &playfieldY, int &playfieldWidth, int &playfieldHeight, int &backglassX, int &backglassY, int &backglassWidth, int &backglassHeight, int &dmdX, int &dmdY, int &dmdWidth, int &dmdHeight, int &topperX, int &topperY, int &topperWidth, int &topperHeight) override |
Gets the positions of all windows. | |
![]() | |
virtual | ~IWindowManager ()=default |
Virtual destructor for proper cleanup of derived classes. | |
Manages SDL windows and renderers for VPX displays.
This class implements the IWindowManager interface to create, manage, and update SDL windows and renderers for the playfield, backglass, DMD, and topper displays. It uses application settings to configure window properties and supports DPI scaling.
|
explicit |
Constructs a WindowManager instance.
Initializes SDL windows and renderers for the playfield, backglass, DMD, and topper displays based on the provided settings.
settings | The application settings for window configuration. |
|
default |
Destroys the WindowManager instance.
Default destructor, no special cleanup required (managed by smart pointers).
|
inlineoverridevirtual |
Gets the backglass renderer.
Implements IWindowManager.
|
inlineoverridevirtual |
Gets the backglass window.
Implements IWindowManager.
|
inlineoverridevirtual |
Gets the DMD renderer.
Implements IWindowManager.
|
inlineoverridevirtual |
Gets the DMD window.
Implements IWindowManager.
|
inlineoverridevirtual |
Gets the playfield renderer.
Implements IWindowManager.
|
inlineoverridevirtual |
Gets the playfield window.
Implements IWindowManager.
|
inlineoverridevirtual |
Gets the topper renderer.
Implements IWindowManager.
|
inlineoverridevirtual |
Gets the topper window.
Implements IWindowManager.
|
overridevirtual |
Gets the positions of all windows.
Retrieves the x and y coordinates of the playfield, backglass, DMD, and topper windows.
playfieldX | The x-coordinate of the playfield window. |
playfieldY | The y-coordinate of the playfield window. |
backglassX | The x-coordinate of the backglass window. |
backglassY | The y-coordinate of the backglass window. |
dmdX | The x-coordinate of the DMD window. |
dmdY | The y-coordinate of the DMD window. |
topperX | The x-coordinate of the topper window. |
topperY | The y-coordinate of the topper window. |
Implements IWindowManager.
|
overridevirtual |
Updates windows with new settings.
Reconfigures the playfield, backglass, DMD, and topper windows and renderers based on the provided application settings.
settings | The application settings to apply. |
Implements IWindowManager.