From f269367d41a72005b142c3d18cd053a7587a9284 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:10:15 +0200 Subject: [PATCH] Clarify the documentation of class Fl_Callback_User_Data --- FL/Fl_Widget.H | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index d10d42ef5..c0ede955b 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -78,8 +78,8 @@ struct FL_EXPORT Fl_Label { /** A class prototype that allows for additional data in callbacks. - Users can extend this class and pass it to widget callbacks. Widgets can - take ownership of the callback data, deleting the data when the widget + Users can derive this class and pass objects of such derived classes to widget callbacks. + Widgets can take ownership of the callback data, deleting the data when the widget itself is deleted. The destructor of this class is virtual, allowing for additional code to @@ -89,9 +89,11 @@ struct FL_EXPORT Fl_Label { \see Fl_Widget::callback(Fl_Callback*, Fl_Callback_User_Data*, bool) \see Fl_Widget::user_data(Fl_Callback_User_Data*, bool) */ -class Fl_Callback_User_Data { +class FL_EXPORT Fl_Callback_User_Data { +protected: + Fl_Callback_User_Data() {} ///< Protected constructor public: - virtual ~Fl_Callback_User_Data() { } + virtual ~Fl_Callback_User_Data() { } ///< Destructor };