Namespace : DadGUI::GUI_EventManager Files : GUI_Event.h Directory : DAD_FORGE/GUI/Core/ Inheritance: None Description : Manages all GUI event subscriptions and dispatching.
📋 Class Description
The GUI_EventManager class is the central component for user interface event management. It handles the following event types:
FastUpdate (Fast update, timing defined by GUI_FAST_UPDATE_MS - 10ms by default);
Update (Normal update, timing defined by GUI_UPDATE_MS - 300ms by default);
RT_ProcessIn Event before the real-time audio loop.
RT_ProcessEvent Event within the real-time audio loop.
RT_ProcessOutEvent Event after the real-time audio loop.
SerializeSave Event for saving into a preset.
SerializeRestore Event for restoring a preset.
SerializeIsDirty Event to test if the object’s state has changed since the last save or restore.
Listening classes must inherit:
from the iGUI_EventListener class for update and RT_Process events.
from the cSerializedObject class for serialization events.
The GUI_EventManager class uses a “family” system (numeric identifiers) to allow selective message routing: broadcasting events to all subscribers or only to those belonging to a specific family (active or explicitly designated).
🔗 External Dependencies
File Inclusions
Included File
Source
Role
"main.h"
DAD_FORGE/Core
Basic definitions and system types
"AudioManager.h"
DAD_FORGE/Drivers
Audio loop manager
"EventManager.h"
DadUtilities
Subscription and broadcast management engine
"Serialize.h"
DAD_FORGE/Core
Object serialization management
🎯 Associated Enumerations and Structures
iGUI_EventListener
Abstract interface for objects wishing to receive event notifications related to the interface lifecycle or audio processing.
Element / Variable
Type / Value (if applicable)
Description
on_GUI_RT_Process
void
Called during real-time audio processing.
on_GUI_RT_ProcessIn
void
Called before audio processing (input buffer).
on_GUI_RT_ProcessOut
void
Called after audio processing (output buffer).
on_GUI_Update
void
Called during standard GUI update cycles.
on_GUI_FastUpdate
void
Called during fast GUI update cycles.
📚 Public Methods
GUI_EventManager
Element
Details
Method
GUI_EventManager()
Description
Default constructor.
~GUI_EventManager
Element
Details
Method
~GUI_EventManager()
Description
Default destructor.
Subscribe_RT_Process
Element
Details
Method
void Subscribe_RT_Process(iGUI_EventListener* listener, uint32_t family = 0)
Description
Subscribes to real-time processing events.
Parameter(s)
listener
iGUI_EventListener* The object that will receive the event.
family
uint32_t Family ID (0 to receive all events).
Subscribe_RT_ProcessIn
Element
Details
Method
void Subscribe_RT_ProcessIn(iGUI_EventListener* listener, uint32_t family = 0)
Description
Subscribes to pre-audio processing events.
Parameter(s)
listener
iGUI_EventListener* The object that will receive the event.
family
uint32_t Family ID (0 to receive all events).
Subscribe_RT_ProcessOut
Element
Details
Method
void Subscribe_RT_ProcessOut(iGUI_EventListener* listener, uint32_t family = 0)
Description
Subscribes to post-audio processing events.
Parameter(s)
listener
iGUI_EventListener* The object that will receive the event.
family
uint32_t Family ID (0 to receive all events).
Subscribe_Update
Element
Details
Method
void Subscribe_Update(iGUI_EventListener* listener, uint32_t family = 0)
Description
Subscribes to regular GUI update events.
Parameter(s)
listener
iGUI_EventListener* The object that will receive the event.
family
uint32_t Family ID (0 to receive all events).
Subscribe_FastUpdate
Element
Details
Method
void Subscribe_FastUpdate(iGUI_EventListener* listener, uint32_t family = 0)
Description
Subscribes to fast GUI update events.
Parameter(s)
listener
iGUI_EventListener* The object that will receive the event.
family
uint32_t Family ID (0 to receive all events).
Subscribe_SerializeSave
Element
Details
Method
void Subscribe_SerializeSave(DadPersistentStorage::cSerializedObject* serializable, uint32_t family = 0)
Description
Subscribes to serialization save events.
Parameter(s)
serializable
DadPersistentStorage::cSerializedObject* The object to serialize.
family
uint32_t Family ID (0 to receive all events).
Subscribe_SerializeRestore
Element
Details
Method
void Subscribe_SerializeRestore(DadPersistentStorage::cSerializedObject* serializable, uint32_t family = 0)
Description
Subscribes to serialization restore events.
Parameter(s)
serializable
DadPersistentStorage::cSerializedObject* The object to restore.
family
uint32_t Family ID (0 to receive all events).
Subscribe_SerializeIsDirty
Element
Details
Method
void Subscribe_SerializeIsDirty(DadPersistentStorage::cSerializedObject* serializable, uint32_t family = 0)
Description
Subscribes to “dirty” state check events for serialization.
Parameter(s)
serializable
DadPersistentStorage::cSerializedObject* The object to check.
family
uint32_t Family ID (0 to receive all events).
Subscribe_AllSerializeEvents
Element
Details
Method
void Subscribe_AllSerializeEvents(DadPersistentStorage::cSerializedObject* serializable, uint32_t family = 0)
Description
Simultaneously subscribes to Save, Restore, and IsDirty serialization events.
Parameter(s)
serializable
DadPersistentStorage::cSerializedObject* The object to monitor.