3#include "base_widget.hpp"
4#include <bugui/concepts/widget.hpp>
11 , std::derived_from<base_widget> H
12 ,
bool can_delete =
true>
24 static_cast<T*
>(
this)->on_Delete();
28 H::parent->remove_widget(
this);
34template <
typename T, std::derived_from<base_w
idget> H>
45 static_cast<T*
>(
this)->on_Delete();
bool handle_Delete() override final
Calls on_Delete if defined.
Definition deleter.hpp:41
Allows derived class to call a user defined on_Delete function.
Definition deleter.hpp:14
bool handle_Delete() override final
Calls on_Delete if defined, otherwise simply deletes the widget.
Definition deleter.hpp:20