BuGUI
BUtton Grid User Interface
Loading...
Searching...
No Matches
base_hardware.hpp
1#pragma once
2#include <io/painter.hpp>
3#include <io/button_painter.hpp>
4#include <macros/labels.hpp>
5
6namespace bugui
7{
10struct base_hardware
11{
12 virtual ~base_hardware() = default;
17 virtual void setup() = 0;
19 virtual void clear() = 0;
21 virtual int width() const = 0;
23 virtual int height() const = 0;
26 virtual void set_grid(painter&) = 0;
29 virtual void set_button(const button_painter&) = 0;
30
31protected:
32 base_hardware() = default;
33};
34
35} // namespace bugui
virtual void clear()=0
Turns off all LEDs.
virtual int height() const =0
Retrieves the height of the device's grid.
virtual void setup()=0
Sends any preliminary commands needed by the device ie. initialising to a particular mode like XY (La...
virtual int width() const =0
Retrieves the with of the device's grid.
virtual void set_button(const button_painter &)=0
Pass a reference to the button_painter object and display it's content to the device's buttons.
virtual void set_grid(painter &)=0
Pass a reference to the painter object and display it's content to the grid.
Conveys button colors from the controller to the base_hardware.
Definition button_painter.hpp:10
The painter class.
Definition painter.hpp:12