diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-06-23 16:47:40 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-06-23 16:47:40 +0000 |
| commit | a9fd08ff5ab8bbf3838200ceace671a72627d212 (patch) | |
| tree | b7821c8f82a8ab75c682d9175c24bfaaf2993501 | |
| parent | 8c993648dbb568e35271ad4c8bd346d7eb97e69b (diff) | |
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
41 files changed, 565 insertions, 71 deletions
diff --git a/FL/Fl_Copy_Surface.H b/FL/Fl_Copy_Surface.H index ffe24fe83..fbf710c4d 100644 --- a/FL/Fl_Copy_Surface.H +++ b/FL/Fl_Copy_Surface.H @@ -66,10 +66,19 @@ public: }; -/** A base class describing the interface between FLTK and draw-to-clipboard operations. - This class is only for internal use by the FLTK library. - A supported platform should implement the virtual methods of this class - in order to support drawing to the clipboard through class Fl_Copy_Surface. +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + +/** + * A base class describing the interface between FLTK and draw-to-clipboard operations. + * + * This class is only for internal use by the FLTK library. + * + * A supported platform should implement the virtual methods of this class + * in order to support drawing to the clipboard through class Fl_Copy_Surface. */ class Fl_Copy_Surface_Driver : public Fl_Widget_Surface { friend class Fl_Copy_Surface; @@ -90,6 +99,10 @@ protected: static Fl_Copy_Surface_Driver *newCopySurfaceDriver(int w, int h); }; +/** + * @} + * @endcond + */ #endif // Fl_Copy_Surface_H diff --git a/FL/Fl_Gl_Window_Driver.H b/FL/Fl_Gl_Window_Driver.H index 1b5d36bfd..ccad677b7 100644 --- a/FL/Fl_Gl_Window_Driver.H +++ b/FL/Fl_Gl_Window_Driver.H @@ -17,6 +17,12 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + #ifndef Fl_Gl_Window_Driver_H #define Fl_Gl_Window_Driver_H @@ -202,6 +208,11 @@ class Fl_X11_Gl_Window_Driver : public Fl_Gl_Window_Driver { #endif /* Fl_Gl_Window_Driver_H */ +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index 96aed31b5..f80934bce 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -17,6 +17,12 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /** \file Fl_Graphics_Driver.H \brief declaration of class Fl_Graphics_Driver. */ @@ -51,6 +57,7 @@ struct Fl_Fontdesc; #define FL_REGION_STACK_SIZE 10 #define FL_MATRIX_STACK_SIZE 32 + /** An abstract class subclassed for each graphics driver FLTK uses. Typically, FLTK applications do not use directly objects from this class. Rather, they perform @@ -58,14 +65,14 @@ struct Fl_Fontdesc; Drawing operations are functionally presented in \ref drawing and as function lists in the \ref fl_drawings and \ref fl_attributes modules. - \p <tt>Fl_Surface_Device::surface()->driver()</tt> + <tt>Fl_Surface_Device::surface()->driver()</tt> gives at any time the graphics driver used by all drawing operations. For compatibility with older FLTK versions, the \ref fl_graphics_driver global variable gives the same result. Its value changes when drawing operations are directed to another drawing surface by Fl_Surface_Device::push_current() / Fl_Surface_Device::pop_current() / Fl_Surface_Device::set_current(). - \p The Fl_Graphics_Driver class is of interest if one wants to perform new kinds of drawing operations. + The Fl_Graphics_Driver class is of interest if one wants to perform new kinds of drawing operations. An example would be to draw to an SVG file. This would require to create a new class, say SVG_Graphics_Driver, derived from class Fl_Graphics_Driver, and another new class, say SVG_Surface, derived from class Fl_Surface_Device. The new SVG_Graphics_Driver class should @@ -73,7 +80,7 @@ struct Fl_Fontdesc; and have them draw into SVG files. Alternatively, class SVG_Graphics_Driver could implement only some virtual methods, and only part of FLTK drawing functions would be usable when drawing to SVG files. - \p The Fl_Graphics_Driver class is essential for developers of the FLTK library. + The Fl_Graphics_Driver class is essential for developers of the FLTK library. Each platform supported by FLTK requires to create a derived class of Fl_Graphics_Driver that implements all its virtual member functions according to the platform. */ @@ -550,6 +557,11 @@ protected: #endif // FL_GRAPHICS_DRIVER_H +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H index e411822c9..69093ecf1 100644 --- a/FL/Fl_Image_Surface.H +++ b/FL/Fl_Image_Surface.H @@ -90,6 +90,12 @@ public: }; +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /** A base class describing the interface between FLTK and draw-to-image operations. This class is only for internal use by the FLTK library. A supported platform should implement the virtual methods of this class @@ -116,6 +122,11 @@ protected: static Fl_Image_Surface_Driver *newImageSurfaceDriver(int w, int h, int high_res, Fl_Offscreen off); }; +/** + * @} + * @endcond + */ + #endif // Fl_Image_Surface_H // diff --git a/FL/Fl_Native_File_Chooser.H b/FL/Fl_Native_File_Chooser.H index ec88a925f..22b5dd354 100644 --- a/FL/Fl_Native_File_Chooser.H +++ b/FL/Fl_Native_File_Chooser.H @@ -167,6 +167,12 @@ public: int show() ; }; +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /** Represents the interface between FLTK and a native file chooser. This class is only for internal use by the FLTK library. A platform that wants to provide a native file chooser implements all virtual methods @@ -258,6 +264,11 @@ public: virtual int show() ; }; +/** + * @} + * @endcond + */ + #endif /*FL_NATIVE_FILE_CHOOSER_H*/ diff --git a/FL/Fl_PostScript.H b/FL/Fl_PostScript.H index 2272c6316..de90bd225 100644 --- a/FL/Fl_PostScript.H +++ b/FL/Fl_PostScript.H @@ -33,6 +33,12 @@ extern "C" { } /** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + +/** \brief PostScript graphical backend. * PostScript text uses vectorial fonts when using the FLTK standard fonts @@ -75,7 +81,7 @@ public: #ifndef FL_DOXYGEN enum SHAPE{NONE=0, LINE, LOOP, POLYGON, POINTS}; -class Clip { + class Clip { public: int x, y, w, h; Clip *prev; @@ -226,6 +232,11 @@ class Clip { }; /** + * @} + * @endcond + */ + +/** To send graphical output to a PostScript file. This class is used exactly as the Fl_Printer class except for the begin_job() call, two variants of which are usable and allow to specify what page format and layout are desired. diff --git a/FL/Fl_Screen_Driver.H b/FL/Fl_Screen_Driver.H index ff9dfa32d..1af64cba7 100644 --- a/FL/Fl_Screen_Driver.H +++ b/FL/Fl_Screen_Driver.H @@ -16,6 +16,12 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + #ifndef FL_SCREEN_DRIVER_H #define FL_SCREEN_DRIVER_H @@ -40,10 +46,13 @@ class Fl_RGB_Image; class Fl_Group; class Fl_Input; -/** A base class describing the interface between FLTK and screen-related operations. -This class is only for internal use by the FLTK library. -Each supported platform implements several of the virtual methods of this class. -*/ +/** + * A base class describing the interface between FLTK and screen-related operations. + * + * This class is only for internal use by the FLTK library. + * + * Each supported platform implements several of the virtual methods of this class. + */ class FL_EXPORT Fl_Screen_Driver { protected: @@ -187,6 +196,11 @@ public: #endif // !FL_SCREEN_DRIVER_H +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H index 7a4cc18a7..9b5a04f7e 100644 --- a/FL/Fl_System_Driver.H +++ b/FL/Fl_System_Driver.H @@ -17,6 +17,12 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /** \file Fl_System_Driver.H \brief declaration of class Fl_System_Driver. */ @@ -232,6 +238,11 @@ public: #endif // FL_SYSTEM_DRIVER_H +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/FL/Fl_Window_Driver.H b/FL/Fl_Window_Driver.H index dac150186..056a4adab 100644 --- a/FL/Fl_Window_Driver.H +++ b/FL/Fl_Window_Driver.H @@ -17,6 +17,12 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /** \file Fl_Window_Driver.H \brief declaration of class Fl_Window_Driver. */ @@ -35,9 +41,14 @@ class Fl_Image; class Fl_RGB_Image; /** - \brief A base class for platform specific window handling code. - This class is only for internal use by the FLTK library. - Each supported platform implements several of the virtual methods of this class. + * \brief A base class for platform specific window handling code. + * + * This class is only for internal use by the FLTK library. + * + * When porting FLTK to a new platform, many mothods in this class provide + * a minimal default implementation. Some methods must be overridden to make + * sure that the Graphics Driver will draw into the bitmap associated with + * this window. */ class FL_EXPORT Fl_Window_Driver { @@ -186,6 +197,11 @@ public: #endif // FL_WINDOW_DRIVER_H +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/documentation/Doxyfile.in b/documentation/Doxyfile.in index 3faed9254..d5a7a7681 100644 --- a/documentation/Doxyfile.in +++ b/documentation/Doxyfile.in @@ -437,7 +437,8 @@ GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = +# ENABLED_SECTIONS += DriverDev # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in @@ -640,14 +641,7 @@ EXCLUDE_PATTERNS += */src/*_x.cxx # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test -EXCLUDE_SYMBOLS = Fl_System_Driver -EXCLUDE_SYMBOLS += Fl_Window_Driver -EXCLUDE_SYMBOLS += Fl_Gl_Window_Driver -EXCLUDE_SYMBOLS += Fl_Screen_Driver -EXCLUDE_SYMBOLS += Fl_Copy_Surface_Driver -EXCLUDE_SYMBOLS += Fl_Image_Surface_Driver -EXCLUDE_SYMBOLS += Fl_Native_File_Chooser_Driver -EXCLUDE_SYMBOLS += Fl_Native_File_Chooser_FLTK_Driver +EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see diff --git a/src/Fl_Copy_Surface.cxx b/src/Fl_Copy_Surface.cxx index 5d46e61d6..3f1ef2314 100644 --- a/src/Fl_Copy_Surface.cxx +++ b/src/Fl_Copy_Surface.cxx @@ -18,16 +18,6 @@ #include <FL/Fl_Copy_Surface.H> -#if defined(FL_PORTING) -# pragma message "FL_PORTING: optionally implement class Fl_XXX_Copy_Surface_Driver for your platform" - -Fl_Copy_Surface_Driver *Fl_Copy_Surface_Driver::newCopySurfaceDriver(int w, int h) -{ - return NULL; -} - -#endif - /** the constructor \param w, h Width and height of the drawing surface in FLTK units */ Fl_Copy_Surface::Fl_Copy_Surface(int w, int h) : Fl_Widget_Surface(NULL) { diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index c1707cd5e..56b0f2954 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -58,6 +58,12 @@ static void del_context(GLContext ctx) { static Fl_Gl_Choice *first; +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + // this assumes one of the two arguments is zero: // We keep the list system in Win32 to stay compatible and interpret // the list later... @@ -69,6 +75,10 @@ Fl_Gl_Choice *Fl_Gl_Window_Driver::find_begin(int m, const int *alistp) { return NULL; } +/** + * @} + * @endcond + */ static GLContext cached_context; static Fl_Window* cached_window; diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx index 161a51bb6..b24c1026e 100644 --- a/src/Fl_Gl_Overlay.cxx +++ b/src/Fl_Gl_Overlay.cxx @@ -34,11 +34,22 @@ int Fl_Gl_Window::can_do_overlay() { return pGlWindowDriver->can_do_overlay(); } +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + void Fl_Gl_Window_Driver::make_overlay(void *&o) { o = pWindow; } /** + * @} + * @endcond + */ + +/** Causes draw_overlay() to be called at a later time. Initially the overlay is clear. If you want the window to display something in the overlay when it first appears, you must call this diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 6d7479842..7819cc7e9 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -451,6 +451,12 @@ float Fl_Gl_Window::pixels_per_unit() { return pGlWindowDriver->pixels_per_unit(); } +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + // creates a unique, dummy Fl_Gl_Window_Driver object used when no Fl_Gl_Window is around // necessary to support gl_start()/gl_finish() Fl_Gl_Window_Driver *Fl_Gl_Window_Driver::global() { @@ -761,6 +767,11 @@ void Fl_X11_Gl_Window_Driver::waitGL() { #endif // FL_CFG_GFX_XLIB +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 96c072d15..1f0847714 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -16,6 +16,12 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + #include <FL/Fl.H> #include "config_lib.h" #include <FL/Fl_Graphics_Driver.H> @@ -326,8 +332,13 @@ Fl_Offscreen Fl_Graphics_Driver::get_offscreen_and_delete_image_surface(Fl_Image return off; } +/** + * @} + * @endcond + */ #ifndef FL_DOXYGEN + Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize Size) { next = 0; # if HAVE_GL @@ -580,7 +591,7 @@ void Fl_Scalable_Graphics_Driver::unscale_clip(Fl_Region r) { } } -#endif // !FL_DOXYGEN +#endif // // End of "$Id$". diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index 7fa4da631..fd24cd2cf 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -18,15 +18,6 @@ #include <FL/Fl_Image_Surface.H> -#if defined(FL_PORTING) -# pragma message "FL_PORTING: optionally implement class Fl_XXX_Image_Surface_Driver for your platform" -Fl_Image_Surface_Driver *Fl_Image_Surface_Driver::newImageSurfaceDriver(int w, int h, int high_res, Fl_Offscreen) -{ - return NULL; -} -#endif - - /** Constructor with optional high resolution. \param w and \param h set the size of the resulting image. The value of the \p high_res parameter controls whether \p w and \p h are interpreted as pixel or FLTK units. diff --git a/src/Fl_Native_File_Chooser.cxx b/src/Fl_Native_File_Chooser.cxx index 2d27528a3..8697a4e36 100644 --- a/src/Fl_Native_File_Chooser.cxx +++ b/src/Fl_Native_File_Chooser.cxx @@ -19,14 +19,6 @@ #include <FL/Fl_Native_File_Chooser.H> -#ifdef FL_PORTING -# pragma message "Implement a native file chooser (see Fl_Native_File_Chooser_Driver), or use FLTK's chooser, or don't use any chooser" -Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) { - //platform_fnfc = new Fl_Native_File_Chooser_FLTK_Driver(val); // do this to use FLTK's default file chooser - platform_fnfc = 0; // do this so class Fl_Native_File_Chooser does nothing -} -#endif - /** Localizable message */ const char *Fl_Native_File_Chooser::file_exists_message = "File exists. Are you sure you want to overwrite?"; @@ -248,6 +240,12 @@ int Fl_Native_File_Chooser::show() { return platform_fnfc ? platform_fnfc->show() : 1; } +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + // COPY A STRING WITH 'new' // Value can be NULL // @@ -298,6 +296,11 @@ void Fl_Native_File_Chooser_Driver::chrcat(char *s, char c) { strcat(s, tmp); } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/Fl_Native_File_Chooser_FLTK.cxx b/src/Fl_Native_File_Chooser_FLTK.cxx index 8dff9b45e..4041518ad 100644 --- a/src/Fl_Native_File_Chooser_FLTK.cxx +++ b/src/Fl_Native_File_Chooser_FLTK.cxx @@ -16,6 +16,12 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + #include <FL/Fl_Native_File_Chooser.H> #include <FL/Fl_File_Chooser.H> #include <FL/Fl_File_Icon.H> @@ -305,6 +311,11 @@ int Fl_Native_File_Chooser_FLTK_Driver::exist_dialog() { return fl_choice("%s", fl_cancel, fl_ok, NULL, Fl_Native_File_Chooser::file_exists_message); } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx index 4ec5e8671..8144dc239 100644 --- a/src/Fl_Screen_Driver.cxx +++ b/src/Fl_Screen_Driver.cxx @@ -16,6 +16,12 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + #include <FL/Fl_Screen_Driver.H> #include <FL/Fl_Image.H> #include <FL/Fl.H> @@ -488,6 +494,11 @@ int Fl_Screen_Driver::parse_color(const char* p, uchar& r, uchar& g, uchar& b) return 1; } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/Fl_System_Driver.cxx b/src/Fl_System_Driver.cxx index d5763cb01..cfeb20881 100644 --- a/src/Fl_System_Driver.cxx +++ b/src/Fl_System_Driver.cxx @@ -16,6 +16,11 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @defgroup DriverDeveloper Driver Developer Documentation + * @{ + */ #include <FL/Fl_System_Driver.H> #include <FL/Fl.H> @@ -489,6 +494,11 @@ void Fl_System_Driver::gettime(time_t *sec, int *usec) { *usec = 0; } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/Fl_Tree_Prefs.cxx b/src/Fl_Tree_Prefs.cxx index 060d46d4b..19519ff0d 100644 --- a/src/Fl_Tree_Prefs.cxx +++ b/src/Fl_Tree_Prefs.cxx @@ -87,6 +87,13 @@ int Fl_Darwin_System_Driver::tree_connector_style() { #endif // FL_CFG_WIN_COCOA + +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + const char * const Fl_System_Driver::tree_open_xpm[] = { "11 11 3 1", ". c #fefefe", @@ -124,6 +131,16 @@ const char * const Fl_System_Driver::tree_close_xpm[] = { }; +/** + * Return the address of a pixmap that show a plus in a box. + * + * This pixmap is used to indicate a brach of a tree that is closed and + * can be opened by clicking it. + * + * Other platforms may use other symbols which can be reimplemented in the + * driver. Notably, Apple Mac systems mark a closed branch with a triangle + * pointing to the right, and an open branch with a triangle pointing down. + */ Fl_Pixmap *Fl_System_Driver::tree_openpixmap() { static Fl_Pixmap *pixmap = new Fl_Pixmap(tree_open_xpm); return pixmap; @@ -138,6 +155,11 @@ int Fl_System_Driver::tree_connector_style() { return FL_TREE_CONNECTOR_DOTTED; } +/** + * @} + * @endcond + */ + /// Sets the default icon to be used as the 'open' icon /// when items are add()ed to the tree. diff --git a/src/Fl_Window_Driver.cxx b/src/Fl_Window_Driver.cxx index 45e9c4b03..72a84ff62 100644 --- a/src/Fl_Window_Driver.cxx +++ b/src/Fl_Window_Driver.cxx @@ -17,6 +17,11 @@ // http://www.fltk.org/str.php // +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ #include <FL/Fl_Window_Driver.H> #include <FL/Fl_Overlay_Window.H> @@ -26,6 +31,13 @@ extern void fl_throw_focus(Fl_Widget *o); + +/** + * Create a new Window Driver. + * + * This calls should be derived into a new class that manages desktop windows + * on the target platform. + */ Fl_Window_Driver::Fl_Window_Driver(Fl_Window *win) : pWindow(win) { @@ -64,14 +76,31 @@ void Fl_Window_Driver::flush_Fl_Window() { pWindow->Fl_Window::flush(); } void Fl_Window_Driver::flush_menu() { pWindow->Fl_Window::flush(); } +/** + * Draw the window content. + * A new driver can add code before or after drawing an individua window. + */ void Fl_Window_Driver::draw() { pWindow->draw(); } +/** + * Prepare this window for rendering. + * A new driver may prepare bitmaps and clipping areas for calls to the + * Graphics driver. + */ void Fl_Window_Driver::make_current() { } +/** + * Make the window visble and raise it to the top. + */ void Fl_Window_Driver::show() { } void Fl_Window_Driver::show_menu() { pWindow->Fl_Window::show(); } +/** + * Change the window title. + * A new drive should provide an interface to change the title of the window + * in the title bar. + */ void Fl_Window_Driver::label(const char *name, const char *mininame) {} void Fl_Window_Driver::take_focus() @@ -279,6 +308,11 @@ void Fl_Window_Driver::resize_after_scale_change(int ns, float old_f, float new_ is_a_rescale_ = false; } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index b23f2389e..ed22a7417 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -154,8 +154,26 @@ void fl_set_status(int x, int y, int w, int h) { } +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + +/** + * Set the default icon for the window decoration. + * + * @todo This method should probably be virtual and should be overriden for + * a give targte platform. This implementation however lives in Fl_Cocoa.m + * which is a Mac specific file. + */ void Fl_Window_Driver::default_icons(const Fl_RGB_Image *icons[], int count) {} +/** + * @} + * @endcond + */ + /* * Mac keyboard lookup table */ 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 <FL/Fl.H> #include <FL/platform.H> +/** + * @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 @@ -30,6 +30,12 @@ const char *Fl_PostScript_File_Device::file_chooser_title = "Select a .ps file"; /** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + +/** @brief The constructor. */ Fl_PostScript_Graphics_Driver::Fl_PostScript_Graphics_Driver(void) @@ -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; diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx index 1f1c7ddbe..a21e0ff1e 100644 --- a/src/filename_absolute.cxx +++ b/src/filename_absolute.cxx @@ -49,6 +49,12 @@ int fl_filename_absolute(char *to, int tolen, const char *from) { } +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + int Fl_System_Driver::filename_absolute(char *to, int tolen, const char *from) { if (isdirsep(*from) || *from == '|') { strlcpy(to, from, tolen); @@ -88,6 +94,12 @@ int Fl_System_Driver::filename_absolute(char *to, int tolen, const char *from) { return 1; } +/** + * @} + * @endcond + */ + + /** Makes a filename relative to the current working directory. \code #include <FL/filename.H> @@ -136,6 +148,13 @@ fl_filename_relative(char *to, // O - Relative filename return Fl::system_driver()->filename_relative(to, tolen, from, base); } + +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + int // O - 0 if no change, 1 if changed Fl_System_Driver::filename_relative(char *to, // O - Relative filename int tolen, // I - Size of "to" buffer @@ -207,6 +226,11 @@ Fl_System_Driver::filename_relative(char *to, // O - Relative filename return 1; } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/filename_ext.cxx b/src/filename_ext.cxx index f07e6797f..43f0a7962 100644 --- a/src/filename_ext.cxx +++ b/src/filename_ext.cxx @@ -34,6 +34,21 @@ const char *fl_filename_ext(const char *buf) { return Fl::system_driver()->filename_ext(buf); } + +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + +/** + * Default implementation to find a filename extension. + * + * The default implementation assumes that the last `.` character separates + * the extension form the basename of a file. + * + * @see fl_filename_ext(const char*) + */ const char *Fl_System_Driver::filename_ext(const char *buf) { const char *q = 0; const char *p = buf; @@ -44,6 +59,11 @@ const char *Fl_System_Driver::filename_ext(const char *buf) { return q ? q : p; } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/filename_isdir.cxx b/src/filename_isdir.cxx index 8364742da..0b5caa4e1 100644 --- a/src/filename_isdir.cxx +++ b/src/filename_isdir.cxx @@ -23,19 +23,6 @@ #include <FL/filename.H> #include <FL/Fl.H> -/* - * filename_isdir_quick() is a private function that checks for a - * trailing slash and assumes that the passed name is a directory if - * it finds one. This function is used by Fl_File_Browser and - * Fl_File_Chooser to avoid extra stat() calls, but is not supported - * outside of FLTK... - */ -int Fl_System_Driver::filename_isdir_quick(const char* n) { - // Do a quick optimization for filenames with a trailing slash... - if (*n && n[strlen(n) - 1] == '/') return 1; - return filename_isdir(n); -} - /** Determines if a file exists and is a directory from its filename. \code @@ -51,6 +38,27 @@ int fl_filename_isdir(const char* n) { return Fl::system_driver()->filename_isdir(n); } + +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + +/** + * filename_isdir_quick() is a private function that checks for a + * trailing slash and assumes that the passed name is a directory if + * it finds one. This function is used by Fl_File_Browser and + * Fl_File_Chooser to avoid extra stat() calls, but is not supported + * outside of FLTK... + */ +int Fl_System_Driver::filename_isdir_quick(const char* n) { + // Do a quick optimization for filenames with a trailing slash... + if (*n && n[strlen(n) - 1] == '/') return 1; + return filename_isdir(n); +} + + int Fl_System_Driver::filename_isdir(const char* n) { struct stat s; char fn[FL_PATH_MAX]; @@ -68,6 +76,11 @@ int Fl_System_Driver::filename_isdir(const char* n) { return !stat(n, &s) && (s.st_mode & S_IFDIR); } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/fl_arc.cxx b/src/fl_arc.cxx index 240e254de..82c40587c 100644 --- a/src/fl_arc.cxx +++ b/src/fl_arc.cxx @@ -34,7 +34,21 @@ static double _fl_hypot(double x, double y) { return sqrt(x*x + y*y); } -/** see fl_arc(double x, double y, double r, double start, double end) */ +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + +/** + * Draw an arc. + * + * The default implementation draws an arc using other calls into the graphics + * driver. There is no need to override the method unless the target platform + * supports drawing arcs directly. + * + * @see fl_arc(double x, double y, double r, double start, double end) + */ void Fl_Graphics_Driver::arc(double x, double y, double r, double start, double end) { // draw start point accurately: @@ -72,6 +86,11 @@ void Fl_Graphics_Driver::arc(double x, double y, double r, double start, double } } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/fl_curve.cxx b/src/fl_curve.cxx index ebe75a448..2781956bd 100644 --- a/src/fl_curve.cxx +++ b/src/fl_curve.cxx @@ -29,6 +29,12 @@ #include <FL/fl_draw.H> #include <math.h> +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /** see fl_curve() */ void Fl_Graphics_Driver::curve(double X0, double Y0, double X1, double Y1, @@ -97,6 +103,11 @@ void Fl_Graphics_Driver::curve(double X0, double Y0, fl_transformed_vertex(x3,y3); } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/fl_encoding_latin1.cxx b/src/fl_encoding_latin1.cxx index 10b899f92..dbb31ad7b 100644 --- a/src/fl_encoding_latin1.cxx +++ b/src/fl_encoding_latin1.cxx @@ -115,16 +115,45 @@ const char *Fl_Darwin_System_Driver::local_to_latin1(const char *t, int n) #endif +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + +/** + * Default implementation of latin-to-local text conversion. + * + * The default implementation returns the original text. This method should + * be reimplemented by drivers for platforms that commonly use latin + * text encoding. + * + * @see fl_latin1_to_local(const char *, int) + */ const char *Fl_System_Driver::latin1_to_local(const char *t, int) { return t; } +/** + * Default implementation of local-to-latin text conversion. + * + * The default implementation returns the original text. This method should + * be reimplemented by drivers for platforms that commonly use latin + * text encoding. + * + * @see fl_local_to_latin1(const char *, int) + */ const char *Fl_System_Driver::local_to_latin1(const char *t, int) { return t; } +/** + * @} + * @endcond + */ + const char *fl_latin1_to_local(const char *t, int n) { return Fl::system_driver()->latin1_to_local(t, n); @@ -135,7 +164,6 @@ const char *fl_local_to_latin1(const char *t, int n) return Fl::system_driver()->local_to_latin1(t, n); } - // // End of "$Id$". // diff --git a/src/fl_encoding_mac_roman.cxx b/src/fl_encoding_mac_roman.cxx index 2036fb4dd..50baaf557 100644 --- a/src/fl_encoding_mac_roman.cxx +++ b/src/fl_encoding_mac_roman.cxx @@ -76,6 +76,12 @@ static uchar roman2latin[128] = { static char *buf = 0; static int n_buf = 0; +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + const char *Fl_System_Driver::local_to_mac_roman(const char *t, int n) { if (n==-1) n = (int) strlen(t); @@ -118,6 +124,11 @@ const char *Fl_System_Driver::mac_roman_to_local(const char *t, int n) return buf; } +/** + * @} + * @endcond + */ + const char *fl_local_to_mac_roman(const char *t, int n) { return Fl::system_driver()->local_to_mac_roman(t, n); } diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx index 54155aca3..c76cdc9d0 100644 --- a/src/fl_rect.cxx +++ b/src/fl_rect.cxx @@ -33,6 +33,12 @@ // all driver code is now in drivers/XXX/Fl_XXX_Graphics_Driver_xyz.cxx // ----------------------------------------------------------------------------- +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /** see fl_restore_clip() */ void Fl_Graphics_Driver::restore_clip() { fl_clip_state_number++; @@ -52,6 +58,11 @@ Fl_Region Fl_Graphics_Driver::clip_region() { return rstack[rstackptr]; } +/** + * @} + * @endcond + */ + // // End of "$Id$". diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index 93c618257..7be566f14 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -372,6 +372,12 @@ int Fl_Widget::test_shortcut() { return test_shortcut(label()); } +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + const char *Fl_System_Driver::shortcut_add_key_name(unsigned key, char *p, char *buf, const char **eom) { if (key >= FL_F && key <= FL_F_Last) { @@ -410,6 +416,11 @@ const char *Fl_System_Driver::shortcut_add_key_name(unsigned key, char *p, char return buf; } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx index 848c30caa..5b775dfc5 100644 --- a/src/fl_vertex.cxx +++ b/src/fl_vertex.cxx @@ -37,6 +37,12 @@ #include <FL/math.h> #include <stdlib.h> +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + /** see fl_push_matrix() */ void Fl_Graphics_Driver::push_matrix() { if (sptr==matrix_stack_size) @@ -127,6 +133,11 @@ double Fl_Graphics_Driver::transform_dy(double x, double y) { return x*m.b + y*m.d; } +/** + * @} + * @endcond + */ + // // End of "$Id$". // diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index ebaa1d2e5..51920502a 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -458,6 +458,12 @@ void gl_texture_pile_height(int max) } +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + void Fl_Gl_Window_Driver::draw_string_legacy(const char* str, int n) { draw_string_legacy_glut(str, n); @@ -789,6 +795,11 @@ char *Fl_Cocoa_Gl_Window_Driver::alpha_mask_for_string(const char *str, int n, i #endif // FL_CFG_GFX_QUARTZ +/** + * @} + * @endcond + */ + #endif // HAVE_GL || defined(FL_DOXYGEN) // diff --git a/src/gl_start.cxx b/src/gl_start.cxx index c2f4727ee..31a817021 100644 --- a/src/gl_start.cxx +++ b/src/gl_start.cxx @@ -86,6 +86,12 @@ void gl_finish() { gl_start_scale = 1; } +/** + * @cond DriverDev + * @addtogroup DriverDeveloper + * @{ + */ + void Fl_Gl_Window_Driver::gl_visual(Fl_Gl_Choice *c) { gl_choice = c; } @@ -122,6 +128,11 @@ int Fl::gl_visual(int mode, int *alist) { return 1; } +/** + * @} + * @endcond + */ + #endif // HAVE_GL // |
