17#ifndef ONHOLD_EVENT_DEBOUNCE
19#define ONHOLD_EVENT_DEBOUNCE 200
32 std::function<void(
Widget &element,
const Event &event)> callbackPress;
34 std::function<void(
Widget &element,
const Event &event, time_t time)> callbackHold;
36 std::function<void(
Widget &element,
const Event &event)> callbackRelease;
38 std::function<void(
Widget &element,
const Event &event)> callbackBlur;
79 virtual void draw()
const = 0;
89 virtual void render(
bool force)
const;
Extended definitions for widget event handler functions.
Definition event_handlers.hpp:97
void onclick(std::function< void(Widget &)> callback)
Register a touchscreen event handler that triggers on release.
Definition event_handlers.hpp:248
uint32_t id_t
A (typically unique) identifier for widgets.
Definition id.hpp:13
A struct that holds a widget's vertical and horizontal alignment.
Definition alignment.hpp:22
A struct that holds the pixel space that a widget would take up on the screen.
Definition bounds.hpp:11
A touchscreen event.
Definition event.hpp:26
A struct that holds the padding that a parent widget may impose on a child widget.
Definition padding.hpp:13
A struct that holds the normalized position of a widget.
Definition position.hpp:15
A struct that holds the number of pixels that a widget would take up on the screen.
Definition size.hpp:17