In FLTK when you create a widget you may assign a callback function to it. This event handler cannot be a non static class member. From what I read and understood there are three ways you can handle the events:
1- Let a static member do the job.
2- Let a static member call a non static member which does the job.
3- Create one static method which uses the user-data passed to it (callback second argument) as is called back to recognize which widget is the event source so it can call other methods to do the job respectively.
A combination of above methods can be used of course which make the matter more complex. I can write one static member to handle all button events and another one to handle window events.
Which method is better? What FLTK creators had in mind? FLTK documentation doesn't care to explain the matter. Is it really nice to create one static and one inline method for each event handler? is there an article to explain the matter?