Namespace: DadGUI::cThemesManager Files: cThemesManager.h / cThemesManager.cpp Directory: DAD_FORGE/GUI/Themes/ Inheritance: iGUI_EventListener Description: Manages the active color palette and notifies listeners when theme changes occur.
📋 Class Description
The cThemesManager class is responsible for managing the visual state (theme) of the user interface. It maintains a reference to the currently used color palette and notifies the various interface components when a theme change is made. It can also handle dynamic palette changes via a cPaletteBuilder.
🔗 External Dependencies
File Inclusions
Included File
Source
Role
"@Options.h"
DAD_FORGE/
Project configuration
Global Variables
Variable / Object
Type
Source
Role
__ColorPalette
sColorPalette[]
extern in cThemesManager.cpp
Array containing the various available palettes
__GUI_EventManager
GUI_EventManager
extern in cThemesManager.cpp
GUI event manager for subscribing to updates
External Functions Called
Function
Source
Usage
__GUI_EventManager.Subscribe_Update(this)
GUI_EventManager
Subscribes the class to GUI update events
📚 Public Methods
cThemesManager
Element
Details
Method
cThemesManager()
Description
Default constructor.
~cThemesManager
Element
Details
Method
virtual ~cThemesManager()
Description
Virtual destructor.
Initialize
Element
Details
Method
void Initialize()
Description
Initializes the theme manager with the first available palette by default, initializes the palette builder, and subscribes to GUI update events.
on_GUI_Update
Element
Details
Method
void on_GUI_Update()
Description
Updates the theme based on palette changes (if the palette builder is active) and triggers the update processes.
getActivePalette
Element
Details
Method
sColorPalette* getActivePalette()
Description
Retrieves a pointer to the currently active color palette.
Return
sColorPalette* : Pointer to the active palette.
operator->
Element
Details
Method
sColorPalette* operator->()
Description
Allows direct access to the active palette’s members via the arrow operator (e.g., themeManager->Color).