|
|
I think we need to seriously fix this misuse of virtual functions. As you note, this often requires it to compile code that will never be used, and may not compile on a given platform. The other problem is it pretty much links in *everything* to the vtab table so fltk ends up as a monolithic library. It also requires any differences to be split at the function level, rather than just putting #if around some statements which could greatly reduce the size of the differences.
Darwin is pretty much a Unix as well. I am unclear what exactly is in Nix and not in Posix. It seems to me that all this code can be put into Posix and then (if necessary) the Darwin one can override anything it needs to change.
Putting everything in Fl_Posix_System_Driver and having what is macOS-specific overriden by member functions of a derived class, Fl_Darwin_System_Driver is an interesting suggestion. I see two potential issues :
- the macOS libfltk would be slightly increased in size because it would contain 2 versions of the Fl_Darwin_System_Driver member functions; - could present or future Fl_Posix_System_Driver member functions not be supported by macOS ?
I'll look into that.
--
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/cf756acd-8dcb-465e-a874-a99eba1a9125n%40googlegroups.com.
--
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/CAL-8oAjFhOWk1D%3D%3DV_jDLaW7MrOddBASOwUmDipwtwkO0%2BZDuQ%40mail.gmail.com.
[ Direct Link to Message ] | |
|
| |