On 16.03.2010, at 19:32, manolo gouy wrote: >> Would it make sense to automatically print all OpenGL = >> (sub)windows when printing a regular window? We can check at run-time if = >> OpenGL was linked and then call the appropriate function through = >> Fl_Plugin. I'll be happy to implement that. >> >> - Matthias= >> > > Please, go ahead. I'm curious to learn how that is possible.
OK, I just committed the changes. The same principle would work for Cairo rendering or any other non-core-OS drawing window. Fl_Gl_Printer is used by casting from Fl_Virtual_Printer, which is kind of dangerous. We should remove public access to Fl_Gl_Printer since it is only needed internally to access protected members of Fl_Printer. Adding a member variable to Fl_Gl_Printer would generate mysterious crashes!!!! Fl_Widget::as_window was defined "const" which is wrong (event though the function itself does not change any members of the class, it does return a non-const pointer, so the function itself can not be const either). Anyway, I hope my code is readable and gives a good example how "static plugins" are useful. - Matthias _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
