From a9fd08ff5ab8bbf3838200ceace671a72627d212 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 23 Jun 2018 16:47:40 +0000 Subject: Doxygen: created Group to document drivers, disabled by default Uncomment `ENABLED_SECTIONS += DriverDev` in documentation/Doxyfile.in to enable driver documentation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx | 13 ++++++++++- src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H | 11 ++++++++++ src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx | 12 +++++++++++ src/drivers/PostScript/Fl_PostScript.cxx | 25 +++++++++++++++++++--- .../Quartz/Fl_Quartz_Copy_Surface_Driver.cxx | 11 ++++++++++ .../Quartz/Fl_Quartz_Image_Surface_Driver.cxx | 12 +++++++++++ 6 files changed, 80 insertions(+), 4 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx index b69e041e5..857057f70 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx @@ -36,7 +36,13 @@ extern void (*fl_unlock_function)(); int Fl_Cocoa_Screen_Driver::next_marked_length = 0; -/* +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + +/** Creates a driver that manages all screen and display related calls. This function must be implemented once for every platform. @@ -46,6 +52,11 @@ Fl_Screen_Driver *Fl_Screen_Driver::newScreenDriver() return new Fl_Cocoa_Screen_Driver(); } +/** + * @} + * @endcond + */ + static Fl_Text_Editor::Key_Binding extra_bindings[] = { // Define CMD+key accelerators... { 'z', FL_COMMAND, Fl_Text_Editor::kf_undo ,0}, diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H index d7162eff9..2f851c500 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H @@ -40,6 +40,12 @@ class NSCursor; class FLWindow; #endif // __OBJC__ +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /* Move everything here that manages the native window interface. @@ -60,6 +66,11 @@ struct Fl_Window_Driver::shape_data_type { CGImageRef mask; }; +/** + * @} + * @endcond + */ + class FL_EXPORT Fl_Cocoa_Window_Driver : public Fl_Window_Driver { diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx index d565ae20c..b9dcfcd99 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx @@ -27,11 +27,23 @@ #include #include +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + Fl_Window_Driver *Fl_Window_Driver::newWindowDriver(Fl_Window *w) { return new Fl_Cocoa_Window_Driver(w); } +/** + * @} + * @endcond + */ + + Fl_Cocoa_Window_Driver::Fl_Cocoa_Window_Driver(Fl_Window *win) : Fl_Window_Driver(win) diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx index ca2ea3085..c0c283422 100644 --- a/src/drivers/PostScript/Fl_PostScript.cxx +++ b/src/drivers/PostScript/Fl_PostScript.cxx @@ -29,6 +29,12 @@ const char *Fl_PostScript_File_Device::file_chooser_title = "Select a .ps file"; +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /** @brief The constructor. */ @@ -48,6 +54,12 @@ Fl_PostScript_Graphics_Driver::~Fl_PostScript_Graphics_Driver() { if(ps_filename_) free(ps_filename_); } +/** + * @} + * @endcond + */ + + Fl_PostScript_File_Device::Fl_PostScript_File_Device(void) { Fl_Surface_Device::driver( new Fl_PostScript_Graphics_Driver() ); @@ -107,6 +119,12 @@ Fl_PostScript_File_Device::~Fl_PostScript_File_Device() { if (ps) delete ps; } +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + int Fl_PostScript_Graphics_Driver::clocale_printf(const char *format, ...) { va_list args; @@ -116,8 +134,6 @@ int Fl_PostScript_Graphics_Driver::clocale_printf(const char *format, ...) return retval; } -#ifndef FL_DOXYGEN - // Prolog string static const char * prolog = @@ -1477,7 +1493,10 @@ void Fl_PostScript_File_Device::end_job (void) Fl_Display_Device::display_device()->set_current(); } -#endif // FL_DOXYGEN +/** + * @} + * @endcond + */ #endif // !defined(FL_NO_PRINT_SUPPORT) diff --git a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx index c3f386c3d..82e64299d 100644 --- a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx @@ -24,11 +24,22 @@ #include "Fl_Quartz_Graphics_Driver.H" #include "Fl_Quartz_Copy_Surface_Driver.H" +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + Fl_Copy_Surface_Driver *Fl_Copy_Surface_Driver::newCopySurfaceDriver(int w, int h) { return new Fl_Quartz_Copy_Surface_Driver(w, h); } +/** + * @} + * @endcond + */ + Fl_Quartz_Copy_Surface_Driver::Fl_Quartz_Copy_Surface_Driver(int w, int h) : Fl_Copy_Surface_Driver(w, h) { driver(new Fl_Quartz_Graphics_Driver); prepare_copy_pdf_and_tiff(w, h); diff --git a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx index b64e8347e..67912c144 100644 --- a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx @@ -40,11 +40,23 @@ public: }; +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + Fl_Image_Surface_Driver *Fl_Image_Surface_Driver::newImageSurfaceDriver(int w, int h, int high_res, Fl_Offscreen off) { return new Fl_Quartz_Image_Surface_Driver(w, h, high_res, off); } +/** + * @} + * @endcond + */ + + Fl_Quartz_Image_Surface_Driver::Fl_Quartz_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off) : Fl_Image_Surface_Driver(w, h, high_res, off) { int W = w, H = h; -- cgit v1.2.3