2#include <bugui/widgets/base_container_widget.hpp>
3#include <bugui/hardware/hardware_factory.hpp>
9struct base_controller : base_container_widget
18 {
return horizontal_scale; }
23 {
return vertical_scale; }
25 bool handle_Delete() override final {
return false; };
27#define set_button(L) \
29 void virtual set_##L(uint8_t&& r = 0 \
32 , uint8_t&& a = 255); \
34 bool L##_held() { return L; } \
35 void set_##L##_held(button_presser& p) { L = p.get_bool(); } \
41#define CALL_MACRO(r, data, elem) set_button(elem)
42 FOR_EACH_LABEL(CALL_MACRO)
47 explicit base_controller(std::unique_ptr<base_hardware>&& hardware);
49 std::unique_ptr<base_hardware> hdw;
55 { horizontal_scale += scale_inc; }
60 { vertical_scale += scale_inc; }
71 double horizontal_scale{1.};
72 double vertical_scale{1.};
73 button_painter btn_pnt;
75 void recursive_ofset(base_widget* widget);
void increment_vertical_scale(double scale_inc)
Increments the vertical scale value.
Definition base_controller.hpp:59
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.
Definition base_controller.hpp:54
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:22