summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-10-17 14:10:15 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-10-17 14:10:38 +0200
commitf269367d41a72005b142c3d18cd053a7587a9284 (patch)
tree01e6c23160ac9e00776aebc2237bb72e10cf9074 /FL
parent37fbc63f5c14915bdcd623da840cd7e6153302c5 (diff)
Clarify the documentation of class Fl_Callback_User_Data
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Widget.H10
1 files 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
};