2#include <widgets/base_container_widget.hpp>
3#include <hardware/hardware_factory.hpp>
9struct base_controller : base_container_widget
19 return horizontal_scale;
26 return vertical_scale;
29 bool handle_Delete() override final {
return false; };
31#define set_button(L) \
33 void virtual set_##L(uint8_t&& r = 0 \
36 , uint8_t&& a = 255); \
38 bool L##_held() { return L; } \
39 void set_##L##_held(button_presser& p) { L = p.get_bool(); } \
45#define CALL_MACRO(r, data, elem) set_button(elem)
46 FOR_EACH_LABEL(CALL_MACRO)
51 explicit base_controller(std::unique_ptr<base_hardware>&& hardware);
53 std::unique_ptr<base_hardware> hdw;
73 double horizontal_scale{1.};
74 double vertical_scale{1.};
75 button_painter btn_pnt;
77 void recursive_ofset(base_widget* widget);
void increment_vertical_scale(double scale_inc)
Increments the vertical scale value.
double get_horizontal_scale() const noexcept
Retrieves the horizontal scale value.
Definition base_controller.hpp:17
void local_repaint(base_widget *widget)
Triggers the painting of the widget pointed to by the parameter.
void set_vetical_scale(double scale)
Set the vertical scale value.
void increment_horizontal_scale(double scale_inc)
Increments the horizontal scale value.
void set_horizontal_scale(double scale)
Set the horizontal scale value.
double get_vertical_scale() const noexcept
Retrieves the vertical scale value.
Definition base_controller.hpp:24