BuGUI
BUtton Grid User Interface
Loading...
Searching...
No Matches
presser.hpp
1#pragma once
2#include "button_presser.hpp"
3#include <geometry/rectangle.hpp>
4
5#include <cstdint>
6
7namespace bugui
8{
9struct base_controller;
11struct presser final
12 : button_presser
13 , rectangle
14{
15 presser() = default;
16
17 void ofset(int x, int y);
18
19 void set_drag(int to_x, int to_y);
20 void set_drop();
21
22 void set_midi(int x, int y, uint8_t midi);
23 void set_bool(int x, int y, bool boolean);
24 void set_double_press(int x, int y);
25 void set_drag(int from_x, int from_y, int to_x, int to_y);
26 void set_drop(int x, int y);
27
28 int get_target_x() const { return target_x; }
29 int get_target_y() const { return target_y; }
30
31private:
32 int target_x{0};
33 int target_y{0};
34};
35
36} // namespace bugui
Serves as the root of the widget tree. Also provides access to buttons componnents.
Definition base_controller.hpp:10
Definition midi.hpp:36
Provides the geometric structure of widgets.
Definition rectangle.hpp:8