EX-Display
EX-Display
Loading...
Searching...
No Matches
/home/runner/work/EX-Display/EX-Display/InputManager.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 *
4 * This is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * It is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this code. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef INPUTMANAGER_H
19#define INPUTMANAGER_H
20
21#include "CallbackInterface.h"
22#include "Defines.h"
23#include "DisplayInterface.h"
24#include "InputInterface.h"
25#include "Logger.h"
26
28public:
31
33 void createInput();
34
37 void addInput(InputInterface *input);
38
42
46 void setDisplay(DisplayInterface *display);
47
49 void startInput();
50
53 void setLogger(Logger *logger);
54
57 void setCallback(CallbackInterface *callback);
58
61
62private:
67};
68
69#endif // INPUTMANAGER_H
Interface class to use for callbacks.
Definition CallbackInterface.h:26
Class to abstract away all physical display implementation to enable multiple display types.
Definition DisplayInterface.h:36
Class to abstract away all physical input implementatio to enable multiple input types Default return...
Definition InputInterface.h:28
Definition InputManager.h:27
void setCallback(CallbackInterface *callback)
Set the CallbackInterface derived instance for user input to use for callbacks.
Definition InputManager.cpp:72
InputInterface * getInput()
Get the configured InputInterface.
Definition InputManager.cpp:53
void setDisplay(DisplayInterface *display)
Set the display interface to retrieve required attributes - note this should only be required for TFT...
Definition InputManager.cpp:55
void createInput()
Call once to create the InputInterface derived input.
Definition CreateDeviceMacros.h:45
void addInput(InputInterface *input)
Set the InputInterface.
Definition InputManager.cpp:27
void setLogger(Logger *logger)
Set the Logger instance.
Definition InputManager.cpp:70
Logger * _logger
Definition InputManager.h:65
InputManager()
Constructor for the InputManager.
Definition InputManager.cpp:25
InputInterface * _input
Definition InputManager.h:64
DisplayInterface * _display
Definition InputManager.h:63
void startInput()
Start the configured input - calls the InputInterface::begin() method.
Definition InputManager.cpp:63
CallbackInterface * _callback
Definition InputManager.h:66
~InputManager()
Destructor for the InputManager.
Definition InputManager.cpp:74
Class to enable simple logging to a Stream object with different log levels This enables embedding pe...
Definition Logger.h:35