3#include "base_widget.hpp"
4#include <bugui/concepts/widget.hpp>
10template <
typename T,
bool can_delete = true>
15 void update()
override final;
41template <
typename T,
bool can_delete>
45 static_cast<T*
>(
this)->set();
48template <
typename T,
bool can_delete>
53 auto x_offset{this->parent->get_x() + this->get_x()};
54 auto y_offset{this->parent->get_y() + this->get_y()};
57 static_cast<const T*
>(
this)->paint(
painter);
62template <
typename T,
bool can_delete>
65 auto p_x{this->parent->get_x()};
66 auto p_y{this->parent->get_y()};
76 auto x{this->get_x()};
77 auto y{this->get_y()};
78 auto x_offset{x + p_x};
79 auto y_offset{y + p_y};
92 static_cast<T*
>(
this)->on_double_press(
presser);
100 this->parent->remove_held(
this);
101 static_cast<T*
>(
this)->on_drag(
presser);
109 this->parent->remove_held(
this);
110 static_cast<T*
>(
this)->on_drop(
presser);
117 : this->parent->remove_held(
this);
120 static_cast<T*
>(
this)->on_press(
presser);
Allows derived class to call a user defined on_Delete function.
Definition deleter.hpp:14
Adds 2D information on top of a base_painter. The painter is used in user defined paint funcions to d...
Definition painter.hpp:17
void ofset(int x, int y)
Increment current displacement values by the given coordinates.
Adds 2D information on top of a button_presser. Meant to traverse the entire widget tree,...
Definition presser.hpp:16
void ofset(int x, int y)
Displaces the underlying rectangle by the given arguments.