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

Interface for managing user input and associated actions. More...

#include <iinput_manager.h>

+ Inheritance diagram for IInputManager:
+ Collaboration diagram for IInputManager:

Public Member Functions

virtual ~IInputManager ()=default
 Virtual destructor for proper cleanup of derived classes.
 
virtual void handleEvent (const SDL_Event &event)=0
 Handles an SDL input event.
 
virtual void registerActions ()=0
 Registers action handlers for input events.
 
virtual void setDependencies (IAssetManager *assets, ISoundManager *sound, IConfigService *settings, size_t &currentIndex, std::vector< TableData > &tables, bool &showConfig, bool &showEditor, bool &showVpsdb, const std::string &exeDir, IScreenshotManager *screenshotManager, IWindowManager *windowManager, std::atomic< bool > &isLoadingTables, ITableLauncher *tableLauncher, ITableCallbacks *tableCallbacks)=0
 Sets dependencies for input handling.
 
virtual void setRuntimeEditor (ConfigUI *editor)=0
 Sets the runtime configuration editor.
 
virtual bool isConfigActive () const =0
 Checks if the configuration UI is active.
 
virtual bool isEditorActive () const =0
 Checks if the metadata editor UI is active.
 
virtual bool isCatalogActive () const =0
 Checks if the metadata catalog UI is active.
 
virtual bool shouldQuit () const =0
 Checks if the application should quit.
 

Detailed Description

Interface for managing user input and associated actions.

This pure virtual class defines methods for handling SDL input events (keyboard, joystick, mouse), registering application actions, and setting up dependencies for interactive event processing. Implementers, such as InputManager, coordinate with components like IAssetManager, ISoundManager, and IScreenshotManager to manage user interactions, including table navigation, configuration UI, and screenshot mode.

Member Function Documentation

◆ handleEvent()

virtual void IInputManager::handleEvent ( const SDL_Event &  event)
pure virtual

Handles an SDL input event.

Processes the provided SDL event (keyboard, joystick, mouse) and triggers the corresponding action based on the input configuration.

Parameters
eventThe SDL event to process.

Implemented in InputManager.

◆ isCatalogActive()

virtual bool IInputManager::isCatalogActive ( ) const
pure virtual

Checks if the metadata catalog UI is active.

Returns
True if the catalog UI is visible, false otherwise.

Implemented in InputManager.

◆ isConfigActive()

virtual bool IInputManager::isConfigActive ( ) const
pure virtual

Checks if the configuration UI is active.

Returns
True if the configuration UI is visible, false otherwise.

Implemented in InputManager.

◆ isEditorActive()

virtual bool IInputManager::isEditorActive ( ) const
pure virtual

Checks if the metadata editor UI is active.

Returns
True if the editor UI is visible, false otherwise.

Implemented in InputManager.

◆ registerActions()

virtual void IInputManager::registerActions ( )
pure virtual

Registers action handlers for input events.

Sets up the mapping of action identifiers to their corresponding handler functions.

Implemented in InputManager.

◆ setDependencies()

virtual void IInputManager::setDependencies ( IAssetManager assets,
ISoundManager sound,
IConfigService settings,
size_t &  currentIndex,
std::vector< TableData > &  tables,
bool &  showConfig,
bool &  showEditor,
bool &  showVpsdb,
const std::string &  exeDir,
IScreenshotManager screenshotManager,
IWindowManager windowManager,
std::atomic< bool > &  isLoadingTables,
ITableLauncher tableLauncher,
ITableCallbacks tableCallbacks 
)
pure virtual

Sets dependencies for input handling.

Configures the input manager with references to components and data needed for action handling, such as assets, sound, settings, and table data.

Parameters
assetsThe asset manager for accessing textures and video players.
soundThe sound manager for playing UI sounds.
settingsThe configuration service for accessing settings.
currentIndexReference to the current table index.
tablesThe list of table data.
showConfigReference to the configuration UI visibility flag.
exeDirThe executable directory for resolving paths.
screenshotManagerThe screenshot manager for screenshot mode.
windowManagerThe window manager for renderer access.

Implemented in InputManager.

◆ setRuntimeEditor()

virtual void IInputManager::setRuntimeEditor ( ConfigUI editor)
pure virtual

Sets the runtime configuration editor.

Assigns the configuration UI editor for runtime settings adjustments.

Parameters
editorThe configuration UI editor to set.

Implemented in InputManager.

◆ shouldQuit()

virtual bool IInputManager::shouldQuit ( ) const
pure virtual

Checks if the application should quit.

Returns
True if a quit action has been triggered, false otherwise.

Implemented in InputManager.


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