ASAPCabinetFE
 
Loading...
Searching...
No Matches
IWindowManager Class Referenceabstract

Interface for managing SDL windows and renderers. More...

#include <iwindow_manager.h>

+ Inheritance diagram for IWindowManager:
+ Collaboration diagram for IWindowManager:

Public Member Functions

virtual ~IWindowManager ()=default
 Virtual destructor for proper cleanup of derived classes.
 
virtual SDL_Window * getPlayfieldWindow ()=0
 Gets the playfield window.
 
virtual SDL_Window * getBackglassWindow ()=0
 Gets the backglass window.
 
virtual SDL_Window * getDMDWindow ()=0
 Gets the DMD window.
 
virtual SDL_Window * getTopperWindow ()=0
 Gets the DMD window.
 
virtual SDL_Renderer * getPlayfieldRenderer ()=0
 Gets the playfield renderer.
 
virtual SDL_Renderer * getBackglassRenderer ()=0
 Gets the backglass renderer.
 
virtual SDL_Renderer * getDMDRenderer ()=0
 Gets the DMD renderer.
 
virtual SDL_Renderer * getTopperRenderer ()=0
 Gets the Topper renderer.
 
virtual void updateWindows (const Settings &settings)=0
 Updates windows with new settings.
 
virtual 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)=0
 Gets the positions of all windows.
 

Detailed Description

Interface for managing SDL windows and renderers.

Interface for window management (forward declaration).

This pure virtual class defines methods for accessing SDL windows and renderers for the playfield, backglass, and DMD displays, updating their configurations using application settings, and retrieving their positions. Implementers, such as WindowManager, coordinate with components like Renderer and AssetManager to manage display resources.

Member Function Documentation

◆ getBackglassRenderer()

virtual SDL_Renderer * IWindowManager::getBackglassRenderer ( )
pure virtual

Gets the backglass renderer.

Retrieves the SDL renderer for the backglass window.

Returns
The SDL renderer for the backglass, or nullptr if not available.

Implemented in WindowManager.

+ Here is the caller graph for this function:

◆ getBackglassWindow()

virtual SDL_Window * IWindowManager::getBackglassWindow ( )
pure virtual

Gets the backglass window.

Retrieves the SDL window used for the backglass display.

Returns
The SDL window for the backglass, or nullptr if not available.

Implemented in WindowManager.

◆ getDMDRenderer()

virtual SDL_Renderer * IWindowManager::getDMDRenderer ( )
pure virtual

Gets the DMD renderer.

Retrieves the SDL renderer for the DMD window.

Returns
The SDL renderer for the DMD, or nullptr if not available.

Implemented in WindowManager.

+ Here is the caller graph for this function:

◆ getDMDWindow()

virtual SDL_Window * IWindowManager::getDMDWindow ( )
pure virtual

Gets the DMD window.

Retrieves the SDL window used for the DMD (Dot Matrix Display).

Returns
The SDL window for the DMD, or nullptr if not available.

Implemented in WindowManager.

◆ getPlayfieldRenderer()

virtual SDL_Renderer * IWindowManager::getPlayfieldRenderer ( )
pure virtual

Gets the playfield renderer.

Retrieves the SDL renderer for the playfield window.

Returns
The SDL renderer for the playfield, or nullptr if not available.

Implemented in WindowManager.

+ Here is the caller graph for this function:

◆ getPlayfieldWindow()

virtual SDL_Window * IWindowManager::getPlayfieldWindow ( )
pure virtual

Gets the playfield window.

Retrieves the SDL window used for the playfield display.

Returns
The SDL window for the playfield, or nullptr if not available.

Implemented in WindowManager.

+ Here is the caller graph for this function:

◆ getTopperRenderer()

virtual SDL_Renderer * IWindowManager::getTopperRenderer ( )
pure virtual

Gets the Topper renderer.

Retrieves the SDL renderer for the Topper window.

Returns
The SDL renderer for the Topper, or nullptr if not available.

Implemented in WindowManager.

+ Here is the caller graph for this function:

◆ getTopperWindow()

virtual SDL_Window * IWindowManager::getTopperWindow ( )
pure virtual

Gets the DMD window.

Retrieves the SDL window used for the topper display.

Returns
The SDL window for the topper display, or nullptr if not available.

Implemented in WindowManager.

◆ getWindowSetup()

virtual void IWindowManager::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 
)
pure virtual

Gets the positions of all windows.

Retrieves the x and y coordinates of the playfield, backglass, and DMD windows.

Parameters
playfieldXThe x-coordinate of the playfield window.
playfieldYThe y-coordinate of the playfield window.
backglassXThe x-coordinate of the backglass window.
backglassYThe y-coordinate of the backglass window.
dmdXThe x-coordinate of the DMD window.
dmdYThe y-coordinate of the DMD window.
topperXThe x-coordinate of the Topper window.
topperYThe y-coordinate of the Topper window.

Implemented in WindowManager.

◆ updateWindows()

virtual void IWindowManager::updateWindows ( const Settings settings)
pure virtual

Updates windows with new settings.

Reconfigures the playfield, backglass, and DMD windows based on the provided application settings, such as resolution, position, and DPI scaling.

Parameters
settingsThe application settings to apply.

Implemented in WindowManager.


The documentation for this class was generated from the following file: