FLTK logo

Re: [fltk/fltk] What about an `Fl_Object` common base class to be able to `dynamic_cast`? (Discussion #1595)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
[  All Forums  |  Back to fltk.discussions  ]
 
[ Previous Message ] [ New Message | Reply ] [ Next Message ]

Re: [fltk/fltk] What about an `Fl_Object` common base class to be able to `dynamic_cast`? (Discussion #1595) Matthias Melcher 18:17 Aug 31  
 

After sleeping over this, I think I misunderstood at first. You are looking for a base type for your callback data.

Well, I have great news for you: FLTK 1.4 offers Fl_Callback_User_Data as a virtual base calls for exactly that purpose. You can even tell Fl_Widget to call the destructor on the user data when Fl_Widget is destroyed.

https://www.fltk.org/doc-1.4/classFl__Widget.html#ad586942f590d256feae924b78f77a645

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/repo-discussions/1595/comments/18222429@github.com>

[ Direct Link to Message ]
 
     
[ Previous Message ] [ New Message | Reply ] [ Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.