aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/render/RenderObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/render/RenderObject.h')
-rw-r--r--include/cru/ui/render/RenderObject.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/cru/ui/render/RenderObject.h b/include/cru/ui/render/RenderObject.h
index 4c19ad3e..c7e534a8 100644
--- a/include/cru/ui/render/RenderObject.h
+++ b/include/cru/ui/render/RenderObject.h
@@ -3,6 +3,7 @@
#include "MeasureRequirement.h"
+#include <cru/base/Event.h>
#include <cru/platform/graphics/Painter.h>
namespace cru::ui::render {
@@ -62,11 +63,8 @@ struct BoxConstraint {
class CRU_UI_API RenderObject : public Object {
CRU_DEFINE_CLASS_LOG_TAG("RenderObject")
- protected:
- RenderObject() = default;
-
public:
- ~RenderObject() override = default;
+ ~RenderObject() override;
controls::Control* GetAttachedControl() const { return control_; }
void SetAttachedControl(controls::Control* new_control);
@@ -145,6 +143,8 @@ class CRU_UI_API RenderObject : public Object {
virtual std::string GetName() const;
std::string GetDebugPathInTree() const;
+ CRU_DEFINE_EVENT(Destroy, RenderObject*)
+
protected:
// Size measure including margin and padding. Please reduce margin and padding
// or other custom things and pass the result content measure requirement and