|
|
Problem:
When adding user_data in callbacks, it is difficult to make sure that the user_data is deleted when the widget is deleted, especially when deleting a group auto deletes all children.
Solution:
Add FL_WHEN_DELETING to Fl_Widget::when(), so before deleting a widget, the user can receive a callback and get a chance to clean up. The reason for the callback would be indicated by setting Fl::event() to FL_DELETING, which would also be sent to Fl_Widget::handle(int).
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/1d37d011-1554-4295-9fac-34b7379ba85bn%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |