2#include <bugui/io/painter.hpp>
3#include <bugui/io/button_painter.hpp>
5#include <libremidi/libremidi.hpp>
13 virtual ~base_hardware() =
default;
14 virtual stdx::error set_midi_in_port
15 (
const libremidi::observer& observer
16 , std::string_view port_name)
17 {
return std::errc::protocol_not_supported; };
18 virtual stdx::error set_midi_out_port
19 (
const libremidi::observer& observer
20 , std::string_view port_name)
21 {
return std::errc::protocol_not_supported; };
30 virtual int width()
const {
return 0; };
32 virtual int height()
const {
return 0; };
Provides base functionalities of the hardware object, and enables access from the base_controller.
Definition base_hardware.hpp:12
virtual void reset()=0
Turns off all diplays (LEDs, screens, visual feedback).
virtual void set_button(const button_painter &)
Pass a reference to the button_painter object and display it's content to the device's buttons.
Definition base_hardware.hpp:38
virtual int height() const
Retrieves the height of the device's grid.
Definition base_hardware.hpp:32
virtual void set_grid(painter &)
Pass a reference to the painter object and display it's content to the grid.
Definition base_hardware.hpp:35
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
Retrieves the with of the device's grid.
Definition base_hardware.hpp:30
Adds 2D information on top of a base_painter. The painter is used in user defined paint funcions to d...
Definition painter.hpp:17