Browse Source

Doxygen only: fixed all block comments starting with an asterisk to space-only, fixed doxygen keywords prepended with @ to use a backward slash instead. No code was changed.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
pull/1/head
Matthias Melcher 7 years ago
parent
commit
b8e97d7c28
  1. 22
      FL/Fl_Copy_Surface.H
  2. 10
      FL/Fl_Gl_Window_Driver.H
  3. 10
      FL/Fl_Graphics_Driver.H
  4. 10
      FL/Fl_Image_Surface.H
  5. 10
      FL/Fl_Native_File_Chooser.H
  6. 2
      FL/Fl_Paged_Device.H
  7. 12
      FL/Fl_PostScript.H
  8. 3
      FL/Fl_Printer.H
  9. 20
      FL/Fl_Screen_Driver.H
  10. 10
      FL/Fl_System_Driver.H
  11. 26
      FL/Fl_Window_Driver.H
  12. 10
      FL/android.H
  13. 1
      FL/filename.H
  14. 31
      FL/gl.h
  15. 4
      FL/mac.H
  16. 4
      fluid/Fl_Function_Type.cxx
  17. 2
      fluid/Fl_Group_Type.cxx
  18. 2
      fluid/Fl_Type.h
  19. 2
      fluid/Fl_Widget_Type.cxx
  20. 2
      fluid/Fl_Window_Type.cxx
  21. 6
      fluid/align_widget.cxx
  22. 22
      src/Fl.cxx
  23. 10
      src/Fl_Gl_Choice.cxx
  24. 10
      src/Fl_Gl_Window.cxx
  25. 10
      src/Fl_Graphics_Driver.cxx
  26. 10
      src/Fl_Native_File_Chooser.cxx
  27. 10
      src/Fl_Native_File_Chooser_FLTK.cxx
  28. 40
      src/Fl_Paged_Device.cxx
  29. 72
      src/Fl_Preferences.cxx
  30. 8
      src/Fl_Printer.cxx
  31. 10
      src/Fl_Screen_Driver.cxx
  32. 84
      src/Fl_Sys_Menu_Bar.cxx
  33. 28
      src/Fl_System_Driver.cxx
  34. 8
      src/Fl_Tree.cxx
  35. 26
      src/Fl_Tree_Prefs.cxx
  36. 40
      src/Fl_Widget_Surface.cxx
  37. 36
      src/Fl_Window_Driver.cxx
  38. 14
      src/Fl_win32.cxx
  39. 72
      src/drivers/Android/Fl_Android_Application.H
  40. 92
      src/drivers/Android/Fl_Android_Application.cxx
  41. 68
      src/drivers/Android/Fl_Android_Graphics_Clipping.H
  42. 222
      src/drivers/Android/Fl_Android_Graphics_Clipping.cxx
  43. 144
      src/drivers/Android/Fl_Android_Graphics_Driver.cxx
  44. 22
      src/drivers/Android/Fl_Android_Graphics_Font.H
  45. 210
      src/drivers/Android/Fl_Android_Graphics_Font.cxx
  46. 112
      src/drivers/Android/Fl_Android_Screen_Driver.cxx
  47. 8
      src/drivers/Android/Fl_Android_Window_Driver.cxx
  48. 10
      src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
  49. 10
      src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H
  50. 10
      src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx
  51. 2
      src/drivers/Pico/Fl_Pico_Graphics_Driver.H
  52. 2
      src/drivers/PicoAndroid/Fl_PicoAndroid_Graphics_Driver.H
  53. 4
      src/drivers/PicoAndroid/Fl_PicoAndroid_Graphics_Driver.cxx
  54. 10
      src/drivers/PicoAndroid/Fl_PicoAndroid_Screen_Driver.cxx
  55. 2
      src/drivers/PicoSDL/Fl_PicoSDL_Graphics_Driver.H
  56. 4
      src/drivers/PicoSDL/Fl_PicoSDL_Graphics_Driver.cxx
  57. 4
      src/drivers/PicoSDL/Fl_PicoSDL_System_Driver.cxx
  58. 22
      src/drivers/PostScript/Fl_PostScript.cxx
  59. 10
      src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
  60. 2
      src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H
  61. 28
      src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
  62. 10
      src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
  63. 2
      src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H
  64. 2
      src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx
  65. 20
      src/filename_absolute.cxx
  66. 22
      src/filename_ext.cxx
  67. 20
      src/filename_isdir.cxx
  68. 24
      src/fl_arc.cxx
  69. 4
      src/fl_color.cxx
  70. 10
      src/fl_curve.cxx
  71. 4
      src/fl_dnd_win32.cxx
  72. 38
      src/fl_encoding_latin1.cxx
  73. 10
      src/fl_encoding_mac_roman.cxx
  74. 2
      src/fl_images_core.cxx
  75. 74
      src/fl_open_uri.cxx
  76. 10
      src/fl_rect.cxx
  77. 10
      src/fl_shortcut.cxx
  78. 2
      src/fl_utf8.cxx
  79. 10
      src/fl_vertex.cxx
  80. 12
      src/gl_draw.cxx
  81. 10
      src/gl_start.cxx

22
FL/Fl_Copy_Surface.H

@ -67,18 +67,18 @@ public:
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** /**
* A base class describing the interface between FLTK and draw-to-clipboard operations. A base class describing the interface between FLTK and draw-to-clipboard operations.
*
* This class is only for internal use by the FLTK library. This class is only for internal use by the FLTK library.
*
* A supported platform should implement the virtual methods of this class A supported platform should implement the virtual methods of this class
* in order to support drawing to the clipboard through class Fl_Copy_Surface. in order to support drawing to the clipboard through class Fl_Copy_Surface.
*/ */
class Fl_Copy_Surface_Driver : public Fl_Widget_Surface { class Fl_Copy_Surface_Driver : public Fl_Widget_Surface {
friend class Fl_Copy_Surface; friend class Fl_Copy_Surface;
@ -100,8 +100,8 @@ protected:
}; };
/** /**
* @} \}
* @endcond \endcond
*/ */
#endif // Fl_Copy_Surface_H #endif // Fl_Copy_Surface_H

10
FL/Fl_Gl_Window_Driver.H

@ -18,9 +18,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
#ifndef Fl_Gl_Window_Driver_H #ifndef Fl_Gl_Window_Driver_H
@ -205,8 +205,8 @@ class Fl_X11_Gl_Window_Driver : public Fl_Gl_Window_Driver {
#endif /* Fl_Gl_Window_Driver_H */ #endif /* Fl_Gl_Window_Driver_H */
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

10
FL/Fl_Graphics_Driver.H

@ -18,9 +18,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** \file Fl_Graphics_Driver.H /** \file Fl_Graphics_Driver.H
@ -558,8 +558,8 @@ protected:
#endif // FL_GRAPHICS_DRIVER_H #endif // FL_GRAPHICS_DRIVER_H
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

10
FL/Fl_Image_Surface.H

@ -91,9 +91,9 @@ public:
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** A base class describing the interface between FLTK and draw-to-image operations. /** A base class describing the interface between FLTK and draw-to-image operations.
@ -123,8 +123,8 @@ protected:
}; };
/** /**
* @} \}
* @endcond \endcond
*/ */
#endif // Fl_Image_Surface_H #endif // Fl_Image_Surface_H

10
FL/Fl_Native_File_Chooser.H

@ -168,9 +168,9 @@ public:
}; };
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** Represents the interface between FLTK and a native file chooser. /** Represents the interface between FLTK and a native file chooser.
@ -265,8 +265,8 @@ public:
}; };
/** /**
* @} \}
* @endcond \endcond
*/ */

2
FL/Fl_Paged_Device.H

@ -31,7 +31,7 @@
/** /**
\brief Represents page-structured drawing surfaces. \brief Represents page-structured drawing surfaces.
*
This class has no public constructor: don't instantiate it; use Fl_Printer This class has no public constructor: don't instantiate it; use Fl_Printer
or Fl_PostScript_File_Device instead. or Fl_PostScript_File_Device instead.
*/ */

12
FL/Fl_PostScript.H

@ -33,14 +33,14 @@ extern "C" {
} }
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** /**
\brief PostScript graphical backend. \brief PostScript graphical backend.
*
PostScript text uses vectorial fonts when using the FLTK standard fonts PostScript text uses vectorial fonts when using the FLTK standard fonts
and the latin alphabet or a few other characters listed in the following table. and the latin alphabet or a few other characters listed in the following table.
The latin alphabet means all unicode characters between U+0020 and U+017F, or, in other words, The latin alphabet means all unicode characters between U+0020 and U+017F, or, in other words,
@ -232,8 +232,8 @@ public:
}; };
/** /**
* @} \}
* @endcond \endcond
*/ */
/** /**

3
FL/Fl_Printer.H

@ -26,8 +26,7 @@
#include <FL/Fl_Paged_Device.H> #include <FL/Fl_Paged_Device.H>
/** /**
* \brief OS-independent print support. \brief OS-independent print support.
*
Fl_Printer allows to use all drawing, color, text, image, and clip FLTK functions, and to have them operate Fl_Printer allows to use all drawing, color, text, image, and clip FLTK functions, and to have them operate
on printed page(s). There are two main, non exclusive, ways to use it. on printed page(s). There are two main, non exclusive, ways to use it.
<ul><li>Print any widget (standard, custom, Fl_Window, Fl_Gl_Window) as it appears <ul><li>Print any widget (standard, custom, Fl_Window, Fl_Gl_Window) as it appears

20
FL/Fl_Screen_Driver.H

@ -17,9 +17,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
#ifndef FL_SCREEN_DRIVER_H #ifndef FL_SCREEN_DRIVER_H
@ -47,11 +47,11 @@ class Fl_Group;
class Fl_Input; class Fl_Input;
/** /**
* A base class describing the interface between FLTK and screen-related operations. A base class describing the interface between FLTK and screen-related operations.
*
* This class is only for internal use by the FLTK library. This class is only for internal use by the FLTK library.
*
* Each supported platform implements several of the virtual methods of this class. Each supported platform implements several of the virtual methods of this class.
*/ */
class FL_EXPORT Fl_Screen_Driver { class FL_EXPORT Fl_Screen_Driver {
@ -194,8 +194,8 @@ public:
#endif // !FL_SCREEN_DRIVER_H #endif // !FL_SCREEN_DRIVER_H
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

10
FL/Fl_System_Driver.H

@ -18,9 +18,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** \file Fl_System_Driver.H /** \file Fl_System_Driver.H
@ -239,8 +239,8 @@ public:
#endif // FL_SYSTEM_DRIVER_H #endif // FL_SYSTEM_DRIVER_H
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

26
FL/Fl_Window_Driver.H

@ -18,9 +18,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** \file Fl_Window_Driver.H /** \file Fl_Window_Driver.H
@ -41,14 +41,14 @@ class Fl_Image;
class Fl_RGB_Image; class Fl_RGB_Image;
/** /**
* \brief A base class for platform specific window handling code. \brief A base class for platform specific window handling code.
*
* This class is only for internal use by the FLTK library. This class is only for internal use by the FLTK library.
*
* When porting FLTK to a new platform, many mothods in this class provide When porting FLTK to a new platform, many mothods in this class provide
* a minimal default implementation. Some methods must be overridden to make a minimal default implementation. Some methods must be overridden to make
* sure that the Graphics Driver will draw into the bitmap associated with sure that the Graphics Driver will draw into the bitmap associated with
* this window. this window.
*/ */
class FL_EXPORT Fl_Window_Driver class FL_EXPORT Fl_Window_Driver
{ {
@ -195,8 +195,8 @@ public:
#endif // FL_WINDOW_DRIVER_H #endif // FL_WINDOW_DRIVER_H
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

10
FL/android.H

@ -31,8 +31,8 @@ extern "C" {
#endif #endif
/* /*
* This is the function that application code must implement, representing This is the function that application code must implement, representing
* the main entry to the app. the main entry to the app.
*/ */
extern int main(int argc, char **argv); extern int main(int argc, char **argv);
@ -51,9 +51,9 @@ typedef void *Window; // used by fl_find(), fl_xid() and class Fl_X
extern void *fl_gc; extern void *fl_gc;
/** /**
* These events are specific to the Android OS driver system. They can These events are specific to the Android OS driver system. They can
* be read by adding a callback via Fl::add_system_handler() and reading Fl::event() be read by adding a callback via Fl::add_system_handler() and reading Fl::event()
* Don't change the order of these enums! See Fl_Android_Application.H . Don't change the order of these enums! See Fl_Android_Application.H .
*/ */
enum Fl_Android_Platform_Event enum Fl_Android_Platform_Event
{ {

1
FL/filename.H

@ -15,6 +15,7 @@
* *
* http://www.fltk.org/str.php * http://www.fltk.org/str.php
*/ */
/** \file /** \file
File names and URI utility functions. File names and URI utility functions.
*/ */

31
FL/gl.h

@ -23,21 +23,22 @@
// http://www.fltk.org/str.php // http://www.fltk.org/str.php
// //
/** \file gl.h /**
* This file defines wrapper functions for OpenGL in FLTK \file gl.h
* This file defines wrapper functions for OpenGL in FLTK
* To use OpenGL from within an FLTK application you MUST use gl_visual()
* to select the default visual before doing show() on any windows. Mesa To use OpenGL from within an FLTK application you MUST use gl_visual()
* will crash if you try to use a visual not returned by glxChooseVisual. to select the default visual before doing show() on any windows. Mesa
* will crash if you try to use a visual not returned by glxChooseVisual.
* Historically, this did not always work well with Fl_Double_Window's!
* It can try to draw into the front buffer. Historically, this did not always work well with Fl_Double_Window's!
* Depending on the system this might either It can try to draw into the front buffer.
* crash or do nothing (when pixmaps are being used as back buffer Depending on the system this might either
* and GL is being done by hardware), work correctly (when GL is done crash or do nothing (when pixmaps are being used as back buffer
* with software, such as Mesa), or draw into the front buffer and and GL is being done by hardware), work correctly (when GL is done
* be erased when the buffers are swapped (when double buffer hardware with software, such as Mesa), or draw into the front buffer and
* is being used) be erased when the buffers are swapped (when double buffer hardware
is being used)
*/ */
#ifndef FL_gl_H #ifndef FL_gl_H

4
FL/mac.H

@ -111,10 +111,10 @@ extern CGContextRef fl_gc;
/** \defgroup group_macosx Mac OS X-specific symbols /** \defgroup group_macosx Mac OS X-specific symbols
Mac OS X-specific symbols declared in <FL/platform.H> Mac OS X-specific symbols declared in <FL/platform.H>
\sa \ref osissues_macos \sa \ref osissues_macos
@{ */ \{ */
/** /**
* Attaches a callback to the "About myprog" item of the system application menu. Attaches a callback to the "About myprog" item of the system application menu.
For back-compatibility. For back-compatibility.
Equivalent to Fl_Sys_Menu_Bar::about(Fl_Callback *cb, void *user_data). Equivalent to Fl_Sys_Menu_Bar::about(Fl_Callback *cb, void *user_data).
*/ */

4
fluid/Fl_Function_Type.cxx

@ -1315,7 +1315,7 @@ const char* Fl_Type::class_name(const int need_nest) const {
} }
/** /**
* If this Type resides inside a class, this function returns the class type, or null. If this Type resides inside a class, this function returns the class type, or null.
*/ */
const Fl_Class_Type *Fl_Type::is_in_class() const { const Fl_Class_Type *Fl_Type::is_in_class() const {
Fl_Type* p = parent; Fl_Type* p = parent;
@ -1479,7 +1479,7 @@ void Fl_Class_Type::write_code2() {
} }
/** /**
* Return 1 if this class contains a function with the given signature. Return 1 if this class contains a function with the given signature.
*/ */
int Fl_Class_Type::has_function(const char *rtype, const char *sig) const { int Fl_Class_Type::has_function(const char *rtype, const char *sig) const {
Fl_Type *child; Fl_Type *child;

2
fluid/Fl_Group_Type.cxx

@ -379,7 +379,7 @@ void Fl_Group_Type::leave_live_mode() {
} }
/** /**
* copy all properties from the edit widget to the live widget copy all properties from the edit widget to the live widget
*/ */
void Fl_Group_Type::copy_properties() { void Fl_Group_Type::copy_properties() {
Fl_Widget_Type::copy_properties(); Fl_Widget_Type::copy_properties();

2
fluid/Fl_Type.h

@ -890,7 +890,7 @@ extern int include_H_from_C;
extern int use_FL_COMMAND; extern int use_FL_COMMAND;
/* /*
* This class is needed for additional command line plugins. This class is needed for additional command line plugins.
*/ */
class Fl_Commandline_Plugin : public Fl_Plugin { class Fl_Commandline_Plugin : public Fl_Plugin {
public: public:

2
fluid/Fl_Widget_Type.cxx

@ -2809,7 +2809,7 @@ void Fl_Widget_Type::leave_live_mode() {
} }
/** /**
* copy all properties from the edit widget to the live widget copy all properties from the edit widget to the live widget
*/ */
void Fl_Widget_Type::copy_properties() { void Fl_Widget_Type::copy_properties() {
if (!live_widget) if (!live_widget)

2
fluid/Fl_Window_Type.cxx

@ -1588,7 +1588,7 @@ void Fl_Window_Type::leave_live_mode() {
} }
/** /**
* copy all properties from the edit widget to the live widget copy all properties from the edit widget to the live widget
*/ */
void Fl_Window_Type::copy_properties() { void Fl_Window_Type::copy_properties() {
Fl_Widget_Type::copy_properties(); Fl_Widget_Type::copy_properties();

6
fluid/align_widget.cxx

@ -22,9 +22,9 @@
#include "undo.h" #include "undo.h"
/** /**
* the first behaviour always uses the first selected widget as a reference the first behaviour always uses the first selected widget as a reference
* the second behaviour uses the largest widget (most extreme positions) as the second behaviour uses the largest widget (most extreme positions) as
* a reference. a reference.
*/ */
#define BREAK_ON_FIRST break #define BREAK_ON_FIRST break
//#define BREAK_ON_FIRST //#define BREAK_ON_FIRST

22
src/Fl.cxx

@ -1948,16 +1948,16 @@ int Fl::dnd()
} }
/** /**
* Resets marked text. Resets marked text.
*
* In many languages, typing a character can involve multiple keystrokes. For In many languages, typing a character can involve multiple keystrokes. For
* example, the Ä can be composed of two dots (¨) on top of the example, the Ä can be composed of two dots (¨) on top of the
* character, followed by the letter A (on a Mac with U.S. keyboard, you'd character, followed by the letter A (on a Mac with U.S. keyboard, you'd
* type Alt-U, Shift-A. To inform the user that the dots may be followed by type Alt-U, Shift-A. To inform the user that the dots may be followed by
* another character, the ¨ is underlined). another character, the ¨ is underlined).
*
* Call this function if character composition needs to be aborted for some Call this function if character composition needs to be aborted for some
* reason. One such example would be the text input widget losing focus. reason. One such example would be the text input widget losing focus.
*/ */
void Fl::reset_marked_text() { void Fl::reset_marked_text() {
Fl::screen_driver()->reset_marked_text(); Fl::screen_driver()->reset_marked_text();
@ -2073,7 +2073,7 @@ FL_EXPORT Window fl_xid_(const Fl_Window *w) {
return temp ? temp->xid : 0; return temp ? temp->xid : 0;
} }
/** \addtogroup group_macosx /** \addtogroup group_macosx
@{ */ \{ */
/** Register a function called for each file dropped onto an application icon. /** Register a function called for each file dropped onto an application icon.

10
src/Fl_Gl_Choice.cxx

@ -59,9 +59,9 @@ static void del_context(GLContext ctx) {
static Fl_Gl_Choice *first; static Fl_Gl_Choice *first;
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
// this assumes one of the two arguments is zero: // this assumes one of the two arguments is zero:
@ -76,8 +76,8 @@ Fl_Gl_Choice *Fl_Gl_Window_Driver::find_begin(int m, const int *alistp) {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
static GLContext cached_context; static GLContext cached_context;

10
src/Fl_Gl_Window.cxx

@ -452,9 +452,9 @@ float Fl_Gl_Window::pixels_per_unit() {
} }
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
// creates a unique, dummy Fl_Gl_Window_Driver object used when no Fl_Gl_Window is around // creates a unique, dummy Fl_Gl_Window_Driver object used when no Fl_Gl_Window is around
@ -768,8 +768,8 @@ void Fl_X11_Gl_Window_Driver::waitGL() {
#endif // FL_CFG_GFX_XLIB #endif // FL_CFG_GFX_XLIB
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

10
src/Fl_Graphics_Driver.cxx

@ -17,9 +17,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
#include <FL/Fl.H> #include <FL/Fl.H>
@ -333,8 +333,8 @@ Fl_Offscreen Fl_Graphics_Driver::get_offscreen_and_delete_image_surface(Fl_Image
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
#ifndef FL_DOXYGEN #ifndef FL_DOXYGEN

10
src/Fl_Native_File_Chooser.cxx

@ -241,9 +241,9 @@ int Fl_Native_File_Chooser::show() {
} }
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
// COPY A STRING WITH 'new' // COPY A STRING WITH 'new'
@ -297,8 +297,8 @@ void Fl_Native_File_Chooser_Driver::chrcat(char *s, char c) {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

10
src/Fl_Native_File_Chooser_FLTK.cxx

@ -17,9 +17,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
#include <FL/Fl_Native_File_Chooser.H> #include <FL/Fl_Native_File_Chooser.H>
@ -312,8 +312,8 @@ int Fl_Native_File_Chooser_FLTK_Driver::exist_dialog() {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

40
src/Fl_Paged_Device.cxx

@ -26,69 +26,69 @@
/** /**
@brief Begins a print job. \brief Begins a print job.
@param[in] pagecount the total number of pages of the job (or 0 if you don't know the number of pages) \param[in] pagecount the total number of pages of the job (or 0 if you don't know the number of pages)
@param[out] frompage if non-null, *frompage is set to the first page the user wants printed \param[out] frompage if non-null, *frompage is set to the first page the user wants printed
@param[out] topage if non-null, *topage is set to the last page the user wants printed \param[out] topage if non-null, *topage is set to the last page the user wants printed
@return 0 if OK, non-zero if any error \return 0 if OK, non-zero if any error
*/ */
int Fl_Paged_Device::begin_job(int pagecount, int *frompage, int *topage) {return 1;} int Fl_Paged_Device::begin_job(int pagecount, int *frompage, int *topage) {return 1;}
/** /**
@brief Begins a new printed page \brief Begins a new printed page
The page coordinates are initially in points, i.e., 1/72 inch, The page coordinates are initially in points, i.e., 1/72 inch,
and with origin at the top left of the printable page area. and with origin at the top left of the printable page area.
@return 0 if OK, non-zero if any error \return 0 if OK, non-zero if any error
*/ */
int Fl_Paged_Device::begin_page (void) {return 1;} int Fl_Paged_Device::begin_page (void) {return 1;}
/** /**
@brief Computes the dimensions of margins that lie between the printable page area and \brief Computes the dimensions of margins that lie between the printable page area and
the full page. the full page.
Values are in the same unit as that used by FLTK drawing functions. They are changed Values are in the same unit as that used by FLTK drawing functions. They are changed
by scale() calls. by scale() calls.
@param[out] left If non-null, *left is set to the left margin size. \param[out] left If non-null, *left is set to the left margin size.
@param[out] top If non-null, *top is set to the top margin size. \param[out] top If non-null, *top is set to the top margin size.
@param[out] right If non-null, *right is set to the right margin size. \param[out] right If non-null, *right is set to the right margin size.
@param[out] bottom If non-null, *bottom is set to the bottom margin size. \param[out] bottom If non-null, *bottom is set to the bottom margin size.
*/ */
void Fl_Paged_Device::margins(int *left, int *top, int *right, int *bottom) {} void Fl_Paged_Device::margins(int *left, int *top, int *right, int *bottom) {}
/** /**
@brief Changes the scaling of page coordinates. \brief Changes the scaling of page coordinates.
This function also resets the origin of graphics functions at top left of printable page area. This function also resets the origin of graphics functions at top left of printable page area.
After a scale() call, do a printable_rect() call to get the new dimensions of the printable page area. After a scale() call, do a printable_rect() call to get the new dimensions of the printable page area.
Successive scale() calls don't combine their effects. Successive scale() calls don't combine their effects.
@param scale_x Horizontal dimensions of plot are multiplied by this quantity. \param scale_x Horizontal dimensions of plot are multiplied by this quantity.
@param scale_y Same as above, vertically. \param scale_y Same as above, vertically.
The value 0. is equivalent to setting \p scale_y = \p scale_x. Thus, scale(factor); The value 0. is equivalent to setting \p scale_y = \p scale_x. Thus, scale(factor);
is equivalent to scale(factor, factor); is equivalent to scale(factor, factor);
*/ */
void Fl_Paged_Device::scale (float scale_x, float scale_y) {} void Fl_Paged_Device::scale (float scale_x, float scale_y) {}
/** /**
@brief Rotates the graphics operations relatively to paper. \brief Rotates the graphics operations relatively to paper.
The rotation is centered on the current graphics origin. The rotation is centered on the current graphics origin.
Successive rotate() calls don't combine their effects. Successive rotate() calls don't combine their effects.
@param angle Rotation angle in counter-clockwise degrees. \param angle Rotation angle in counter-clockwise degrees.
*/ */
void Fl_Paged_Device::rotate(float angle) {} void Fl_Paged_Device::rotate(float angle) {}
/** /**
@brief To be called at the end of each page. \brief To be called at the end of each page.
@return 0 if OK, non-zero if any error. \return 0 if OK, non-zero if any error.
*/ */
int Fl_Paged_Device::end_page (void) {return 1;} int Fl_Paged_Device::end_page (void) {return 1;}
/** /**
@brief To be called at the end of a print job. \brief To be called at the end of a print job.
*/ */
void Fl_Paged_Device::end_job (void) {} void Fl_Paged_Device::end_job (void) {}

72
src/Fl_Preferences.cxx

@ -34,15 +34,15 @@ char Fl_Preferences::uuidBuffer[40];
Fl_Preferences *Fl_Preferences::runtimePrefs = 0; Fl_Preferences *Fl_Preferences::runtimePrefs = 0;
/** /**
* Returns a UUID as generated by the system. Returns a UUID as generated by the system.
*
* A UUID is a "universally unique identifier" which is commonly used in A UUID is a "universally unique identifier" which is commonly used in
* configuration files to create identities. A UUID in ASCII looks like this: configuration files to create identities. A UUID in ASCII looks like this:
* <tt>937C4900-51AA-4C11-8DD3-7AB59944F03E</tt>. It has always 36 bytes plus <tt>937C4900-51AA-4C11-8DD3-7AB59944F03E</tt>. It has always 36 bytes plus
* a trailing zero. a trailing zero.
*
* \return a pointer to a static buffer containing the new UUID in ASCII format. \return a pointer to a static buffer containing the new UUID in ASCII format.
* The buffer is overwritten during every call to this function! The buffer is overwritten during every call to this function!
*/ */
const char *Fl_Preferences::newUUID() { const char *Fl_Preferences::newUUID() {
Fl::system_driver()->newUUID(uuidBuffer); Fl::system_driver()->newUUID(uuidBuffer);
@ -1377,10 +1377,10 @@ void Fl_Preferences::Node::deleteIndex() {
} }
/** /**
* \brief Create a plugin. \brief Create a plugin.
*
* \param[in] klass plugins are grouped in classes \param[in] klass plugins are grouped in classes
* \param[in] name every plugin should have a unique name \param[in] name every plugin should have a unique name
*/ */
Fl_Plugin::Fl_Plugin(const char *klass, const char *name) Fl_Plugin::Fl_Plugin(const char *klass, const char *name)
: id(0) { : id(0) {
@ -1393,7 +1393,7 @@ Fl_Plugin::Fl_Plugin(const char *klass, const char *name)
} }
/** /**
* \brief Clear the plugin and remove it from the database. \brief Clear the plugin and remove it from the database.
*/ */
Fl_Plugin::~Fl_Plugin() { Fl_Plugin::~Fl_Plugin() {
#ifdef FL_PLUGIN_VERBOSE #ifdef FL_PLUGIN_VERBOSE
@ -1404,7 +1404,7 @@ Fl_Plugin::~Fl_Plugin() {
} }
/** /**
* \brief Manage all plugins belonging to one class. \brief Manage all plugins belonging to one class.
*/ */
Fl_Plugin_Manager::Fl_Plugin_Manager(const char *klass) Fl_Plugin_Manager::Fl_Plugin_Manager(const char *klass)
: Fl_Preferences(0, Fl_Preferences::Name("%s/%s", "plugins", klass)) { : Fl_Preferences(0, Fl_Preferences::Name("%s/%s", "plugins", klass)) {
@ -1414,10 +1414,10 @@ Fl_Plugin_Manager::Fl_Plugin_Manager(const char *klass)
} }
/** /**
* \brief Remove the plugin manager. \brief Remove the plugin manager.
*
* Calling this does not remove the database itself or any plugins. It just Calling this does not remove the database itself or any plugins. It just
* removes the reference to the database. removes the reference to the database.
*/ */
Fl_Plugin_Manager::~Fl_Plugin_Manager() { Fl_Plugin_Manager::~Fl_Plugin_Manager() {
#ifdef FL_PLUGIN_VERBOSE #ifdef FL_PLUGIN_VERBOSE
@ -1454,7 +1454,7 @@ static void p2a(void *vp, char *d) {
} }
/** /**
* \brief Return the address of a plugin by index. \brief Return the address of a plugin by index.
*/ */
Fl_Plugin *Fl_Plugin_Manager::plugin(int index) { Fl_Plugin *Fl_Plugin_Manager::plugin(int index) {
char buf[34]; char buf[34];
@ -1469,7 +1469,7 @@ Fl_Plugin *Fl_Plugin_Manager::plugin(int index) {
} }
/** /**
* \brief Return the address of a plugin by name. \brief Return the address of a plugin by name.
*/ */
Fl_Plugin *Fl_Plugin_Manager::plugin(const char *name) { Fl_Plugin *Fl_Plugin_Manager::plugin(const char *name) {
char buf[34]; char buf[34];
@ -1491,10 +1491,10 @@ Fl_Plugin *Fl_Plugin_Manager::plugin(const char *name) {
} }
/** /**
* \brief This function adds a new plugin to the database. \brief This function adds a new plugin to the database.
*
* There is no need to call this function explicitly. Every Fl_Plugin constructor There is no need to call this function explicitly. Every Fl_Plugin constructor
* will call this function at initialization time. will call this function at initialization time.
*/ */
Fl_Preferences::ID Fl_Plugin_Manager::addPlugin(const char *name, Fl_Plugin *plugin) { Fl_Preferences::ID Fl_Plugin_Manager::addPlugin(const char *name, Fl_Plugin *plugin) {
char buf[34]; char buf[34];
@ -1508,22 +1508,22 @@ Fl_Preferences::ID Fl_Plugin_Manager::addPlugin(const char *name, Fl_Plugin *plu
} }
/** /**
* \brief Remove any plugin. \brief Remove any plugin.
*
* There is no need to call this function explicitly. Every Fl_Plugin destructor There is no need to call this function explicitly. Every Fl_Plugin destructor
* will call this function at destruction time. will call this function at destruction time.
*/ */
void Fl_Plugin_Manager::removePlugin(Fl_Preferences::ID id) { void Fl_Plugin_Manager::removePlugin(Fl_Preferences::ID id) {
Fl_Preferences::remove(id); Fl_Preferences::remove(id);
} }
/** /**
* \brief Load a module from disk. \brief Load a module from disk.
*
* A module must be a dynamically linkable file for the given operating system. A module must be a dynamically linkable file for the given operating system.
* When loading a module, its +init function will be called which in turn calls When loading a module, its +init function will be called which in turn calls
* the constructor of all statically initialized Fl_Plugin classes and adds the constructor of all statically initialized Fl_Plugin classes and adds
* them to the database. them to the database.
*/ */
int Fl_Plugin_Manager::load(const char *filename) { int Fl_Plugin_Manager::load(const char *filename) {
// the functions below will automatically load plugins that are defined: // the functions below will automatically load plugins that are defined:
@ -1534,7 +1534,7 @@ int Fl_Plugin_Manager::load(const char *filename) {
} }
/** /**
* \brief Use this function to load a whole directory full of modules. \brief Use this function to load a whole directory full of modules.
*/ */
int Fl_Plugin_Manager::loadAll(const char *filepath, const char *pattern) { int Fl_Plugin_Manager::loadAll(const char *filepath, const char *pattern) {
struct dirent **dir; struct dirent **dir;

8
src/Fl_Printer.cxx

@ -139,10 +139,10 @@ Fl_Printer::Fl_Printer(void) {
printed. This range is returned to the caller that is in charge of sending only these pages printed. This range is returned to the caller that is in charge of sending only these pages
for printing. for printing.
@param[in] pagecount the total number of pages of the job (or 0 if you don't know the number of pages) \param[in] pagecount the total number of pages of the job (or 0 if you don't know the number of pages)
@param[out] frompage if non-null, *frompage is set to the first page the user wants printed \param[out] frompage if non-null, *frompage is set to the first page the user wants printed
@param[out] topage if non-null, *topage is set to the last page the user wants printed \param[out] topage if non-null, *topage is set to the last page the user wants printed
@return 0 if OK, non-zero if any error occurred or if the user cancelled the print request. \return 0 if OK, non-zero if any error occurred or if the user cancelled the print request.
*/ */
int Fl_Printer::begin_job(int pagecount, int *frompage, int *topage) int Fl_Printer::begin_job(int pagecount, int *frompage, int *topage)
{ {

10
src/Fl_Screen_Driver.cxx

@ -17,9 +17,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
#include <FL/Fl_Screen_Driver.H> #include <FL/Fl_Screen_Driver.H>
@ -495,8 +495,8 @@ int Fl_Screen_Driver::parse_color(const char* p, uchar& r, uchar& g, uchar& b)
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

84
src/Fl_Sys_Menu_Bar.cxx

@ -47,11 +47,11 @@ void Fl_Sys_Menu_Bar::update() {
} }
/** /**
* @brief create a system menu bar using the given list of menu structs \brief create a system menu bar using the given list of menu structs
*
* \author Matthias Melcher \author Matthias Melcher
*
* @param m Zero-ending list of Fl_Menu_Item's \param m Zero-ending list of Fl_Menu_Item's
*/ */
void Fl_Sys_Menu_Bar::menu(const Fl_Menu_Item *m) void Fl_Sys_Menu_Bar::menu(const Fl_Menu_Item *m)
{ {
@ -76,20 +76,20 @@ void Fl_Sys_Menu_Bar::mode (int i, int fl) {
} }
/** /**
* @brief Add a new menu item to the system menu bar. \brief Add a new menu item to the system menu bar.
*
* Add to the system menu bar a new menu item, with a title string, shortcut int, Add to the system menu bar a new menu item, with a title string, shortcut int,
* callback, argument to the callback, and flags. callback, argument to the callback, and flags.
*
* @param label - new menu item's label \param label - new menu item's label
* @param shortcut - new menu item's integer shortcut (can be 0 for none, or e.g. FL_ALT+'x') \param shortcut - new menu item's integer shortcut (can be 0 for none, or e.g. FL_ALT+'x')
* @param cb - callback to be invoked when item selected (can be 0 for none, in which case the menubar's callback() can be used instead) \param cb - callback to be invoked when item selected (can be 0 for none, in which case the menubar's callback() can be used instead)
* @param user_data - argument to the callback \param user_data - argument to the callback
* @param flags - item's flags, e.g. ::FL_MENU_TOGGLE, etc. \param flags - item's flags, e.g. ::FL_MENU_TOGGLE, etc.
*
* \returns the index into the menu() array, where the entry was added \returns the index into the menu() array, where the entry was added
*
* @see Fl_Menu_::add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags) \see Fl_Menu_::add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
*/ */
int Fl_Sys_Menu_Bar::add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags) int Fl_Sys_Menu_Bar::add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
{ {
@ -97,10 +97,10 @@ int Fl_Sys_Menu_Bar::add(const char* label, int shortcut, Fl_Callback *cb, void
} }
/** /**
* Forms-compatible procedure to add items to the system menu bar Forms-compatible procedure to add items to the system menu bar
*
* \returns the index into the menu() array, where the entry was added \returns the index into the menu() array, where the entry was added
* @see Fl_Menu_::add(const char* str) \see Fl_Menu_::add(const char* str)
*/ */
int Fl_Sys_Menu_Bar::add(const char* str) int Fl_Sys_Menu_Bar::add(const char* str)
{ {
@ -108,13 +108,13 @@ int Fl_Sys_Menu_Bar::add(const char* str)
} }
/** /**
* @brief insert in the system menu bar a new menu item \brief insert in the system menu bar a new menu item
*
* Insert in the system menu bar a new menu item, with a title string, shortcut int, Insert in the system menu bar a new menu item, with a title string, shortcut int,
* callback, argument to the callback, and flags. callback, argument to the callback, and flags.
*
* \returns the index into the menu() array, where the entry was inserted \returns the index into the menu() array, where the entry was inserted
* @see Fl_Menu_::insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags) \see Fl_Menu_::insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
*/ */
int Fl_Sys_Menu_Bar::insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags) int Fl_Sys_Menu_Bar::insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
{ {
@ -138,9 +138,9 @@ int Fl_Sys_Menu_Bar::clear_submenu(int index)
} }
/** /**
* @brief remove an item from the system menu bar \brief remove an item from the system menu bar
*
* @param index the index of the item to remove \param index the index of the item to remove
*/ */
void Fl_Sys_Menu_Bar::remove(int index) void Fl_Sys_Menu_Bar::remove(int index)
{ {
@ -148,10 +148,10 @@ void Fl_Sys_Menu_Bar::remove(int index)
} }
/** /**
* @brief rename an item from the system menu bar \brief rename an item from the system menu bar
*
* @param index the index of the item to rename \param index the index of the item to rename
* @param name the new item name as a UTF8 string \param name the new item name as a UTF8 string
*/ */
void Fl_Sys_Menu_Bar::replace(int index, const char *name) void Fl_Sys_Menu_Bar::replace(int index, const char *name)
{ {
@ -159,11 +159,11 @@ void Fl_Sys_Menu_Bar::replace(int index, const char *name)
} }
/** /**
* Attaches a callback to the "About myprog" item of the system application menu. Attaches a callback to the "About myprog" item of the system application menu.
* This cross-platform function is effective only under the MacOS platform. This cross-platform function is effective only under the MacOS platform.
* \param cb a callback that will be called by "About myprog" menu item \param cb a callback that will be called by "About myprog" menu item
* with NULL 1st argument. with NULL 1st argument.
* \param data a pointer transmitted as 2nd argument to the callback. \param data a pointer transmitted as 2nd argument to the callback.
*/ */
void Fl_Sys_Menu_Bar::about(Fl_Callback *cb, void *data) { void Fl_Sys_Menu_Bar::about(Fl_Callback *cb, void *data) {
driver()->about(cb, data); driver()->about(cb, data);

28
src/Fl_System_Driver.cxx

@ -17,9 +17,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @defgroup DriverDeveloper Driver Developer Documentation \defgroup DriverDeveloper Driver Developer Documentation
* @{ \{
*/ */
#include <FL/Fl_System_Driver.H> #include <FL/Fl_System_Driver.H>
@ -153,15 +153,15 @@ void Fl_System_Driver::fatal(const char *format, va_list args) {
*/ */
/* /*
* XParseGeometry parses strings of the form XParseGeometry parses strings of the form
* "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
* width, height, xoffset, and yoffset are unsigned integers. width, height, xoffset, and yoffset are unsigned integers.
* Example: "=80x24+300-49" Example: "=80x24+300-49"
* The equal sign is optional. The equal sign is optional.
* It returns a bitmask that indicates which of the four values It returns a bitmask that indicates which of the four values
* were actually found in the string. For each value found, were actually found in the string. For each value found,
* the corresponding argument is updated; for each value the corresponding argument is updated; for each value
* not found, the corresponding argument is left unchanged. not found, the corresponding argument is left unchanged.
*/ */
static int ReadInteger(char* string, char** NextString) static int ReadInteger(char* string, char** NextString)
@ -495,8 +495,8 @@ void Fl_System_Driver::gettime(time_t *sec, int *usec) {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

8
src/Fl_Tree.cxx

@ -2570,10 +2570,10 @@ Fl_Tree_Reason Fl_Tree::callback_reason() const {
} }
/** /**
* Read a preferences database into the tree widget. Read a preferences database into the tree widget.
* A preferences database is a hierarchical collection of data which can be A preferences database is a hierarchical collection of data which can be
* directly loaded into the tree view for inspection. directly loaded into the tree view for inspection.
* \param[in] prefs the Fl_Preferences database \param[in] prefs the Fl_Preferences database
*/ */
void Fl_Tree::load(Fl_Preferences &prefs) { void Fl_Tree::load(Fl_Preferences &prefs) {
int i, j, n, pn = (int) strlen(prefs.path()); int i, j, n, pn = (int) strlen(prefs.path());

26
src/Fl_Tree_Prefs.cxx

@ -89,9 +89,9 @@ int Fl_Darwin_System_Driver::tree_connector_style() {
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
const char * const Fl_System_Driver::tree_open_xpm[] = { const char * const Fl_System_Driver::tree_open_xpm[] = {
@ -132,14 +132,14 @@ const char * const Fl_System_Driver::tree_close_xpm[] = {
/** /**
* Return the address of a pixmap that show a plus in a box. 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 This pixmap is used to indicate a brach of a tree that is closed and
* can be opened by clicking it. can be opened by clicking it.
*
* Other platforms may use other symbols which can be reimplemented in the Other platforms may use other symbols which can be reimplemented in the
* driver. Notably, Apple Mac systems mark a closed branch with a triangle 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. pointing to the right, and an open branch with a triangle pointing down.
*/ */
Fl_Pixmap *Fl_System_Driver::tree_openpixmap() { Fl_Pixmap *Fl_System_Driver::tree_openpixmap() {
static Fl_Pixmap *pixmap = new Fl_Pixmap(tree_open_xpm); static Fl_Pixmap *pixmap = new Fl_Pixmap(tree_open_xpm);
@ -156,8 +156,8 @@ int Fl_System_Driver::tree_connector_style() {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */

40
src/Fl_Widget_Surface.cxx

@ -33,15 +33,15 @@ Fl_Widget_Surface::Fl_Widget_Surface(Fl_Graphics_Driver *d) : Fl_Surface_Device(
} }
/** /**
@brief Draws the widget on the drawing surface. \brief Draws the widget on the drawing surface.
*
The widget's position on the surface is determined by the last call to origin() The widget's position on the surface is determined by the last call to origin()
and by the optional delta_x and delta_y arguments. and by the optional delta_x and delta_y arguments.
Its dimensions are in points unless there was a previous call to scale(). Its dimensions are in points unless there was a previous call to scale().
@param[in] widget Any FLTK widget (e.g., standard, custom, window). \param[in] widget Any FLTK widget (e.g., standard, custom, window).
@param[in] delta_x Optional horizontal offset for positioning the widget relatively \param[in] delta_x Optional horizontal offset for positioning the widget relatively
to the current origin of graphics functions. to the current origin of graphics functions.
@param[in] delta_y Same as above, vertically. \param[in] delta_y Same as above, vertically.
*/ */
void Fl_Widget_Surface::draw(Fl_Widget* widget, int delta_x, int delta_y) void Fl_Widget_Surface::draw(Fl_Widget* widget, int delta_x, int delta_y)
{ {
@ -111,10 +111,10 @@ void Fl_Widget_Surface::translate(int x, int y)
} }
/** /**
@brief Computes the page coordinates of the current origin of graphics functions. \brief Computes the page coordinates of the current origin of graphics functions.
*
@param[out] x If non-null, *x is set to the horizontal page offset of graphics origin. \param[out] x If non-null, *x is set to the horizontal page offset of graphics origin.
@param[out] y Same as above, vertically. \param[out] y Same as above, vertically.
*/ */
void Fl_Widget_Surface::origin(int *x, int *y) void Fl_Widget_Surface::origin(int *x, int *y)
{ {
@ -123,15 +123,15 @@ void Fl_Widget_Surface::origin(int *x, int *y)
} }
/** /**
@brief Sets the position in page coordinates of the origin of graphics functions. \brief Sets the position in page coordinates of the origin of graphics functions.
Arguments should be expressed relatively to the result of a previous printable_rect() call. Arguments should be expressed relatively to the result of a previous printable_rect() call.
That is, <tt>printable_rect(&w, &h); origin(w/2, 0);</tt> sets the graphics origin at the That is, <tt>printable_rect(&w, &h); origin(w/2, 0);</tt> sets the graphics origin at the
top center of the page printable area. top center of the page printable area.
Origin() calls are not affected by rotate() calls. Origin() calls are not affected by rotate() calls.
Successive origin() calls don't combine their effects. Successive origin() calls don't combine their effects.
@param[in] x Horizontal position in page coordinates of the desired origin of graphics functions. \param[in] x Horizontal position in page coordinates of the desired origin of graphics functions.
@param[in] y Same as above, vertically. \param[in] y Same as above, vertically.
*/ */
void Fl_Widget_Surface::origin(int x, int y) { void Fl_Widget_Surface::origin(int x, int y) {
x_offset = x; x_offset = x;
@ -141,13 +141,13 @@ void Fl_Widget_Surface::origin(int x, int y) {
/** /**
Draws a rectangular part of an on-screen window. Draws a rectangular part of an on-screen window.
@param win The window from where to capture. Can be an Fl_Gl_Window. Sub-windows that intersect the rectangle are also captured. \param win The window from where to capture. Can be an Fl_Gl_Window. Sub-windows that intersect the rectangle are also captured.
@param x The rectangle left \param x The rectangle left
@param y The rectangle top \param y The rectangle top
@param w The rectangle width \param w The rectangle width
@param h The rectangle height \param h The rectangle height
@param delta_x Optional horizontal offset from current graphics origin where to print the captured rectangle. \param delta_x Optional horizontal offset from current graphics origin where to print the captured rectangle.
@param delta_y As above, vertically. \param delta_y As above, vertically.
*/ */
void Fl_Widget_Surface::print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y) void Fl_Widget_Surface::print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y)
{ {
@ -172,7 +172,7 @@ void Fl_Widget_Surface::print_window_part(Fl_Window *win, int x, int y, int w, i
Values are in the same unit as that used by FLTK drawing functions and are unchanged by calls to origin(). Values are in the same unit as that used by FLTK drawing functions and are unchanged by calls to origin().
If the object is derived from class Fl_Paged_Device, values account for the user-selected paper type and print orientation If the object is derived from class Fl_Paged_Device, values account for the user-selected paper type and print orientation
and are changed by scale() calls. and are changed by scale() calls.
@return 0 if OK, non-zero if any error \return 0 if OK, non-zero if any error
*/ */
int Fl_Widget_Surface::printable_rect(int *w, int *h) {return 1;} int Fl_Widget_Surface::printable_rect(int *w, int *h) {return 1;}

36
src/Fl_Window_Driver.cxx

@ -18,9 +18,9 @@
// //
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
#include <FL/Fl_Window_Driver.H> #include <FL/Fl_Window_Driver.H>
@ -33,10 +33,10 @@ extern void fl_throw_focus(Fl_Widget *o);
/** /**
* Create a new Window Driver. Create a new Window Driver.
*
* This calls should be derived into a new class that manages desktop windows This calls should be derived into a new class that manages desktop windows
* on the target platform. on the target platform.
*/ */
Fl_Window_Driver::Fl_Window_Driver(Fl_Window *win) : Fl_Window_Driver::Fl_Window_Driver(Fl_Window *win) :
pWindow(win) pWindow(win)
@ -77,29 +77,29 @@ void Fl_Window_Driver::flush_Fl_Window() { pWindow->Fl_Window::flush(); }
void Fl_Window_Driver::flush_menu() { pWindow->Fl_Window::flush(); } void Fl_Window_Driver::flush_menu() { pWindow->Fl_Window::flush(); }
/** /**
* Draw the window content. Draw the window content.
* A new driver can add code before or after drawing an individua window. A new driver can add code before or after drawing an individua window.
*/ */
void Fl_Window_Driver::draw() { pWindow->draw(); } void Fl_Window_Driver::draw() { pWindow->draw(); }
/** /**
* Prepare this window for rendering. Prepare this window for rendering.
* A new driver may prepare bitmaps and clipping areas for calls to the A new driver may prepare bitmaps and clipping areas for calls to the
* Graphics driver. Graphics driver.
*/ */
void Fl_Window_Driver::make_current() { } void Fl_Window_Driver::make_current() { }
/** /**
* Make the window visble and raise it to the top. Make the window visble and raise it to the top.
*/ */
void Fl_Window_Driver::show() { } void Fl_Window_Driver::show() { }
void Fl_Window_Driver::show_menu() { pWindow->Fl_Window::show(); } void Fl_Window_Driver::show_menu() { pWindow->Fl_Window::show(); }
/** /**
* Change the window title. Change the window title.
* A new drive should provide an interface to change the title of the window A new drive should provide an interface to change the title of the window
* in the title bar. in the title bar.
*/ */
void Fl_Window_Driver::label(const char *name, const char *mininame) {} void Fl_Window_Driver::label(const char *name, const char *mininame) {}
@ -309,8 +309,8 @@ void Fl_Window_Driver::resize_after_scale_change(int ns, float old_f, float new_
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

14
src/Fl_win32.cxx

@ -177,10 +177,10 @@ static int get_wsock_mod() {
#endif // dynamic/static linking of ws2_32.dll (see above and STR #3454) #endif // dynamic/static linking of ws2_32.dll (see above and STR #3454)
/* /*
* Dynamic linking of imm32.dll Dynamic linking of imm32.dll
* This library is only needed for a hand full (four ATM) functions relating to This library is only needed for a hand full (four ATM) functions relating to
* international text rendering and locales. Dynamically loading reduces initial international text rendering and locales. Dynamically loading reduces initial
* size and link dependencies. size and link dependencies.
*/ */
static HMODULE s_imm_module = 0; static HMODULE s_imm_module = 0;
typedef BOOL(WINAPI *flTypeImmAssociateContextEx)(HWND, HIMC, DWORD); typedef BOOL(WINAPI *flTypeImmAssociateContextEx)(HWND, HIMC, DWORD);
@ -1862,9 +1862,9 @@ void Fl_WinAPI_Window_Driver::resize(int X, int Y, int W, int H) {
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
/* /*
* This silly little class remembers the name of all window classes This silly little class remembers the name of all window classes
* we register to avoid double registration. It has the added bonus we register to avoid double registration. It has the added bonus
* of freeing everything on application close as well. of freeing everything on application close as well.
*/ */
class NameList { class NameList {
public: public:

72
src/drivers/Android/Fl_Android_Application.H

@ -41,7 +41,7 @@ extern void (*fl_lock_function)();
/** /**
* A class to make Java calls from C++ easier. A class to make Java calls from C++ easier.
*/ */
class Fl_Android_Java class Fl_Android_Java
{ {
@ -63,41 +63,41 @@ public:
/** /**
* Static class that manages all interaction between the Android Native Activity Static class that manages all interaction between the Android Native Activity
* and the FLTK library. It also keeps often used data for global access. and the FLTK library. It also keeps often used data for global access.
*
* On launch, it creates a main thread and communication pipe to On launch, it creates a main thread and communication pipe to
* the Activity. All FLTK code will run in that thread. Activity the Activity. All FLTK code will run in that thread. Activity
* events will be polled by the Screen driver using the provided events will be polled by the Screen driver using the provided
* Android Looper, and will also be routed back to this class as needed. Android Looper, and will also be routed back to this class as needed.
*
* This code is based on the native activity interface This code is based on the native activity interface
* provided by <android/native_activity.h>. It is based on a set provided by <android/native_activity.h>. It is based on a set
* of application-provided callbacks that will be called of application-provided callbacks that will be called
* by the Activity's main thread when certain events occur. by the Activity's main thread when certain events occur.
*
* 1/ The application must provide a function named "int main(argc, argv)" that 1/ The application must provide a function named "int main(argc, argv)" that
* will be called when the activity is created, in a new thread that is will be called when the activity is created, in a new thread that is
* distinct from the activity's main thread. distinct from the activity's main thread.
*
* 2/ The application has access to a static "Fl_Android_Application" class 2/ The application has access to a static "Fl_Android_Application" class
* that contains references to other important objects, e.g. the that contains references to other important objects, e.g. the
* ANativeActivity object instance the application is running in. ANativeActivity object instance the application is running in.
*
* 3/ the "Fl_Android_Application" class holds an ALooper instance that already 3/ the "Fl_Android_Application" class holds an ALooper instance that already
* listens to two important things: listens to two important things:
*
* - activity lifecycle events (e.g. "pause", "resume"). See APP_CMD_XXX - activity lifecycle events (e.g. "pause", "resume"). See APP_CMD_XXX
* declarations below. declarations below.
*
* - input events coming from the AInputQueue attached to the activity. - input events coming from the AInputQueue attached to the activity.
*
* Each of these correspond to an ALooper identifier returned by Each of these correspond to an ALooper identifier returned by
* ALooper_pollOnce with values of LOOPER_ID_MAIN and LOOPER_ID_INPUT, ALooper_pollOnce with values of LOOPER_ID_MAIN and LOOPER_ID_INPUT,
* respectively. respectively.
*
* FLTK will add more items to the looper for timers and file and socket FLTK will add more items to the looper for timers and file and socket
* communication. (fl_add_timeout, Fl::add_fd(), ... communication. (fl_add_timeout, Fl::add_fd(), ...
*/ */
class Fl_Android_Application class Fl_Android_Application
{ {

92
src/drivers/Android/Fl_Android_Application.cxx

@ -152,8 +152,8 @@ void Fl_Android_Application::free_saved_state()
} }
/** /**
* Call when ALooper_pollAll() returns LOOPER_ID_MAIN, reading the next Call when ALooper_pollAll() returns LOOPER_ID_MAIN, reading the next
* app command message. app command message.
*/ */
int8_t Fl_Android_Application::read_cmd() int8_t Fl_Android_Application::read_cmd()
{ {
@ -201,9 +201,9 @@ void Fl_Android_Application::print_cur_config()
} }
/** /**
* Call with the command returned by android_app_read_cmd() to do the Call with the command returned by android_app_read_cmd() to do the
* initial pre-processing of the given command. You can perform your own initial pre-processing of the given command. You can perform your own
* actions for the command after calling this function. actions for the command after calling this function.
*/ */
void Fl_Android_Application::pre_exec_cmd(int8_t cmd) void Fl_Android_Application::pre_exec_cmd(int8_t cmd)
{ {
@ -275,9 +275,9 @@ void Fl_Android_Application::pre_exec_cmd(int8_t cmd)
} }
/** /**
* Call with the command returned by read_cmd() to do the Call with the command returned by read_cmd() to do the
* final post-processing of the given command. You must have done your own final post-processing of the given command. You must have done your own
* actions for the command before calling this function. actions for the command before calling this function.
*/ */
void Fl_Android_Application::post_exec_cmd(int8_t cmd) void Fl_Android_Application::post_exec_cmd(int8_t cmd)
{ {
@ -384,10 +384,10 @@ void *Fl_Android_Application::thread_entry(void* param)
} }
/** /**
* Allocate memory for our internal screen buffer. Allocate memory for our internal screen buffer.
*
* FIXME: everything is currently hardcoded to an 600x800 resolution FIXME: everything is currently hardcoded to an 600x800 resolution
* TODO: react to screen changes TODO: react to screen changes
*/ */
void Fl_Android_Application::allocate_screen() void Fl_Android_Application::allocate_screen()
{ {
@ -442,12 +442,12 @@ bool Fl_Android_Application::copy_screen()
} }
/** /**
* Take ownership of screen memory for gaining write access. Take ownership of screen memory for gaining write access.
*
* If the screen is already locked, it will not be locked again If the screen is already locked, it will not be locked again
* and a value of true will be returned. and a value of true will be returned.
*
* @return true if we gaines access, false if no access was granted and screen memory must not be writte to \return true if we gaines access, false if no access was granted and screen memory must not be writte to
*/ */
bool Fl_Android_Application::lock_screen() bool Fl_Android_Application::lock_screen()
{ {
@ -467,10 +467,10 @@ bool Fl_Android_Application::lock_screen()
} }
/** /**
* Release screen memory ownership and give it back to the system. Release screen memory ownership and give it back to the system.
*
* The memory content will be copied to the physical screen next. The memory content will be copied to the physical screen next.
* If the screen is not locked, this call will have no effect. If the screen is not locked, this call will have no effect.
*/ */
void Fl_Android_Application::unlock_and_post_screen() void Fl_Android_Application::unlock_and_post_screen()
{ {
@ -482,8 +482,8 @@ void Fl_Android_Application::unlock_and_post_screen()
} }
/** /**
* Is the screen currently locked? Is the screen currently locked?
* @return true if it is locked and the app has write access. \return true if it is locked and the app has write access.
*/ */
bool Fl_Android_Application::screen_is_locked() bool Fl_Android_Application::screen_is_locked()
{ {
@ -563,7 +563,7 @@ void Fl_Android_Activity::close_activity()
// ---- Android Native Activity callbacks ---- // ---- Android Native Activity callbacks ----
/** /**
* The rectangle in the window in which content should be placed has changed. The rectangle in the window in which content should be placed has changed.
*/ */
void Fl_Android_Activity::onContentRectChanged(ANativeActivity *activity, const ARect *rect) void Fl_Android_Activity::onContentRectChanged(ANativeActivity *activity, const ARect *rect)
{ {
@ -571,7 +571,7 @@ void Fl_Android_Activity::onContentRectChanged(ANativeActivity *activity, const
} }
/** /**
* The drawing window for this native activity needs to be redrawn. To avoid transient artifacts during screen changes (such resizing after rotation), applications should not return from this function until they have finished drawing their window in its current state. The drawing window for this native activity needs to be redrawn. To avoid transient artifacts during screen changes (such resizing after rotation), applications should not return from this function until they have finished drawing their window in its current state.
*/ */
void Fl_Android_Activity::onNativeWindowRedrawNeeded(ANativeActivity *activity, ANativeWindow *window) void Fl_Android_Activity::onNativeWindowRedrawNeeded(ANativeActivity *activity, ANativeWindow *window)
{ {
@ -579,7 +579,7 @@ void Fl_Android_Activity::onNativeWindowRedrawNeeded(ANativeActivity *activity,
} }
/** /**
* The drawing window for this native activity has been resized. You should retrieve the new size from the window and ensure that your rendering in it now matches. The drawing window for this native activity has been resized. You should retrieve the new size from the window and ensure that your rendering in it now matches.
*/ */
void Fl_Android_Activity::onNativeWindowResized(ANativeActivity *activity, ANativeWindow *window) void Fl_Android_Activity::onNativeWindowResized(ANativeActivity *activity, ANativeWindow *window)
{ {
@ -587,7 +587,7 @@ void Fl_Android_Activity::onNativeWindowResized(ANativeActivity *activity, ANati
} }
/** /**
* NativeActivity is being destroyed. See Java documentation for Activity.onDestroy() for more information. NativeActivity is being destroyed. See Java documentation for Activity.onDestroy() for more information.
*/ */
void Fl_Android_Activity::onDestroy(ANativeActivity* activity) void Fl_Android_Activity::onDestroy(ANativeActivity* activity)
{ {
@ -597,7 +597,7 @@ void Fl_Android_Activity::onDestroy(ANativeActivity* activity)
} }
/** /**
* NativeActivity has started. See Java documentation for Activity.onStart() for more information. NativeActivity has started. See Java documentation for Activity.onStart() for more information.
*/ */
void Fl_Android_Activity::onStart(ANativeActivity* activity) void Fl_Android_Activity::onStart(ANativeActivity* activity)
{ {
@ -606,7 +606,7 @@ void Fl_Android_Activity::onStart(ANativeActivity* activity)
} }
/** /**
* NativeActivity has resumed. See Java documentation for Activity.onResume() for more information. NativeActivity has resumed. See Java documentation for Activity.onResume() for more information.
*/ */
void Fl_Android_Activity::onResume(ANativeActivity* activity) void Fl_Android_Activity::onResume(ANativeActivity* activity)
{ {
@ -615,7 +615,7 @@ void Fl_Android_Activity::onResume(ANativeActivity* activity)
} }
/** /**
* Framework is asking NativeActivity to save its current instance state. See Java documentation for Activity.onSaveInstanceState() for more information. The returned pointer needs to be created with malloc(); the framework will call free() on it for you. You also must fill in outSize with the number of bytes in the allocation. Note that the saved state will be persisted, so it can not contain any active entities (pointers to memory, file descriptors, etc). Framework is asking NativeActivity to save its current instance state. See Java documentation for Activity.onSaveInstanceState() for more information. The returned pointer needs to be created with malloc(); the framework will call free() on it for you. You also must fill in outSize with the number of bytes in the allocation. Note that the saved state will be persisted, so it can not contain any active entities (pointers to memory, file descriptors, etc).
*/ */
void *Fl_Android_Activity::onSaveInstanceState(ANativeActivity* activity, size_t* outLen) void *Fl_Android_Activity::onSaveInstanceState(ANativeActivity* activity, size_t* outLen)
{ {
@ -643,7 +643,7 @@ void *Fl_Android_Activity::onSaveInstanceState(ANativeActivity* activity, size_t
} }
/** /**
* NativeActivity has paused. See Java documentation for Activity.onPause() for more information. NativeActivity has paused. See Java documentation for Activity.onPause() for more information.
*/ */
void Fl_Android_Activity::onPause(ANativeActivity* activity) void Fl_Android_Activity::onPause(ANativeActivity* activity)
{ {
@ -652,7 +652,7 @@ void Fl_Android_Activity::onPause(ANativeActivity* activity)
} }
/** /**
* NativeActivity has stopped. See Java documentation for Activity.onStop() for more information. NativeActivity has stopped. See Java documentation for Activity.onStop() for more information.
*/ */
void Fl_Android_Activity::onStop(ANativeActivity* activity) void Fl_Android_Activity::onStop(ANativeActivity* activity)
{ {
@ -661,7 +661,7 @@ void Fl_Android_Activity::onStop(ANativeActivity* activity)
} }
/** /**
* The current device AConfiguration has changed. The new configuration can be retrieved from assetManager. The current device AConfiguration has changed. The new configuration can be retrieved from assetManager.
*/ */
void Fl_Android_Activity::onConfigurationChanged(ANativeActivity* activity) void Fl_Android_Activity::onConfigurationChanged(ANativeActivity* activity)
{ {
@ -671,7 +671,7 @@ void Fl_Android_Activity::onConfigurationChanged(ANativeActivity* activity)
} }
/** /**
* The system is running low on memory. Use this callback to release resources you do not need, to help the system avoid killing more important processes. The system is running low on memory. Use this callback to release resources you do not need, to help the system avoid killing more important processes.
*/ */
void Fl_Android_Activity::onLowMemory(ANativeActivity* activity) void Fl_Android_Activity::onLowMemory(ANativeActivity* activity)
{ {
@ -681,7 +681,7 @@ void Fl_Android_Activity::onLowMemory(ANativeActivity* activity)
} }
/** /**
* Focus has changed in this NativeActivity's window. This is often used, for example, to pause a game when it loses input focus. Focus has changed in this NativeActivity's window. This is often used, for example, to pause a game when it loses input focus.
*/ */
void Fl_Android_Activity::onWindowFocusChanged(ANativeActivity* activity, int focused) void Fl_Android_Activity::onWindowFocusChanged(ANativeActivity* activity, int focused)
{ {
@ -690,7 +690,7 @@ void Fl_Android_Activity::onWindowFocusChanged(ANativeActivity* activity, int fo
} }
/** /**
* The drawing window for this native activity has been created. You can use the given native window object to start drawing. The drawing window for this native activity has been created. You can use the given native window object to start drawing.
*/ */
void Fl_Android_Activity::onNativeWindowCreated(ANativeActivity* activity, ANativeWindow* window) void Fl_Android_Activity::onNativeWindowCreated(ANativeActivity* activity, ANativeWindow* window)
{ {
@ -699,7 +699,7 @@ void Fl_Android_Activity::onNativeWindowCreated(ANativeActivity* activity, ANati
} }
/** /**
* The drawing window for this native activity is going to be destroyed. You MUST ensure that you do not touch the window object after returning from this function: in the common case of drawing to the window from another thread, that means the implementation of this callback must properly synchronize with the other thread to stop its drawing before returning from here. The drawing window for this native activity is going to be destroyed. You MUST ensure that you do not touch the window object after returning from this function: in the common case of drawing to the window from another thread, that means the implementation of this callback must properly synchronize with the other thread to stop its drawing before returning from here.
*/ */
void Fl_Android_Activity::onNativeWindowDestroyed(ANativeActivity* activity, ANativeWindow* window) void Fl_Android_Activity::onNativeWindowDestroyed(ANativeActivity* activity, ANativeWindow* window)
{ {
@ -708,7 +708,7 @@ void Fl_Android_Activity::onNativeWindowDestroyed(ANativeActivity* activity, ANa
} }
/** /**
* The input queue for this native activity's window has been created. You can use the given input queue to start retrieving input events. The input queue for this native activity's window has been created. You can use the given input queue to start retrieving input events.
*/ */
void Fl_Android_Activity::onInputQueueCreated(ANativeActivity* activity, AInputQueue* queue) void Fl_Android_Activity::onInputQueueCreated(ANativeActivity* activity, AInputQueue* queue)
{ {
@ -717,7 +717,7 @@ void Fl_Android_Activity::onInputQueueCreated(ANativeActivity* activity, AInputQ
} }
/** /**
* The input queue for this native activity's window is being destroyed. You should no longer try to reference this object upon returning from this function. The input queue for this native activity's window is being destroyed. You should no longer try to reference this object upon returning from this function.
*/ */
void Fl_Android_Activity::onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue) void Fl_Android_Activity::onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue)
{ {
@ -726,10 +726,10 @@ void Fl_Android_Activity::onInputQueueDestroyed(ANativeActivity* activity, AInpu
} }
/** /**
* Create a thread that will run our FLTK code and the required communications and locks. Create a thread that will run our FLTK code and the required communications and locks.
* @param activity the interface to the Java end of Android \param activity the interface to the Java end of Android
* @param savedState if this app is relaunched, this is a memory block with the state of the app when it was interrupted \param savedState if this app is relaunched, this is a memory block with the state of the app when it was interrupted
* @param savedStateSize size of that block \param savedStateSize size of that block
*/ */
void Fl_Android_Activity::create(ANativeActivity* activity, void* savedState, void Fl_Android_Activity::create(ANativeActivity* activity, void* savedState,
size_t savedStateSize) size_t savedStateSize)
@ -773,7 +773,7 @@ void Fl_Android_Activity::create(ANativeActivity* activity, void* savedState,
} }
/** /**
* Set all callbacks from the Native Activity. Set all callbacks from the Native Activity.
*/ */
void Fl_Android_Activity::set_callbacks() void Fl_Android_Activity::set_callbacks()
{ {
@ -797,7 +797,7 @@ void Fl_Android_Activity::set_callbacks()
} }
/** /**
* This is the main entry point from the Android JavaVM into the native world. This is the main entry point from the Android JavaVM into the native world.
*/ */
JNIEXPORT void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, size_t savedStateSize) JNIEXPORT void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, size_t savedStateSize)
{ {

68
src/drivers/Android/Fl_Android_Graphics_Clipping.H

@ -32,11 +32,11 @@ class Fl_Android_Window_Driver;
/** /**
* The Fl_Rect_Region describes a rectangular clipping region. The Fl_Rect_Region describes a rectangular clipping region.
*
* Contrary to common FLTK convention, rectangles are stored with coordinates Contrary to common FLTK convention, rectangles are stored with coordinates
* instead of their width and height to accelerate calculations. The discreet instead of their width and height to accelerate calculations. The discreet
* constructor however uses the old convention for convenience. constructor however uses the old convention for convenience.
*/ */
class Fl_Rect_Region class Fl_Rect_Region
{ {
@ -82,35 +82,35 @@ private:
/** /**
* The Fl_Complex_Region represents a clipping region of any shape. The Fl_Complex_Region represents a clipping region of any shape.
*
* This class is organized in a tree-like structure. If the region is This class is organized in a tree-like structure. If the region is
* rectangular, is_simple() returns 1 and the rectangle can be used just rectangular, is_simple() returns 1 and the rectangle can be used just
* as in Fl_Rect_Region. as in Fl_Rect_Region.
*
* If a more complex representation is needed, subregions are created which are If a more complex representation is needed, subregions are created which are
* guaranteed to lie within the bounding box of the current region. Subregions guaranteed to lie within the bounding box of the current region. Subregions
* themselves can again contain sub-subregions to describe the entire clipping themselves can again contain sub-subregions to describe the entire clipping
* region, effectively creating a tree where the leafs contain the rectangles region, effectively creating a tree where the leafs contain the rectangles
* that together describe the clipping area. that together describe the clipping area.
*
* To make life easier, Fl_Complex_Region provides two types of iterator to To make life easier, Fl_Complex_Region provides two types of iterator to
* travers the entire tree. travers the entire tree.
*
* 1. Fl_Complex_Region itself is compatible to C++11 range-based loops and 1. Fl_Complex_Region itself is compatible to C++11 range-based loops and
* can bewalked simply by writing ``for (auto &&it: rgn) { ... }``. can bewalked simply by writing ``for (auto &&it: rgn) { ... }``.
*
* 2. Fl_Complex_Region provides an alternative iterator that loop only through 2. Fl_Complex_Region provides an alternative iterator that loop only through
* leafs that intersects with a given rectangle. The returned object leafs that intersects with a given rectangle. The returned object
* provides access to the readily clipped rectangle. provides access to the readily clipped rectangle.
*
* @code \code
* Fl_Complex_Region rgn(something); Fl_Complex_Region rgn(something);
* for (auto &&it: rgn.iterate(Fl_Rect_Region(0, 0, 100, 100)) { for (auto &&it: rgn.iterate(Fl_Rect_Region(0, 0, 100, 100)) {
* draw_something(it->rect()); draw_something(it->rect());
* } }
* @endcode \endcode
*
*/ */
class Fl_Complex_Region : public Fl_Rect_Region class Fl_Complex_Region : public Fl_Rect_Region
{ {

222
src/drivers/Android/Fl_Android_Graphics_Clipping.cxx

@ -24,7 +24,7 @@
/** /**
* Create an empty clipping region. Create an empty clipping region.
*/ */
Fl_Rect_Region::Fl_Rect_Region() : Fl_Rect_Region::Fl_Rect_Region() :
pLeft(0), pTop(0), pRight(0), pBottom(0) pLeft(0), pTop(0), pRight(0), pBottom(0)
@ -32,9 +32,9 @@ Fl_Rect_Region::Fl_Rect_Region() :
} }
/** /**
* Create a clipping region based on position and size. Create a clipping region based on position and size.
* @param x, y position \param x, y position
* @param w, h size \param w, h size
*/ */
Fl_Rect_Region::Fl_Rect_Region(int x, int y, int w, int h) : Fl_Rect_Region::Fl_Rect_Region(int x, int y, int w, int h) :
pLeft(x), pTop(y), pRight(x+w), pBottom(y+h) pLeft(x), pTop(y), pRight(x+w), pBottom(y+h)
@ -42,7 +42,7 @@ Fl_Rect_Region::Fl_Rect_Region(int x, int y, int w, int h) :
} }
/** /**
* Clone a clipping rectangle. Clone a clipping rectangle.
*/ */
Fl_Rect_Region::Fl_Rect_Region(const Fl_Rect_Region &r) : Fl_Rect_Region::Fl_Rect_Region(const Fl_Rect_Region &r) :
pLeft(r.pLeft), pTop(r.pTop), pLeft(r.pLeft), pTop(r.pTop),
@ -51,8 +51,8 @@ Fl_Rect_Region::Fl_Rect_Region(const Fl_Rect_Region &r) :
} }
/** /**
* Clone a clipping rectangle. Clone a clipping rectangle.
* The pointer can be NULL if an empty rectangle is needed. The pointer can be NULL if an empty rectangle is needed.
*/ */
Fl_Rect_Region::Fl_Rect_Region(enum Type what) Fl_Rect_Region::Fl_Rect_Region(enum Type what)
{ {
@ -65,8 +65,8 @@ Fl_Rect_Region::Fl_Rect_Region(enum Type what)
} }
/** /**
* If the rectangle has no width or height, it's considered empty. If the rectangle has no width or height, it's considered empty.
* @return true, if everything will be clipped and there is nothing to draw \return true, if everything will be clipped and there is nothing to draw
*/ */
bool Fl_Rect_Region::is_empty() const bool Fl_Rect_Region::is_empty() const
{ {
@ -74,8 +74,8 @@ bool Fl_Rect_Region::is_empty() const
} }
/** /**
* Return true, if the rectangle is of unlimited size and nothing should be clipped. Return true, if the rectangle is of unlimited size and nothing should be clipped.
* @return treu, if there is no clipping \return treu, if there is no clipping
*/ */
bool Fl_Rect_Region::is_infinite() const bool Fl_Rect_Region::is_infinite() const
{ {
@ -83,7 +83,7 @@ bool Fl_Rect_Region::is_infinite() const
} }
/** /**
* Set an empty clipping rect. Set an empty clipping rect.
*/ */
void Fl_Rect_Region::set_empty() void Fl_Rect_Region::set_empty()
{ {
@ -91,9 +91,9 @@ void Fl_Rect_Region::set_empty()
} }
/** /**
* Set a clipping rect using position and size Set a clipping rect using position and size
* @param x, y position \param x, y position
* @param w, h size \param w, h size
*/ */
void Fl_Rect_Region::set(int x, int y, int w, int h) void Fl_Rect_Region::set(int x, int y, int w, int h)
{ {
@ -104,9 +104,9 @@ void Fl_Rect_Region::set(int x, int y, int w, int h)
} }
/** /**
* Set a rectangle using the coordinates of two points, top left and bottom right. Set a rectangle using the coordinates of two points, top left and bottom right.
* @param l, t left and top coordinate \param l, t left and top coordinate
* @param r, b right and bottom coordinate \param r, b right and bottom coordinate
*/ */
void Fl_Rect_Region::set_ltrb(int l, int t, int r, int b) void Fl_Rect_Region::set_ltrb(int l, int t, int r, int b)
{ {
@ -117,8 +117,8 @@ void Fl_Rect_Region::set_ltrb(int l, int t, int r, int b)
} }
/** /**
* Copy the corrdinates from another rect. Copy the corrdinates from another rect.
* @param r source rectangle \param r source rectangle
*/ */
void Fl_Rect_Region::set(const Fl_Rect_Region &r) void Fl_Rect_Region::set(const Fl_Rect_Region &r)
{ {
@ -129,10 +129,10 @@ void Fl_Rect_Region::set(const Fl_Rect_Region &r)
} }
/** /**
* Set this rect to be the intersecting area between the original rect and another rect. Set this rect to be the intersecting area between the original rect and another rect.
* @param r another rectangular region \param r another rectangular region
* @return EMPTY, if rectangles are not intersecting, SAME if this and rect are \return EMPTY, if rectangles are not intersecting, SAME if this and rect are
* equal, LESS if the new rect is smaller than the original rect equal, LESS if the new rect is smaller than the original rect
*/ */
int Fl_Rect_Region::intersect_with(const Fl_Rect_Region &r) int Fl_Rect_Region::intersect_with(const Fl_Rect_Region &r)
{ {
@ -168,7 +168,7 @@ int Fl_Rect_Region::intersect_with(const Fl_Rect_Region &r)
} }
/** /**
* Use rectangle as a bounding box and add the outline of another rect. Use rectangle as a bounding box and add the outline of another rect.
*/ */
void Fl_Rect_Region::add_to_bbox(const Fl_Rect_Region &r) void Fl_Rect_Region::add_to_bbox(const Fl_Rect_Region &r)
{ {
@ -180,8 +180,8 @@ void Fl_Rect_Region::add_to_bbox(const Fl_Rect_Region &r)
} }
/** /**
* Print the coordinates of the rect to the log. Print the coordinates of the rect to the log.
* @param label some text that is logged with this message. \param label some text that is logged with this message.
*/ */
void Fl_Rect_Region::print(const char *label) const void Fl_Rect_Region::print(const char *label) const
{ {
@ -192,7 +192,7 @@ void Fl_Rect_Region::print(const char *label) const
// ============================================================================= // =============================================================================
/** /**
* Create an empty complex region. Create an empty complex region.
*/ */
Fl_Complex_Region::Fl_Complex_Region() : Fl_Complex_Region::Fl_Complex_Region() :
Fl_Rect_Region() Fl_Rect_Region()
@ -200,8 +200,8 @@ Fl_Complex_Region::Fl_Complex_Region() :
} }
/** /**
* Create a complex region with the same bounds as the give rect. Create a complex region with the same bounds as the give rect.
* @param r region size \param r region size
*/ */
Fl_Complex_Region::Fl_Complex_Region(const Fl_Rect_Region &r) : Fl_Complex_Region::Fl_Complex_Region(const Fl_Rect_Region &r) :
Fl_Rect_Region(r) Fl_Rect_Region(r)
@ -209,7 +209,7 @@ Fl_Complex_Region::Fl_Complex_Region(const Fl_Rect_Region &r) :
} }
/** /**
* Delete this region, all subregions recursively, and all following regions. Delete this region, all subregions recursively, and all following regions.
*/ */
Fl_Complex_Region::~Fl_Complex_Region() Fl_Complex_Region::~Fl_Complex_Region()
{ {
@ -217,12 +217,12 @@ Fl_Complex_Region::~Fl_Complex_Region()
} }
/** /**
* Delete all subregions of this region. Delete all subregions of this region.
* The pSubregion pointer should always be seen as a list of subregions, rather The pSubregion pointer should always be seen as a list of subregions, rather
* than a single region and some pNext pointer. So everything we do, we should than a single region and some pNext pointer. So everything we do, we should
* probably do for every object in that list. probably do for every object in that list.
*
* Also note, that the top level region never has pNext pointing to anything. Also note, that the top level region never has pNext pointing to anything.
*/ */
void Fl_Complex_Region::delete_all_subregions() void Fl_Complex_Region::delete_all_subregions()
{ {
@ -237,7 +237,7 @@ void Fl_Complex_Region::delete_all_subregions()
} }
/** /**
* Print the entire content of this region recursively. Print the entire content of this region recursively.
*/ */
void Fl_Complex_Region::print(const char *label) const void Fl_Complex_Region::print(const char *label) const
{ {
@ -246,7 +246,7 @@ void Fl_Complex_Region::print(const char *label) const
} }
/* /*
* Print the rectangular data only. Print the rectangular data only.
*/ */
void Fl_Complex_Region::print_data(int indent) const void Fl_Complex_Region::print_data(int indent) const
{ {
@ -263,8 +263,8 @@ void Fl_Complex_Region::print_data(int indent) const
} }
/** /**
* Replace this region with a rectangle. Replace this region with a rectangle.
* @param r the source rectangle \param r the source rectangle
*/ */
void Fl_Complex_Region::set(const Fl_Rect_Region &r) void Fl_Complex_Region::set(const Fl_Rect_Region &r)
{ {
@ -273,9 +273,9 @@ void Fl_Complex_Region::set(const Fl_Rect_Region &r)
} }
/** /**
* Replace this region with a copy of another region. Replace this region with a copy of another region.
* This operation can be expensive for very complex regions. This operation can be expensive for very complex regions.
* @param r the source region \param r the source region
*/ */
void Fl_Complex_Region::set(const Fl_Complex_Region &r) void Fl_Complex_Region::set(const Fl_Complex_Region &r)
{ {
@ -298,9 +298,9 @@ void Fl_Complex_Region::set(const Fl_Complex_Region &r)
} }
/** /**
* Set this region to the intersection of the original region and some rect. Set this region to the intersection of the original region and some rect.
* @param r intersect with this rectangle \param r intersect with this rectangle
* @return EMPTY, SAME, LESS \return EMPTY, SAME, LESS
*/ */
int Fl_Complex_Region::intersect_with(const Fl_Rect_Region &r) int Fl_Complex_Region::intersect_with(const Fl_Rect_Region &r)
{ {
@ -318,9 +318,9 @@ int Fl_Complex_Region::intersect_with(const Fl_Rect_Region &r)
} }
/** /**
* Subtract a rectangular region from this region. Subtract a rectangular region from this region.
* @param r the rect that we want removed \param r the rect that we want removed
* @return currently 0, but could return something meaningful \return currently 0, but could return something meaningful
*/ */
int Fl_Complex_Region::subtract(const Fl_Rect_Region &r) int Fl_Complex_Region::subtract(const Fl_Rect_Region &r)
{ {
@ -356,10 +356,10 @@ int Fl_Complex_Region::subtract(const Fl_Rect_Region &r)
} }
/** /**
* Compress the subregion of this region if possible and update the bounding Compress the subregion of this region if possible and update the bounding
* box of this region. box of this region.
*
* Does not recurse down the tree! Does not recurse down the tree!
*/ */
void Fl_Complex_Region::compress() void Fl_Complex_Region::compress()
{ {
@ -401,10 +401,10 @@ void Fl_Complex_Region::compress()
} }
/** /**
* Subtract a smaller rect from a larger rect, potentially creating four new rectangles. Subtract a smaller rect from a larger rect, potentially creating four new rectangles.
* This assumes that the calling region is NOT complex. This assumes that the calling region is NOT complex.
* @param r subtract the area of this rectangle; r must fit within ``this``. \param r subtract the area of this rectangle; r must fit within ``this``.
* @return currently 0, but this may change \return currently 0, but this may change
*/ */
int Fl_Complex_Region::subtract_smaller_region(const Fl_Rect_Region &r) int Fl_Complex_Region::subtract_smaller_region(const Fl_Rect_Region &r)
{ {
@ -444,8 +444,8 @@ int Fl_Complex_Region::subtract_smaller_region(const Fl_Rect_Region &r)
} }
/** /**
* Add an empty subregion to the current region. Add an empty subregion to the current region.
* @return a pointer to the newly created region. \return a pointer to the newly created region.
*/ */
Fl_Complex_Region *Fl_Complex_Region::add_subregion() Fl_Complex_Region *Fl_Complex_Region::add_subregion()
{ {
@ -460,9 +460,9 @@ Fl_Complex_Region *Fl_Complex_Region::add_subregion()
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** /**
* Returns an iterator object for loops that traverse the entire region tree. Returns an iterator object for loops that traverse the entire region tree.
* C++11 interface to range-based loops. C++11 interface to range-based loops.
* @return Iterator pointing to the first element. \return Iterator pointing to the first element.
*/ */
Fl_Complex_Region::Iterator Fl_Complex_Region::begin() Fl_Complex_Region::Iterator Fl_Complex_Region::begin()
{ {
@ -470,9 +470,9 @@ Fl_Complex_Region::Iterator Fl_Complex_Region::begin()
} }
/** /**
* Returns an interator object to mark the end of travesing the tree. Returns an interator object to mark the end of travesing the tree.
* C++11 interface to range-based loops. C++11 interface to range-based loops.
* @return \return
*/ */
Fl_Complex_Region::Iterator Fl_Complex_Region::end() Fl_Complex_Region::Iterator Fl_Complex_Region::end()
{ {
@ -480,8 +480,8 @@ Fl_Complex_Region::Iterator Fl_Complex_Region::end()
} }
/** /**
* Create an iterator to walk the entire tree. Create an iterator to walk the entire tree.
* @param r Iterate through this region, r must not have a parent(). \param r Iterate through this region, r must not have a parent().
*/ */
Fl_Complex_Region::Iterator::Iterator(Fl_Complex_Region *r) : Fl_Complex_Region::Iterator::Iterator(Fl_Complex_Region *r) :
pRegion(r) pRegion(r)
@ -489,10 +489,10 @@ Fl_Complex_Region::Iterator::Iterator(Fl_Complex_Region *r) :
} }
/** /**
* Compare two iterators. Compare two iterators.
* C++11 needs this to find the end of a for loop. C++11 needs this to find the end of a for loop.
* @param other \param other
* @return \return
*/ */
bool Fl_Complex_Region::Iterator::operator!=(const Iterator &other) const bool Fl_Complex_Region::Iterator::operator!=(const Iterator &other) const
{ {
@ -500,9 +500,9 @@ bool Fl_Complex_Region::Iterator::operator!=(const Iterator &other) const
} }
/** /**
* Set the iterator to the next object in the tree, down first. Set the iterator to the next object in the tree, down first.
* C++11 needs this to iterate in a for loop. C++11 needs this to iterate in a for loop.
* @return \return
*/ */
const Fl_Complex_Region::Iterator &Fl_Complex_Region::Iterator::operator++() const Fl_Complex_Region::Iterator &Fl_Complex_Region::Iterator::operator++()
{ {
@ -517,8 +517,8 @@ const Fl_Complex_Region::Iterator &Fl_Complex_Region::Iterator::operator++()
} }
/** /**
* Return the current object while iterating through the tree. Return the current object while iterating through the tree.
* @return \return
*/ */
Fl_Complex_Region *Fl_Complex_Region::Iterator::operator*() const Fl_Complex_Region *Fl_Complex_Region::Iterator::operator*() const
{ {
@ -528,9 +528,9 @@ Fl_Complex_Region *Fl_Complex_Region::Iterator::operator*() const
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** /**
* Use this to iterate through a region, hitting only nodes that intersect with this rect. Use this to iterate through a region, hitting only nodes that intersect with this rect.
* @param r find all parts of the region that intersect with this rect. \param r find all parts of the region that intersect with this rect.
* @return an object that can be used in range-based for loops in C++11. \return an object that can be used in range-based for loops in C++11.
*/ */
Fl_Complex_Region::Overlapping Fl_Complex_Region::overlapping(const Fl_Rect_Region &r) Fl_Complex_Region::Overlapping Fl_Complex_Region::overlapping(const Fl_Rect_Region &r)
{ {
@ -538,9 +538,9 @@ Fl_Complex_Region::Overlapping Fl_Complex_Region::overlapping(const Fl_Rect_Regi
} }
/** /**
* A helper object for iterating through a region, finding only overlapping rects. A helper object for iterating through a region, finding only overlapping rects.
* @param rgn \param rgn
* @param rect \param rect
*/ */
Fl_Complex_Region::Overlapping::Overlapping(Fl_Complex_Region *rgn, Fl_Complex_Region::Overlapping::Overlapping(Fl_Complex_Region *rgn,
const Fl_Rect_Region &rect) : const Fl_Rect_Region &rect) :
@ -551,8 +551,8 @@ Fl_Complex_Region::Overlapping::Overlapping(Fl_Complex_Region *rgn,
} }
/** /**
* Return an itertor for the first clipping rectangle inside the region. Return an itertor for the first clipping rectangle inside the region.
* @return \return
*/ */
Fl_Complex_Region::Overlapping::OverlappingIterator Fl_Complex_Region::Overlapping::begin() Fl_Complex_Region::Overlapping::OverlappingIterator Fl_Complex_Region::Overlapping::begin()
{ {
@ -561,8 +561,8 @@ Fl_Complex_Region::Overlapping::OverlappingIterator Fl_Complex_Region::Overlappi
} }
/** /**
* Return an iterator for the end of forward iteration. Return an iterator for the end of forward iteration.
* @return \return
*/ */
Fl_Complex_Region::Overlapping::OverlappingIterator Fl_Complex_Region::Overlapping::end() Fl_Complex_Region::Overlapping::OverlappingIterator Fl_Complex_Region::Overlapping::end()
{ {
@ -570,8 +570,8 @@ Fl_Complex_Region::Overlapping::OverlappingIterator Fl_Complex_Region::Overlappi
} }
/** /**
* Return the result of intersecting the original rect with this iterator. Return the result of intersecting the original rect with this iterator.
* @return \return
*/ */
Fl_Rect_Region &Fl_Complex_Region::Overlapping::clipped_rect() Fl_Rect_Region &Fl_Complex_Region::Overlapping::clipped_rect()
{ {
@ -579,8 +579,8 @@ Fl_Rect_Region &Fl_Complex_Region::Overlapping::clipped_rect()
} }
/** /**
* Store the intersection in pClippedRect and return true if there was an intersection. Store the intersection in pClippedRect and return true if there was an intersection.
* @return \return
*/ */
bool Fl_Complex_Region::Overlapping::intersects() bool Fl_Complex_Region::Overlapping::intersects()
{ {
@ -588,9 +588,9 @@ bool Fl_Complex_Region::Overlapping::intersects()
} }
/** /**
* Find the next element in the tree that actually intersects with the initial rect. Find the next element in the tree that actually intersects with the initial rect.
* Starting the search at the current object, NOT the next object. Starting the search at the current object, NOT the next object.
* @return \return
*/ */
bool Fl_Complex_Region::Overlapping::find_intersecting() bool Fl_Complex_Region::Overlapping::find_intersecting()
{ {
@ -610,8 +610,8 @@ bool Fl_Complex_Region::Overlapping::find_intersecting()
} }
/** /**
* Find the next object in the tree, complex, simple, intersecting or not. Find the next object in the tree, complex, simple, intersecting or not.
* @return \return
*/ */
bool Fl_Complex_Region::Overlapping::find_next() bool Fl_Complex_Region::Overlapping::find_next()
{ {
@ -628,9 +628,9 @@ bool Fl_Complex_Region::Overlapping::find_next()
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** /**
* Create the actual iterator for finding true clipping rects. Create the actual iterator for finding true clipping rects.
* @see Fl_Complex_Region::Overlapping \see Fl_Complex_Region::Overlapping
* @param ov \param ov
*/ */
Fl_Complex_Region::Overlapping::OverlappingIterator::OverlappingIterator( Fl_Complex_Region::Overlapping::OverlappingIterator::OverlappingIterator(
Overlapping *ov) : Overlapping *ov) :
@ -639,10 +639,10 @@ Fl_Complex_Region::Overlapping::OverlappingIterator::OverlappingIterator(
} }
/** /**
* Compare two iterator. Compare two iterator.
* This is used by C++11 range-based for loops to find the end of the range. This is used by C++11 range-based for loops to find the end of the range.
* @param other \param other
* @return \return
*/ */
bool Fl_Complex_Region::Overlapping::OverlappingIterator::operator!=( bool Fl_Complex_Region::Overlapping::OverlappingIterator::operator!=(
const OverlappingIterator &other) const const OverlappingIterator &other) const
@ -653,10 +653,10 @@ bool Fl_Complex_Region::Overlapping::OverlappingIterator::operator!=(
} }
/** /**
* Wrapper to find and set the next intersecting rectangle. Wrapper to find and set the next intersecting rectangle.
* @see Fl_Complex_Region::Overlapping::find_intersecting \see Fl_Complex_Region::Overlapping::find_intersecting
* @see Fl_Complex_Region::Overlapping::find_next \see Fl_Complex_Region::Overlapping::find_next
* @return \return
*/ */
const Fl_Complex_Region::Overlapping::OverlappingIterator & const Fl_Complex_Region::Overlapping::OverlappingIterator &
Fl_Complex_Region::Overlapping::OverlappingIterator::operator++() Fl_Complex_Region::Overlapping::OverlappingIterator::operator++()
@ -668,10 +668,10 @@ Fl_Complex_Region::Overlapping::OverlappingIterator::operator++()
} }
/** /**
* Return the Fl_Complex_Region::Overlapping state for this iterator. Return the Fl_Complex_Region::Overlapping state for this iterator.
* This gives the user access to the current rectangular fragment of This gives the user access to the current rectangular fragment of
* the clipping region. the clipping region.
* @return \return
*/ */
Fl_Complex_Region::Overlapping * Fl_Complex_Region::Overlapping *
Fl_Complex_Region::Overlapping::OverlappingIterator::operator*() const Fl_Complex_Region::Overlapping::OverlappingIterator::operator*() const

144
src/drivers/Android/Fl_Android_Graphics_Driver.cxx

@ -32,8 +32,8 @@ extern int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg);
static int sign(int v) { return (v<0) ? -1 : 1; } static int sign(int v) { return (v<0) ? -1 : 1; }
/* /*
* By linking this module, the following static method will instantiate the By linking this module, the following static method will instantiate the
* Windows GDI Graphics driver as the main display driver. Windows GDI Graphics driver as the main display driver.
*/ */
Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver()
{ {
@ -42,7 +42,7 @@ Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver()
/** /**
* Private default constructor. Private default constructor.
*/ */
Fl_Android_Graphics_Driver::Fl_Android_Graphics_Driver() : Fl_Android_Graphics_Driver::Fl_Android_Graphics_Driver() :
super() super()
@ -262,8 +262,8 @@ void Fl_Android_Graphics_Driver::line_style(int style, int width, char* dashes)
} }
/** /**
* Draw a single dot in the current color. Draw a single dot in the current color.
* @param x, y position relative to window. \param x, y position relative to window.
*/ */
void Fl_Android_Graphics_Driver::point(int x, int y) void Fl_Android_Graphics_Driver::point(int x, int y)
{ {
@ -283,10 +283,10 @@ void Fl_Android_Graphics_Driver::point(int x, int y)
} }
/** /**
* Draw a line. Draw a line.
* FIXME: it is incredibly inefficient to call 'point', especially for long lines FIXME: it is incredibly inefficient to call 'point', especially for long lines
* FIXME: clipping maust be moved into this call and drawing to the screen should happen right here FIXME: clipping maust be moved into this call and drawing to the screen should happen right here
* FIXME: line width is not considered FIXME: line width is not considered
*/ */
void Fl_Android_Graphics_Driver::line(int x, int y, int x1, int y1) void Fl_Android_Graphics_Driver::line(int x, int y, int x1, int y1)
{ {
@ -379,7 +379,7 @@ void Fl_Android_Graphics_Driver::polygon(int x0, int y0, int x1, int y1, int x2,
/** /**
* Reset the vertex counter to zero. Reset the vertex counter to zero.
*/ */
void Fl_Android_Graphics_Driver::begin_vertices() void Fl_Android_Graphics_Driver::begin_vertices()
{ {
@ -388,9 +388,9 @@ void Fl_Android_Graphics_Driver::begin_vertices()
} }
/** /**
* Add a vertex to the vertex list. Dynamically allocates memory. Add a vertex to the vertex list. Dynamically allocates memory.
* @param x, y position of the vertex after matrix transformation \param x, y position of the vertex after matrix transformation
* @param gap line and loop call offer to leave a gap in the drawing \param gap line and loop call offer to leave a gap in the drawing
*/ */
void Fl_Android_Graphics_Driver::add_vertex(float x, float y, bool gap) void Fl_Android_Graphics_Driver::add_vertex(float x, float y, bool gap)
{ {
@ -404,7 +404,7 @@ void Fl_Android_Graphics_Driver::add_vertex(float x, float y, bool gap)
} }
/** /**
* Start a list of vertices to draw multiple points. Start a list of vertices to draw multiple points.
*/ */
void Fl_Android_Graphics_Driver::begin_points() void Fl_Android_Graphics_Driver::begin_points()
{ {
@ -413,7 +413,7 @@ void Fl_Android_Graphics_Driver::begin_points()
} }
/** /**
* Start a list of vertices to draw a polyline. Start a list of vertices to draw a polyline.
*/ */
void Fl_Android_Graphics_Driver::begin_line() void Fl_Android_Graphics_Driver::begin_line()
{ {
@ -422,7 +422,7 @@ void Fl_Android_Graphics_Driver::begin_line()
} }
/** /**
* Start a list of vertices to draw a line loop. Start a list of vertices to draw a line loop.
*/ */
void Fl_Android_Graphics_Driver::begin_loop() void Fl_Android_Graphics_Driver::begin_loop()
{ {
@ -431,7 +431,7 @@ void Fl_Android_Graphics_Driver::begin_loop()
} }
/** /**
* Start a list of vertices to draw a polygon. Start a list of vertices to draw a polygon.
*/ */
void Fl_Android_Graphics_Driver::begin_polygon() void Fl_Android_Graphics_Driver::begin_polygon()
{ {
@ -440,7 +440,7 @@ void Fl_Android_Graphics_Driver::begin_polygon()
} }
/** /**
* Start a list of vertices to draw a complex polygon. Start a list of vertices to draw a complex polygon.
*/ */
void Fl_Android_Graphics_Driver::begin_complex_polygon() void Fl_Android_Graphics_Driver::begin_complex_polygon()
{ {
@ -449,7 +449,7 @@ void Fl_Android_Graphics_Driver::begin_complex_polygon()
} }
/** /**
* Draw all stored vertices as points. Draw all stored vertices as points.
*/ */
void Fl_Android_Graphics_Driver::end_points() void Fl_Android_Graphics_Driver::end_points()
{ {
@ -461,7 +461,7 @@ void Fl_Android_Graphics_Driver::end_points()
} }
/** /**
* Draw all stored vertices as a polyline. Draw all stored vertices as a polyline.
*/ */
void Fl_Android_Graphics_Driver::end_line() void Fl_Android_Graphics_Driver::end_line()
{ {
@ -475,7 +475,7 @@ void Fl_Android_Graphics_Driver::end_line()
} }
/** /**
* Draw all stored vertices as a polyline loop. Draw all stored vertices as a polyline loop.
*/ */
void Fl_Android_Graphics_Driver::end_loop() void Fl_Android_Graphics_Driver::end_loop()
{ {
@ -490,10 +490,10 @@ void Fl_Android_Graphics_Driver::end_loop()
} }
/** /**
* Draw all stored vertices as a polygon. Draw all stored vertices as a polygon.
* FIXME: these calls are very ineffiecient. Avoid pointer lookup. FIXME: these calls are very ineffiecient. Avoid pointer lookup.
* FIXME: use the current clipping rect to accelerate rendering FIXME: use the current clipping rect to accelerate rendering
* FIXME: unmix float and int FIXME: unmix float and int
*/ */
void Fl_Android_Graphics_Driver::end_polygon(int begin, int end) void Fl_Android_Graphics_Driver::end_polygon(int begin, int end)
{ {
@ -560,8 +560,8 @@ void Fl_Android_Graphics_Driver::end_polygon(int begin, int end)
} }
/** /**
* Draw all stored vertices as a polygon. Draw all stored vertices as a polygon.
* Mind the gap! Mind the gap!
*/ */
void Fl_Android_Graphics_Driver::end_polygon() void Fl_Android_Graphics_Driver::end_polygon()
{ {
@ -579,10 +579,10 @@ void Fl_Android_Graphics_Driver::end_polygon()
} }
/** /**
* Draw all stored vertices as a possibly self-intersecting polygon. Draw all stored vertices as a possibly self-intersecting polygon.
* FIXME: these calls are very ineffiecient. Avoid pointer lookup. FIXME: these calls are very ineffiecient. Avoid pointer lookup.
* FIXME: use the current clipping rect to accelerate rendering FIXME: use the current clipping rect to accelerate rendering
* FIXME: unmix float and int FIXME: unmix float and int
*/ */
void Fl_Android_Graphics_Driver::end_complex_polygon() void Fl_Android_Graphics_Driver::end_complex_polygon()
{ {
@ -653,7 +653,7 @@ void Fl_Android_Graphics_Driver::end_complex_polygon()
} }
/** /**
* Add a gap to a polyline drawing Add a gap to a polyline drawing
*/ */
void Fl_Android_Graphics_Driver::gap() void Fl_Android_Graphics_Driver::gap()
{ {
@ -668,8 +668,8 @@ void Fl_Android_Graphics_Driver::gap()
} }
/** /**
* Add a vertex to the list. Add a vertex to the list.
* TODO: we should maintain a bounding box for faster clipping. TODO: we should maintain a bounding box for faster clipping.
*/ */
void Fl_Android_Graphics_Driver::transformed_vertex(double x, double y) void Fl_Android_Graphics_Driver::transformed_vertex(double x, double y)
{ {
@ -684,14 +684,14 @@ void Fl_Android_Graphics_Driver::vertex(double x,double y)
/** /**
* Draw an arc. Draw an arc.
* @param xi \param xi
* @param yi \param yi
* @param w \param w
* @param h \param h
* @param a1 \param a1
* @param a2 \param a2
* FIXME: float-to-int interpolation is horrible! FIXME: float-to-int interpolation is horrible!
*/ */
void Fl_Android_Graphics_Driver::arc(int xi, int yi, int w, int h, double a1, double a2) void Fl_Android_Graphics_Driver::arc(int xi, int yi, int w, int h, double a1, double a2)
{ {
@ -722,14 +722,14 @@ void Fl_Android_Graphics_Driver::arc(int xi, int yi, int w, int h, double a1, do
} }
/** /**
* Draw a piece of a pie. Draw a piece of a pie.
* FIXME: this is not working very well at all. FIXME: this is not working very well at all.
* @param xi \param xi
* @param yi \param yi
* @param w \param w
* @param h \param h
* @param b1 \param b1
* @param b2 \param b2
*/ */
void Fl_Android_Graphics_Driver::pie(int xi, int yi, int w, int h, double b1, double b2) void Fl_Android_Graphics_Driver::pie(int xi, int yi, int w, int h, double b1, double b2)
{ {
@ -945,9 +945,9 @@ void Fl_Android_Graphics_Driver::pie(int xi, int yi, int w, int h, double b1, do
} }
/** /**
* FIXME: these do not draw rotated ellipses correctly! FIXME: these do not draw rotated ellipses correctly!
* FIXME: use floating point version of arc and pie?! FIXME: use floating point version of arc and pie?!
* */ */
void Fl_Android_Graphics_Driver::ellipse(double xt, double yt, double rx, double ry) void Fl_Android_Graphics_Driver::ellipse(double xt, double yt, double rx, double ry)
{ {
int llx = xt-rx; int llx = xt-rx;
@ -1128,10 +1128,10 @@ void Fl_Android_Graphics_Driver::draw_fixed(Fl_RGB_Image *img, int X, int Y, int
/** /**
* Copy RGB (or RGBA?) image data directly onto the surface. Copy RGB (or RGBA?) image data directly onto the surface.
* TODO: I did not find documentation on the possible values of D. If D is four, does that TODO: I did not find documentation on the possible values of D. If D is four, does that
* mean that the fourth value must be an alpha value, and should that be applied here? mean that the fourth value must be an alpha value, and should that be applied here?
* What does a negative D indicate? What does a negative D indicate?
*/ */
void Fl_Android_Graphics_Driver::draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L) void Fl_Android_Graphics_Driver::draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L)
{ {
@ -1154,10 +1154,10 @@ void Fl_Android_Graphics_Driver::draw_image(const uchar* buf, int X,int Y,int W,
} }
/** /**
* Copy RGB (or RGBA?) image data directly onto the surface. Copy RGB (or RGBA?) image data directly onto the surface.
* TODO: I did not find documentation on the possible values of D. If D is four, does that TODO: I did not find documentation on the possible values of D. If D is four, does that
* mean that the fourth value must be an alpha value, and should that be applied here? mean that the fourth value must be an alpha value, and should that be applied here?
* What does a negative D indicate? What does a negative D indicate?
*/ */
void Fl_Android_Graphics_Driver::draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L) void Fl_Android_Graphics_Driver::draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L)
{ {
@ -1181,9 +1181,9 @@ void Fl_Android_Graphics_Driver::draw_image_mono(const uchar* buf, int X,int Y,i
} }
/* /*
* Draw some graphics line-by-line directly onto this surface Draw some graphics line-by-line directly onto this surface
* TODO: I did not find documentation on the possible values of D. If D is four, does that TODO: I did not find documentation on the possible values of D. If D is four, does that
* mean that the fourth value must be an alpha value, and should that be applied here? mean that the fourth value must be an alpha value, and should that be applied here?
*/ */
void Fl_Android_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) void Fl_Android_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D)
{ {
@ -1208,11 +1208,11 @@ void Fl_Android_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data, int
} }
/* /*
* Draw some graphics line-by-line directly onto this surface Draw some graphics line-by-line directly onto this surface
* TODO: I did not find documentation on the possible values of D. If D is two, does that TODO: I did not find documentation on the possible values of D. If D is two, does that
* mean that the fourth value must be an alpha value, and should that be applied here? mean that the fourth value must be an alpha value, and should that be applied here?
* If it is three, doe we need to convert RGB to grayscale? If it is three, doe we need to convert RGB to grayscale?
* What exactly does a negative value mean? Where is this all documented? Sigh. What exactly does a negative value mean? Where is this all documented? Sigh.
*/ */
void Fl_Android_Graphics_Driver::draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) void Fl_Android_Graphics_Driver::draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D)
{ {
@ -1259,9 +1259,9 @@ void Fl_Android_Graphics_Driver::color(uchar r, uchar g, uchar b)
} }
/** /**
* Draw a rectangle that may be dithered if we are in colormap mode (which in Draw a rectangle that may be dithered if we are in colormap mode (which in
* the year 2018 is as likely has a user with a berstein colored tube TV). the year 2018 is as likely has a user with a berstein colored tube TV).
* FIXME: This function should be virtual as well, or should not exist at all. FIXME: This function should be virtual as well, or should not exist at all.
*/ */
void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) { void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
#if USE_COLORMAP #if USE_COLORMAP

22
src/drivers/Android/Fl_Android_Graphics_Font.H

@ -32,10 +32,10 @@
/** /**
* A bytemap is an array of bytes, used as an alpha channel when redering glyphs A bytemap is an array of bytes, used as an alpha channel when redering glyphs
* in a given color. in a given color.
* TODO: reate a class for RGB only and for grayscale and grayscale with alpha TODO: reate a class for RGB only and for grayscale and grayscale with alpha
* TODO: derive all this from a baseclass, so we can create the correct class for the required image TODO: derive all this from a baseclass, so we can create the correct class for the required image
*/ */
class Fl_Android_Bytemap class Fl_Android_Bytemap
{ {
@ -52,10 +52,10 @@ public:
/** /**
* A 565a map is an array of words for interleaved RGB and Alpha data. A 565a map is an array of words for interleaved RGB and Alpha data.
* 565 is the number of bit per component, compatible with our screen memory 565 is the number of bit per component, compatible with our screen memory
* scheme. The second word is actually a byt containing the alpha value for scheme. The second word is actually a byt containing the alpha value for
* the previous pixel: rrrrrggg.gggbbbbb.aaaaaaaa.00000000 the previous pixel: rrrrrggg.gggbbbbb.aaaaaaaa.00000000
*/ */
class Fl_Android_565A_Map class Fl_Android_565A_Map
{ {
@ -78,8 +78,8 @@ public:
/** /**
* This class reads True Type Font files and creates Bytemaps for glyphs at the This class reads True Type Font files and creates Bytemaps for glyphs at the
* requested height. requested height.
*/ */
class Fl_Android_Font_Source class Fl_Android_Font_Source
{ {
@ -105,7 +105,7 @@ public:
/** /**
* This class caches glyphs of a font for a specified height. This class caches glyphs of a font for a specified height.
*/ */
class Fl_Android_Font_Descriptor : public Fl_Font_Descriptor class Fl_Android_Font_Descriptor : public Fl_Font_Descriptor
{ {

210
src/drivers/Android/Fl_Android_Graphics_Font.cxx

@ -35,9 +35,9 @@
/** /**
* - font names starting with a $ will have the system font path inserted - font names starting with a $ will have the system font path inserted
* - font names starting with an @ will be loaded via the Asset Manager - font names starting with an @ will be loaded via the Asset Manager
* - all other names will be used verbatim - all other names will be used verbatim
*/ */
static Fl_Fontdesc built_in_table[] = { static Fl_Fontdesc built_in_table[] = {
{"$Roboto-Regular.ttf"}, {"$Roboto-Regular.ttf"},
@ -68,14 +68,14 @@ static const char *old_font_names[] = {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** /**
* Create an empty Bytemap. Create an empty Bytemap.
*/ */
Fl_Android_Bytemap::Fl_Android_Bytemap() Fl_Android_Bytemap::Fl_Android_Bytemap()
{ {
} }
/** /**
* Create an empty Bytemap. Create an empty Bytemap.
*/ */
Fl_Android_Bytemap::Fl_Android_Bytemap(int w, int h) Fl_Android_Bytemap::Fl_Android_Bytemap(int w, int h)
{ {
@ -84,7 +84,7 @@ Fl_Android_Bytemap::Fl_Android_Bytemap(int w, int h)
} }
/** /**
* Destroy the Bytemap and its allocated resources. Destroy the Bytemap and its allocated resources.
*/ */
Fl_Android_Bytemap::~Fl_Android_Bytemap() Fl_Android_Bytemap::~Fl_Android_Bytemap()
{ {
@ -92,14 +92,14 @@ Fl_Android_Bytemap::~Fl_Android_Bytemap()
} }
/** /**
* Render a bytemap to the screen using the current fl_color. Render a bytemap to the screen using the current fl_color.
*
* Bytes are seen as alpha values for the RGB color set by fl_color. For better Bytes are seen as alpha values for the RGB color set by fl_color. For better
* performance, alpha is only rendered in 5 steps. All rendering is offset as performance, alpha is only rendered in 5 steps. All rendering is offset as
* described in the bytemap, and clipped to the clipping region. described in the bytemap, and clipped to the clipping region.
* @param xx, yy bottom left position of the bytemap (baseline for text) \param xx, yy bottom left position of the bytemap (baseline for text)
* @param bm bytemap including offsets and size \param bm bytemap including offsets and size
* @param r clipping rectangle \param r clipping rectangle
*/ */
void Fl_Android_Graphics_Driver::draw(int xx, int yy, Fl_Android_Bytemap *bm, void Fl_Android_Graphics_Driver::draw(int xx, int yy, Fl_Android_Bytemap *bm,
Fl_Rect_Region &r) Fl_Rect_Region &r)
@ -160,8 +160,8 @@ void Fl_Android_Graphics_Driver::draw(int xx, int yy, Fl_Android_Bytemap *bm,
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** /**
* Create an empty image. Create an empty image.
* All initialisation of members is done in-lin (C++11) All initialisation of members is done in-lin (C++11)
*/ */
Fl_Android_565A_Map::Fl_Android_565A_Map() Fl_Android_565A_Map::Fl_Android_565A_Map()
{ {
@ -179,14 +179,14 @@ Fl_Android_565A_Map::~Fl_Android_565A_Map()
} }
/** /**
* Render a bytemap to the screen using the current fl_color. Render a bytemap to the screen using the current fl_color.
*
* Bytes are seen as alpha values for the RGB color set by fl_color. For better Bytes are seen as alpha values for the RGB color set by fl_color. For better
* performance, alpha is only rendered in 5 steps. All rendering is offset as performance, alpha is only rendered in 5 steps. All rendering is offset as
* described in the bytemap, and clipped to the clipping region. described in the bytemap, and clipped to the clipping region.
* @param xx, yy bottom left position of the bytemap (baseline for text) \param xx, yy bottom left position of the bytemap (baseline for text)
* @param bm bytemap including offsets and size \param bm bytemap including offsets and size
* @param r clipping rectangle \param r clipping rectangle
*/ */
void Fl_Android_Graphics_Driver::draw(int xx, int yy, Fl_Android_565A_Map *bm, void Fl_Android_Graphics_Driver::draw(int xx, int yy, Fl_Android_565A_Map *bm,
Fl_Rect_Region &r) Fl_Rect_Region &r)
@ -233,9 +233,9 @@ void Fl_Android_Graphics_Driver::draw(int xx, int yy, Fl_Android_565A_Map *bm,
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** /**
* Create a True Type font manager. Create a True Type font manager.
* @param fname the name of the font as it appears in the fl_fonts table. \param fname the name of the font as it appears in the fl_fonts table.
* @param fnum the index into the fl_fonts table \param fnum the index into the fl_fonts table
*/ */
Fl_Android_Font_Source::Fl_Android_Font_Source(const char *fname, Fl_Font fnum) : Fl_Android_Font_Source::Fl_Android_Font_Source(const char *fname, Fl_Font fnum) :
pFileBuffer(nullptr), pFileBuffer(nullptr),
@ -246,7 +246,7 @@ Fl_Android_Font_Source::Fl_Android_Font_Source(const char *fname, Fl_Font fnum)
} }
/** /**
* Release all resources. Release all resources.
*/ */
Fl_Android_Font_Source::~Fl_Android_Font_Source() Fl_Android_Font_Source::~Fl_Android_Font_Source()
{ {
@ -255,9 +255,9 @@ Fl_Android_Font_Source::~Fl_Android_Font_Source()
} }
/** /**
* Attempt to find an load a font file. Attempt to find an load a font file.
* @param name file or asset name \param name file or asset name
* @return \return
*/ */
bool Fl_Android_Font_Source::load_font(const char *name) bool Fl_Android_Font_Source::load_font(const char *name)
{ {
@ -272,9 +272,9 @@ bool Fl_Android_Font_Source::load_font(const char *name)
} }
/** /**
* Attempt to load a font through the asset manager. Attempt to load a font through the asset manager.
* @param name file or asset name \param name file or asset name
* @return \return
*/ */
bool Fl_Android_Font_Source::load_font_asset(const char *name) bool Fl_Android_Font_Source::load_font_asset(const char *name)
{ {
@ -307,9 +307,9 @@ bool Fl_Android_Font_Source::load_font_asset(const char *name)
} }
/** /**
* Attempt to load a font through the asset manager. Attempt to load a font through the asset manager.
* @param name file or asset name \param name file or asset name
* @return \return
*/ */
bool Fl_Android_Font_Source::load_font_file(const char *name) bool Fl_Android_Font_Source::load_font_file(const char *name)
{ {
@ -351,8 +351,8 @@ bool Fl_Android_Font_Source::load_font_file(const char *name)
/** /**
* Load a True Type font file and initialize the TTF interpreter. Load a True Type font file and initialize the TTF interpreter.
* A copy of the font file must remain in memory for the interpreter to work. A copy of the font file must remain in memory for the interpreter to work.
*/ */
void Fl_Android_Font_Source::load_font() void Fl_Android_Font_Source::load_font()
{ {
@ -382,10 +382,10 @@ void Fl_Android_Font_Source::load_font()
} }
/** /**
* Return a bytemap for the give unicode character. Return a bytemap for the give unicode character.
* @param c unicode character \param c unicode character
* @param size height in pixels \param size height in pixels
* @return a bytemap \return a bytemap
*/ */
Fl_Android_Bytemap *Fl_Android_Font_Source::get_bytemap(uint32_t c, int size) Fl_Android_Bytemap *Fl_Android_Font_Source::get_bytemap(uint32_t c, int size)
{ {
@ -409,13 +409,13 @@ Fl_Android_Bytemap *Fl_Android_Font_Source::get_bytemap(uint32_t c, int size)
} }
/** /**
* Get the width of the character in pixels. Get the width of the character in pixels.
* This is not a good function because character advance also depends on kerning This is not a good function because character advance also depends on kerning
* which takes the next character in a text line into account. Also, FLTK is which takes the next character in a text line into account. Also, FLTK is
* limited to integer character positions, and so is the Android driver. limited to integer character positions, and so is the Android driver.
* @param c unicode character \param c unicode character
* @param size height in pixels \param size height in pixels
* @return width in pixels to the start of the next character \return width in pixels to the start of the next character
*/ */
float Fl_Android_Font_Source::get_advance(uint32_t c, Fl_Fontsize size) float Fl_Android_Font_Source::get_advance(uint32_t c, Fl_Fontsize size)
{ {
@ -446,12 +446,12 @@ int Fl_Android_Font_Source::get_descent(Fl_Fontsize size)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** /**
* Create a new font descriptor. Create a new font descriptor.
* @param fname name of this font as in fl_fonts \param fname name of this font as in fl_fonts
* @param fsrc the font source for this font; there is one single font source \param fsrc the font source for this font; there is one single font source
* for all hights of a single font for all hights of a single font
* @param fnum index into the fl_fonts array \param fnum index into the fl_fonts array
* @param fsize height of font in pixels \param fsize height of font in pixels
*/ */
Fl_Android_Font_Descriptor::Fl_Android_Font_Descriptor(const char *fname, Fl_Android_Font_Source *fsrc, Fl_Font fnum, Fl_Fontsize fsize) : Fl_Android_Font_Descriptor::Fl_Android_Font_Descriptor(const char *fname, Fl_Android_Font_Source *fsrc, Fl_Font fnum, Fl_Fontsize fsize) :
Fl_Font_Descriptor(fname, fsize), Fl_Font_Descriptor(fname, fsize),
@ -472,7 +472,7 @@ Fl_Android_Font_Descriptor::Fl_Android_Font_Descriptor(const char *fname, Fl_And
} }
/** /**
* Release resources, including all cached unicode character shapes. Release resources, including all cached unicode character shapes.
*/ */
Fl_Android_Font_Descriptor::~Fl_Android_Font_Descriptor() Fl_Android_Font_Descriptor::~Fl_Android_Font_Descriptor()
{ {
@ -489,9 +489,9 @@ Fl_Android_Font_Descriptor::~Fl_Android_Font_Descriptor()
} }
/* /*
* Get the width of the character in pixels. Get the width of the character in pixels.
* @param c unicode character \param c unicode character
* @return width in pixels to the start of the next character \return width in pixels to the start of the next character
*/ */
float Fl_Android_Font_Descriptor::get_advance(uint32_t c) float Fl_Android_Font_Descriptor::get_advance(uint32_t c)
{ {
@ -502,14 +502,14 @@ float Fl_Android_Font_Descriptor::get_advance(uint32_t c)
} }
/** /**
* Get the pixels for a given Unicode character. Get the pixels for a given Unicode character.
*
* Calculating a bitmap is relatively expensive. This class will cache every Calculating a bitmap is relatively expensive. This class will cache every
* bitmap ever generated. Currently, this is pretty much brute force because bitmap ever generated. Currently, this is pretty much brute force because
* none of the bitmaps are ever released. none of the bitmaps are ever released.
*
* @param c unicode character \param c unicode character
* @return a bytemap \return a bytemap
*/ */
Fl_Android_Bytemap *Fl_Android_Font_Descriptor::get_bytemap(uint32_t c) Fl_Android_Bytemap *Fl_Android_Font_Descriptor::get_bytemap(uint32_t c)
{ {
@ -547,10 +547,10 @@ int Fl_Android_Font_Descriptor::get_descent()
/** /**
* Find or create a font descriptor for a given font and height. Find or create a font descriptor for a given font and height.
* @param fnum index into fl_fonts \param fnum index into fl_fonts
* @param size height in pixels \param size height in pixels
* @return an existing oder newly created descriptor \return an existing oder newly created descriptor
*/ */
Fl_Android_Font_Descriptor* Fl_Android_Font_Descriptor::find(Fl_Font fnum, Fl_Fontsize size) Fl_Android_Font_Descriptor* Fl_Android_Font_Descriptor::find(Fl_Font fnum, Fl_Fontsize size)
{ {
@ -574,9 +574,9 @@ Fl_Android_Font_Descriptor* Fl_Android_Font_Descriptor::find(Fl_Font fnum, Fl_Fo
// ============================================================================= // =============================================================================
/** /**
* Set a font for future use in text rendering calls. Set a font for future use in text rendering calls.
* @param fnum index into fl_fonts \param fnum index into fl_fonts
* @param size height in pixels \param size height in pixels
*/ */
void Fl_Android_Graphics_Driver::font(Fl_Font fnum, Fl_Fontsize size) { void Fl_Android_Graphics_Driver::font(Fl_Font fnum, Fl_Fontsize size) {
font_descriptor( Fl_Android_Font_Descriptor::find(fnum, size) ); font_descriptor( Fl_Android_Font_Descriptor::find(fnum, size) );
@ -585,10 +585,10 @@ void Fl_Android_Graphics_Driver::font(Fl_Font fnum, Fl_Fontsize size) {
} }
/** /**
* Copy a single letter to the screen. Copy a single letter to the screen.
* @param xx, yy position of character on screen \param xx, yy position of character on screen
* @param c unicode character \param c unicode character
* @return x position of next character on screen \return x position of next character on screen
*/ */
int Fl_Android_Graphics_Driver::render_letter(int xx, int yy, uint32_t c, Fl_Rect_Region &r) int Fl_Android_Graphics_Driver::render_letter(int xx, int yy, uint32_t c, Fl_Rect_Region &r)
{ {
@ -607,10 +607,10 @@ int Fl_Android_Graphics_Driver::render_letter(int xx, int yy, uint32_t c, Fl_Rec
} }
/** /**
* Render a string to screen. Render a string to screen.
* @param str text in utf-8 encoding \param str text in utf-8 encoding
* @param n number of bytes to render \param n number of bytes to render
* @param x, y position on screen \param x, y position on screen
*/ */
void Fl_Android_Graphics_Driver::draw(const char* str, int n, int x, int y) void Fl_Android_Graphics_Driver::draw(const char* str, int n, int x, int y)
{ {
@ -676,7 +676,7 @@ Fl_Fontsize Fl_Android_Graphics_Driver::size()
} }
/** /**
* FIXME: use the actual size of all glyphs, which is easily found in the Bytemap! FIXME: use the actual size of all glyphs, which is easily found in the Bytemap!
*/ */
void Fl_Android_Graphics_Driver::text_extents(const char *str, int n, int &dx, int &dy, int &w, int &h) void Fl_Android_Graphics_Driver::text_extents(const char *str, int n, int &dx, int &dy, int &w, int &h)
{ {
@ -705,10 +705,10 @@ int Fl_Android_Graphics_Driver::descent()
} }
/** /**
* Get a human-readable string describing the family of this face. Get a human-readable string describing the family of this face.
* @param fnum index into font table \param fnum index into font table
* @param ap[out] returns if the face is bold or italic or both. \param ap[out] returns if the face is bold or italic or both.
* @return pointer to a string; don't free, don't write \return pointer to a string; don't free, don't write
*/ */
const char *Fl_Android_Graphics_Driver::get_font_name(Fl_Font fnum, int* ap) const char *Fl_Android_Graphics_Driver::get_font_name(Fl_Font fnum, int* ap)
{ {
@ -723,9 +723,9 @@ const char *Fl_Android_Graphics_Driver::get_font_name(Fl_Font fnum, int* ap)
} }
/** /**
* Gets the string for this face. Gets the string for this face.
* @param num index into font table \param num index into font table
* @return pointer to a string; don't free, don't write \return pointer to a string; don't free, don't write
*/ */
const char *Fl_Android_Graphics_Driver::font_name(int num) const char *Fl_Android_Graphics_Driver::font_name(int num)
{ {
@ -735,11 +735,11 @@ const char *Fl_Android_Graphics_Driver::font_name(int num)
} }
/** /**
* Return an array of sizes in sizep. Return an array of sizes in sizep.
* @param fnum index into font table \param fnum index into font table
* @param sizep[out] a static array that contains the single value 0, indicating \param sizep[out] a static array that contains the single value 0, indicating
* that all fonts are arbitrarily resizable. that all fonts are arbitrarily resizable.
* @return 1, because our array has a size of 1 \return 1, because our array has a size of 1
*/ */
int Fl_Android_Graphics_Driver::get_font_sizes(Fl_Font fnum, int*& sizep) int Fl_Android_Graphics_Driver::get_font_sizes(Fl_Font fnum, int*& sizep)
{ {
@ -749,10 +749,10 @@ int Fl_Android_Graphics_Driver::get_font_sizes(Fl_Font fnum, int*& sizep)
} }
/** /**
* FLTK will open the display, and add every fonts on the server to the face table. FLTK will open the display, and add every fonts on the server to the face table.
* TODO: This is not supported under Android. TODO: This is not supported under Android.
* @param name basically a wildcard for finding fonts \param name basically a wildcard for finding fonts
* @return number of fonts found \return number of fonts found
*/ */
Fl_Font Fl_Android_Graphics_Driver::set_fonts(const char *name) Fl_Font Fl_Android_Graphics_Driver::set_fonts(const char *name)
{ {
@ -760,11 +760,11 @@ Fl_Font Fl_Android_Graphics_Driver::set_fonts(const char *name)
} }
/** /**
* Changes a face. Changes a face.
* @param num index of the font \param num index of the font
* @param name Path to font file, prepend $ for system fonts, @ for font assets. \param name Path to font file, prepend $ for system fonts, @ for font assets.
* The string pointer is simply stored, the string is not copied, so the The string pointer is simply stored, the string is not copied, so the
* string must be in static memory. string must be in static memory.
*/ */
void Fl_Android_Graphics_Driver::font_name(int num, const char *name) void Fl_Android_Graphics_Driver::font_name(int num, const char *name)
{ {

112
src/drivers/Android/Fl_Android_Screen_Driver.cxx

@ -18,9 +18,9 @@
/** /**
* @if AndroidDev @cond AndroidDev
* @defgroup AndroidDeveloper Android Developer Documentation \defgroup AndroidDeveloper Android Developer Documentation
* @{ \{
*/ */
@ -39,11 +39,11 @@
/** /**
* @class Fl_Android_Screen_Driver \class Fl_Android_Screen_Driver
*
* Handle Android screen devices. Handle Android screen devices.
*
* @todo This class is in an early development stage \todo This class is in an early development stage
*/ */
@ -55,7 +55,7 @@ static void timer_do_callback(int timerIndex);
/** /**
* Creates a driver that manages all Android screen and display related calls. Creates a driver that manages all Android screen and display related calls.
*/ */
Fl_Screen_Driver *Fl_Screen_Driver::newScreenDriver() Fl_Screen_Driver *Fl_Screen_Driver::newScreenDriver()
{ {
@ -67,7 +67,7 @@ extern int fl_send_system_handlers(void *e);
/** /**
* Create the screen driver. Create the screen driver.
*/ */
Fl_Android_Screen_Driver::Fl_Android_Screen_Driver() : Fl_Android_Screen_Driver::Fl_Android_Screen_Driver() :
super(), super(),
@ -78,11 +78,11 @@ Fl_Android_Screen_Driver::Fl_Android_Screen_Driver() :
/** /**
* Call the FLTK System handler with Android specific events. Call the FLTK System handler with Android specific events.
*
* @return always 1, assuming the event was handled \return always 1, assuming the event was handled
*
* @see Fl_Android_Platform_Event \see Fl_Android_Platform_Event
*/ */
int Fl_Android_Screen_Driver::handle_app_command() int Fl_Android_Screen_Driver::handle_app_command()
{ {
@ -187,12 +187,12 @@ int Fl_Android_Screen_Driver::handle_mouse_event(AInputQueue *queue, AInputEvent
/** /**
* Handle all events in the even queue. Handle all events in the even queue.
*
* @todo what should this function return? \todo what should this function return?
*
* @param time_to_wait \param time_to_wait
* @return we do not know \return we do not know
*/ */
int Fl_Android_Screen_Driver::handle_queued_events(double time_to_wait) int Fl_Android_Screen_Driver::handle_queued_events(double time_to_wait)
{ {
@ -253,13 +253,13 @@ int Fl_Android_Screen_Driver::handle_queued_events(double time_to_wait)
/** /**
* Wait for a maximum of `time_to_wait` until something happens. Wait for a maximum of `time_to_wait` until something happens.
*
* @param time_to_wait in seconds \param time_to_wait in seconds
* @return We really do not know; check other platforms to see what is \return We really do not know; check other platforms to see what is
* consistent here. consistent here.
*
* @todo return the remaining time to reach 'time_to_wait' \todo return the remaining time to reach 'time_to_wait'
*/ */
double Fl_Android_Screen_Driver::wait(double time_to_wait) double Fl_Android_Screen_Driver::wait(double time_to_wait)
{ {
@ -310,10 +310,10 @@ double Fl_Android_Screen_Driver::wait(double time_to_wait)
/** /**
* On Android, we currently write into a memory buffer and copy On Android, we currently write into a memory buffer and copy
* the content to the screen. the content to the screen.
*
* @see fl_flush() \see fl_flush()
*/ */
void Fl_Android_Screen_Driver::flush() void Fl_Android_Screen_Driver::flush()
{ {
@ -474,14 +474,14 @@ void Fl_Android_Screen_Driver::remove_timeout(Fl_Timeout_Handler cb, void *data)
/** /**
* Play some system sound. Play some system sound.
*
* This function plays some rather arbitrary system sounds. This function plays some rather arbitrary system sounds.
*
* @param type \param type
*
* @see Fl_Screen_Driver::beep(int) \see Fl_Screen_Driver::beep(int)
* @see fl_beep(int) \see fl_beep(int)
*/ */
void Fl_Android_Screen_Driver::beep(int type) void Fl_Android_Screen_Driver::beep(int type)
{ {
@ -526,20 +526,20 @@ void Fl_Android_Screen_Driver::beep(int type)
/** /**
* Get the current mouse coordinates. Get the current mouse coordinates.
*
* This is used, among other things, to position the FLTK standard dialogs in This is used, among other things, to position the FLTK standard dialogs in
* a way that makes it easy to click the most common button. For an Android a way that makes it easy to click the most common button. For an Android
* touch screen, this makes no sense at all, which is why we return the center touch screen, this makes no sense at all, which is why we return the center
* of the screen for now. of the screen for now.
*
* @todo rethink the dialog positioning scheme for touch devices. \todo rethink the dialog positioning scheme for touch devices.
*
* @todo this method assumes a fixed screen resolution \todo this method assumes a fixed screen resolution
*
* @param [out] x \param [out] x
* @param [out] y \param [out] y
* @return \return
*/ */
int Fl_Android_Screen_Driver::get_mouse(int &x, int &y) int Fl_Android_Screen_Driver::get_mouse(int &x, int &y)
{ {
@ -565,8 +565,8 @@ void Fl_Android_Screen_Driver::grab(Fl_Window* win)
/** /**
* @} \}
* @endif \endcond
*/ */

8
src/drivers/Android/Fl_Android_Window_Driver.cxx

@ -163,10 +163,10 @@ void Fl_Android_Window_Driver::resize(int X,int Y,int W,int H)
} }
/** /**
* Scroll a portion of the window. Scroll a portion of the window.
* FIXME: We are currently taking the easy way out, basically telling the caller that we don;t know how to scroll FIXME: We are currently taking the easy way out, basically telling the caller that we don;t know how to scroll
* and asking FLTK to draw the new area from scratch. It would be nice if clipping provides all calls and asking FLTK to draw the new area from scratch. It would be nice if clipping provides all calls
* that we need to implement a more efficient scrolling code. that we need to implement a more efficient scrolling code.
*/ */
int Fl_Android_Window_Driver::scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, int Fl_Android_Window_Driver::scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y,
void (*draw_area)(void*, int,int,int,int), void* data) void (*draw_area)(void*, int,int,int,int), void* data)

10
src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx

@ -37,9 +37,9 @@ extern void (*fl_unlock_function)();
int Fl_Cocoa_Screen_Driver::next_marked_length = 0; int Fl_Cocoa_Screen_Driver::next_marked_length = 0;
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** /**
@ -53,8 +53,8 @@ Fl_Screen_Driver *Fl_Screen_Driver::newScreenDriver()
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
static Fl_Text_Editor::Key_Binding extra_bindings[] = { static Fl_Text_Editor::Key_Binding extra_bindings[] = {

10
src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H

@ -41,9 +41,9 @@ class FLWindow;
#endif // __OBJC__ #endif // __OBJC__
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/* /*
@ -67,8 +67,8 @@ struct Fl_Window_Driver::shape_data_type {
}; };
/** /**
* @} \}
* @endcond \endcond
*/ */

10
src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx

@ -28,9 +28,9 @@
#include <FL/platform.H> #include <FL/platform.H>
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
Fl_Window_Driver *Fl_Window_Driver::newWindowDriver(Fl_Window *w) Fl_Window_Driver *Fl_Window_Driver::newWindowDriver(Fl_Window *w)
@ -39,8 +39,8 @@ Fl_Window_Driver *Fl_Window_Driver::newWindowDriver(Fl_Window *w)
} }
/** /**
* @} \}
* @endcond \endcond
*/ */

2
src/drivers/Pico/Fl_Pico_Graphics_Driver.H

@ -30,7 +30,7 @@
/** /**
\brief The Pico minimal graphics class. \brief The Pico minimal graphics class.
*
This class is implemented as a base class for minimal core drivers. This class is implemented as a base class for minimal core drivers.
*/ */
class Fl_Pico_Graphics_Driver : public Fl_Graphics_Driver { class Fl_Pico_Graphics_Driver : public Fl_Graphics_Driver {

2
src/drivers/PicoAndroid/Fl_PicoAndroid_Graphics_Driver.H

@ -31,7 +31,7 @@
/** /**
\brief The Pico minimal SDL graphics class. \brief The Pico minimal SDL graphics class.
*
This class is implemented as a base class for minimal core SDL drivers. This class is implemented as a base class for minimal core SDL drivers.
*/ */
class Fl_PicoAndroid_Graphics_Driver : public Fl_Pico_Graphics_Driver { class Fl_PicoAndroid_Graphics_Driver : public Fl_Pico_Graphics_Driver {

4
src/drivers/PicoAndroid/Fl_PicoAndroid_Graphics_Driver.cxx

@ -35,8 +35,8 @@
/* /*
* By linking this module, the following static method will instantiate the By linking this module, the following static method will instantiate the
* PicoSDL Graphics driver as the main display driver. PicoSDL Graphics driver as the main display driver.
*/ */
Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver()
{ {

10
src/drivers/PicoAndroid/Fl_PicoAndroid_Screen_Driver.cxx

@ -274,9 +274,9 @@ void android_main(struct android_app* state)
} }
/** /**
* This is the main entry point of a native application that is using This is the main entry point of a native application that is using
* android_native_app_glue. It runs in its own thread, with its own android_native_app_glue. It runs in its own thread, with its own
* event loop for receiving input events and doing other things. event loop for receiving input events and doing other things.
*/ */
void Fl_PicoAndroid_Screen_Driver::android_main(struct android_app* state) void Fl_PicoAndroid_Screen_Driver::android_main(struct android_app* state)
{ {
@ -443,8 +443,8 @@ double Fl_PicoAndroid_Screen_Driver::wait(double time_to_wait)
/* /*
* The following code should not be here! The following code should not be here!
* All this must be refactored into the driver system! All this must be refactored into the driver system!
*/ */
Fl_Fontdesc* fl_fonts = NULL; Fl_Fontdesc* fl_fonts = NULL;

2
src/drivers/PicoSDL/Fl_PicoSDL_Graphics_Driver.H

@ -31,7 +31,7 @@
/** /**
\brief The Pico minimal SDL graphics class. \brief The Pico minimal SDL graphics class.
*
This class is implemented as a base class for minimal core SDL drivers. This class is implemented as a base class for minimal core SDL drivers.
*/ */
class Fl_PicoSDL_Graphics_Driver : public Fl_Pico_Graphics_Driver { class Fl_PicoSDL_Graphics_Driver : public Fl_Pico_Graphics_Driver {

4
src/drivers/PicoSDL/Fl_PicoSDL_Graphics_Driver.cxx

@ -33,8 +33,8 @@ extern Window fl_window;
/* /*
* By linking this module, the following static method will instantiate the By linking this module, the following static method will instantiate the
* PicoSDL Graphics driver as the main display driver. PicoSDL Graphics driver as the main display driver.
*/ */
Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver()
{ {

4
src/drivers/PicoSDL/Fl_PicoSDL_System_Driver.cxx

@ -23,8 +23,8 @@
/* /*
* By linking this module, the following static method will instantiate the By linking this module, the following static method will instantiate the
* PicoSDL Graphics driver as the main display driver. PicoSDL Graphics driver as the main display driver.
*/ */
Fl_System_Driver *Fl_System_Driver::newSystemDriver() Fl_System_Driver *Fl_System_Driver::newSystemDriver()
{ {

22
src/drivers/PostScript/Fl_PostScript.cxx

@ -30,13 +30,13 @@
const char *Fl_PostScript_File_Device::file_chooser_title = "Select a .ps file"; const char *Fl_PostScript_File_Device::file_chooser_title = "Select a .ps file";
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** /**
@brief The constructor. \brief The constructor.
*/ */
Fl_PostScript_Graphics_Driver::Fl_PostScript_Graphics_Driver(void) Fl_PostScript_Graphics_Driver::Fl_PostScript_Graphics_Driver(void)
{ {
@ -55,8 +55,8 @@ Fl_PostScript_Graphics_Driver::~Fl_PostScript_Graphics_Driver() {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
@ -120,9 +120,9 @@ Fl_PostScript_File_Device::~Fl_PostScript_File_Device() {
} }
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
int Fl_PostScript_Graphics_Driver::clocale_printf(const char *format, ...) int Fl_PostScript_Graphics_Driver::clocale_printf(const char *format, ...)
@ -1494,8 +1494,8 @@ void Fl_PostScript_File_Device::end_job (void)
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
#endif // !defined(FL_NO_PRINT_SUPPORT) #endif // !defined(FL_NO_PRINT_SUPPORT)

10
src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx

@ -25,9 +25,9 @@
#include "Fl_Quartz_Copy_Surface_Driver.H" #include "Fl_Quartz_Copy_Surface_Driver.H"
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
Fl_Copy_Surface_Driver *Fl_Copy_Surface_Driver::newCopySurfaceDriver(int w, int h) Fl_Copy_Surface_Driver *Fl_Copy_Surface_Driver::newCopySurfaceDriver(int w, int h)
@ -36,8 +36,8 @@ Fl_Copy_Surface_Driver *Fl_Copy_Surface_Driver::newCopySurfaceDriver(int w, int
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
Fl_Quartz_Copy_Surface_Driver::Fl_Quartz_Copy_Surface_Driver(int w, int h) : Fl_Copy_Surface_Driver(w, h) { Fl_Quartz_Copy_Surface_Driver::Fl_Quartz_Copy_Surface_Driver(int w, int h) : Fl_Copy_Surface_Driver(w, h) {

2
src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H

@ -44,7 +44,7 @@ class Fl_Quartz_Font_Descriptor;
/** /**
\brief The Mac OS X-specific graphics class. \brief The Mac OS X-specific graphics class.
*
This class is implemented only on the Mac OS X platform. This class is implemented only on the Mac OS X platform.
*/ */
class Fl_Quartz_Graphics_Driver : public Fl_Graphics_Driver { class Fl_Quartz_Graphics_Driver : public Fl_Graphics_Driver {

28
src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx

@ -34,20 +34,20 @@ static void dataReleaseCB(void *info, const void *data, size_t size)
} }
/* /*
* draw an image based on the input parameters draw an image based on the input parameters
*
* buf: image source data buf: image source data
* X, Y: position (in buffer?!) X, Y: position (in buffer?!)
* W, H: size of picture (in pixel?) W, H: size of picture (in pixel?)
* delta: distance from pixel to pixel in buf in bytes delta: distance from pixel to pixel in buf in bytes
* linedelta: distance from line to line in buf in bytes linedelta: distance from line to line in buf in bytes
* mono: if set, pixel is one byte - if zero, pixel is 3 byte mono: if set, pixel is one byte - if zero, pixel is 3 byte
* cb: callback to copy image data into (RGB?) buffer cb: callback to copy image data into (RGB?) buffer
* buf: pointer to first byte in image source buf: pointer to first byte in image source
* x, y: position in buffer x, y: position in buffer
* w: width (in bytes?) w: width (in bytes?)
* dst: destination buffer dst: destination buffer
* userdata: ? userdata: ?
*/ */
static void innards(const uchar *buf, int X, int Y, int W, int H, static void innards(const uchar *buf, int X, int Y, int W, int H,
int delta, int linedelta, int mono, int delta, int linedelta, int mono,

10
src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx

@ -41,9 +41,9 @@ public:
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
Fl_Image_Surface_Driver *Fl_Image_Surface_Driver::newImageSurfaceDriver(int w, int h, int high_res, Fl_Offscreen off) Fl_Image_Surface_Driver *Fl_Image_Surface_Driver::newImageSurfaceDriver(int w, int h, int high_res, Fl_Offscreen off)
@ -52,8 +52,8 @@ Fl_Image_Surface_Driver *Fl_Image_Surface_Driver::newImageSurfaceDriver(int w, i
} }
/** /**
* @} \}
* @endcond \endcond
*/ */

2
src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H

@ -50,7 +50,7 @@ struct _XRegion {
/** /**
\brief The Xlib-specific graphics class. \brief The Xlib-specific graphics class.
*
This class is implemented only on the Xlib platform. This class is implemented only on the Xlib platform.
*/ */
class FL_EXPORT Fl_Xlib_Graphics_Driver : public Fl_Scalable_Graphics_Driver { class FL_EXPORT Fl_Xlib_Graphics_Driver : public Fl_Scalable_Graphics_Driver {

2
src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx

@ -343,7 +343,7 @@ void Fl_Xlib_Graphics_Driver::set_color(Fl_Color i, unsigned c) {
} }
/** /**
@} \}
*/ */
// //

20
src/filename_absolute.cxx

@ -50,9 +50,9 @@ int fl_filename_absolute(char *to, int tolen, const char *from) {
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
int Fl_System_Driver::filename_absolute(char *to, int tolen, const char *from) { int Fl_System_Driver::filename_absolute(char *to, int tolen, const char *from) {
@ -95,8 +95,8 @@ int Fl_System_Driver::filename_absolute(char *to, int tolen, const char *from) {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
@ -150,9 +150,9 @@ fl_filename_relative(char *to, // O - Relative filename
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
int // O - 0 if no change, 1 if changed int // O - 0 if no change, 1 if changed
@ -227,8 +227,8 @@ Fl_System_Driver::filename_relative(char *to, // O - Relative filename
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

22
src/filename_ext.cxx

@ -36,18 +36,18 @@ const char *fl_filename_ext(const char *buf) {
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** /**
* Default implementation to find a filename extension. Default implementation to find a filename extension.
*
* The default implementation assumes that the last `.` character separates The default implementation assumes that the last `.` character separates
* the extension form the basename of a file. the extension form the basename of a file.
*
* @see fl_filename_ext(const char*) \see fl_filename_ext(const char*)
*/ */
const char *Fl_System_Driver::filename_ext(const char *buf) { const char *Fl_System_Driver::filename_ext(const char *buf) {
const char *q = 0; const char *q = 0;
@ -60,8 +60,8 @@ const char *Fl_System_Driver::filename_ext(const char *buf) {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

20
src/filename_isdir.cxx

@ -40,17 +40,17 @@ int fl_filename_isdir(const char* n) {
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** /**
* filename_isdir_quick() is a private function that checks for a filename_isdir_quick() is a private function that checks for a
* trailing slash and assumes that the passed name is a directory if trailing slash and assumes that the passed name is a directory if
* it finds one. This function is used by Fl_File_Browser and it finds one. This function is used by Fl_File_Browser and
* Fl_File_Chooser to avoid extra stat() calls, but is not supported Fl_File_Chooser to avoid extra stat() calls, but is not supported
* outside of FLTK... outside of FLTK...
*/ */
int Fl_System_Driver::filename_isdir_quick(const char* n) { int Fl_System_Driver::filename_isdir_quick(const char* n) {
// Do a quick optimization for filenames with a trailing slash... // Do a quick optimization for filenames with a trailing slash...
@ -77,8 +77,8 @@ int Fl_System_Driver::filename_isdir(const char* n) {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

24
src/fl_arc.cxx

@ -35,19 +35,19 @@ static double _fl_hypot(double x, double y) {
} }
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** /**
* Draw an arc. Draw an arc.
*
* The default implementation draws an arc using other calls into the graphics 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 driver. There is no need to override the method unless the target platform
* supports drawing arcs directly. supports drawing arcs directly.
*
* @see fl_arc(double x, double y, double r, double start, double end) \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) { void Fl_Graphics_Driver::arc(double x, double y, double r, double start, double end) {
@ -87,8 +87,8 @@ void Fl_Graphics_Driver::arc(double x, double y, double r, double start, double
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

4
src/fl_color.cxx

@ -40,7 +40,7 @@ unsigned fl_cmap[256] = {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** \addtogroup fl_attributes /** \addtogroup fl_attributes
@{ */ \{ */
/** /**
Returns the RGB value(s) for the given FLTK color index. Returns the RGB value(s) for the given FLTK color index.
@ -166,7 +166,7 @@ Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg) {
else return FL_WHITE; else return FL_WHITE;
} }
/** /**
@} \}
*/ */
// //

10
src/fl_curve.cxx

@ -30,9 +30,9 @@
#include <math.h> #include <math.h>
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** see fl_curve() */ /** see fl_curve() */
@ -104,8 +104,8 @@ void Fl_Graphics_Driver::curve(double X0, double Y0,
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

4
src/fl_dnd_win32.cxx

@ -52,7 +52,7 @@ Fl_Window *fl_dnd_target_window = 0;
/** /**
* subclass the IDropTarget to receive data from DnD operations subclass the IDropTarget to receive data from DnD operations
*/ */
class FLDropTarget : public IDropTarget class FLDropTarget : public IDropTarget
{ {
@ -321,7 +321,7 @@ int FLDropTarget::currDragSize = 0;
char FLDropTarget::currDragResult = 0; char FLDropTarget::currDragResult = 0;
/** /**
* this class is needed to allow FLTK apps to be a DnD source this class is needed to allow FLTK apps to be a DnD source
*/ */
class FLDropSource : public IDropSource class FLDropSource : public IDropSource
{ {

38
src/fl_encoding_latin1.cxx

@ -116,19 +116,19 @@ const char *Fl_Darwin_System_Driver::local_to_latin1(const char *t, int n)
#endif #endif
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** /**
* Default implementation of latin-to-local text conversion. Default implementation of latin-to-local text conversion.
*
* The default implementation returns the original text. This method should The default implementation returns the original text. This method should
* be reimplemented by drivers for platforms that commonly use latin be reimplemented by drivers for platforms that commonly use latin
* text encoding. text encoding.
*
* @see fl_latin1_to_local(const char *, int) \see fl_latin1_to_local(const char *, int)
*/ */
const char *Fl_System_Driver::latin1_to_local(const char *t, int) const char *Fl_System_Driver::latin1_to_local(const char *t, int)
{ {
@ -136,13 +136,13 @@ const char *Fl_System_Driver::latin1_to_local(const char *t, int)
} }
/** /**
* Default implementation of local-to-latin text conversion. Default implementation of local-to-latin text conversion.
*
* The default implementation returns the original text. This method should The default implementation returns the original text. This method should
* be reimplemented by drivers for platforms that commonly use latin be reimplemented by drivers for platforms that commonly use latin
* text encoding. text encoding.
*
* @see fl_local_to_latin1(const char *, int) \see fl_local_to_latin1(const char *, int)
*/ */
const char *Fl_System_Driver::local_to_latin1(const char *t, int) const char *Fl_System_Driver::local_to_latin1(const char *t, int)
{ {
@ -150,8 +150,8 @@ const char *Fl_System_Driver::local_to_latin1(const char *t, int)
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
const char *fl_latin1_to_local(const char *t, int n) const char *fl_latin1_to_local(const char *t, int n)

10
src/fl_encoding_mac_roman.cxx

@ -77,9 +77,9 @@ static char *buf = 0;
static int n_buf = 0; static int n_buf = 0;
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
const char *Fl_System_Driver::local_to_mac_roman(const char *t, int n) const char *Fl_System_Driver::local_to_mac_roman(const char *t, int n)
@ -125,8 +125,8 @@ const char *Fl_System_Driver::mac_roman_to_local(const char *t, int n)
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
const char *fl_local_to_mac_roman(const char *t, int n) { const char *fl_local_to_mac_roman(const char *t, int n) {

2
src/fl_images_core.cxx

@ -50,7 +50,7 @@ static Fl_Image *fl_check_images(const char *name, uchar *header, int headerlen)
/** /**
\brief Register the image formats. \brief Register the image formats.
*
This function is provided in the fltk_images library and This function is provided in the fltk_images library and
registers all of the "extra" image file formats that are not part registers all of the "extra" image file formats that are not part
of the core FLTK library. of the core FLTK library.

74
src/fl_open_uri.cxx

@ -33,45 +33,45 @@
#include "flstring.h" #include "flstring.h"
/** \addtogroup filenames /** \addtogroup filenames
@{ */ \{ */
/** /**
* Opens the specified Uniform Resource Identifier (URI). Opens the specified Uniform Resource Identifier (URI).
* Uses an operating-system dependent program or interface. For URIs Uses an operating-system dependent program or interface. For URIs
* using the "ftp", "http", or "https" schemes, the system default web using the "ftp", "http", or "https" schemes, the system default web
* browser is used to open the URI, while "mailto" and "news" URIs are browser is used to open the URI, while "mailto" and "news" URIs are
* typically opened using the system default mail reader and "file" URIs typically opened using the system default mail reader and "file" URIs
* are opened using the file system navigator. are opened using the file system navigator.
*
* On success, the (optional) msg buffer is filled with the command that On success, the (optional) msg buffer is filled with the command that
* was run to open the URI; on Windows, this will always be "open uri". was run to open the URI; on Windows, this will always be "open uri".
*
* On failure, the msg buffer is filled with an English error message. On failure, the msg buffer is filled with an English error message.
*
* \note \note
* \b Platform \b Specific \b Issues: \b Windows \n \b Platform \b Specific \b Issues: \b Windows \n
* With "file:" based URIs on Windows, you may encounter issues with With "file:" based URIs on Windows, you may encounter issues with
* anchors being ignored. Example: "file:///c:/some/index.html#anchor" anchors being ignored. Example: "file:///c:/some/index.html#anchor"
* may open in the browser without the "#anchor" suffix. The behavior may open in the browser without the "#anchor" suffix. The behavior
* seems to vary across different Windows versions. Workaround: open a link seems to vary across different Windows versions. Workaround: open a link
* to a separate html file that redirects to the desired "file:" URI. to a separate html file that redirects to the desired "file:" URI.
*
* \b Example \b Example
* \code \code
* #include <FL/filename.H> #include <FL/filename.H>
* [..] [..]
* char errmsg[512]; char errmsg[512];
* if ( !fl_open_uri("http://google.com/", errmsg, sizeof(errmsg)) ) { if ( !fl_open_uri("http://google.com/", errmsg, sizeof(errmsg)) ) {
* char warnmsg[768]; char warnmsg[768];
* sprintf(warnmsg, "Error: %s", errmsg); sprintf(warnmsg, "Error: %s", errmsg);
* fl_alert(warnmsg); fl_alert(warnmsg);
* } }
* \endcode \endcode
*
* @param uri The URI to open \param uri The URI to open
* @param msg Optional buffer which contains the command or error message \param msg Optional buffer which contains the command or error message
* @param msglen Length of optional buffer \param msglen Length of optional buffer
* @return 1 on success, 0 on failure \return 1 on success, 0 on failure
*/ */
int fl_open_uri(const char *uri, char *msg, int msglen) { int fl_open_uri(const char *uri, char *msg, int msglen) {
// Supported URI schemes... // Supported URI schemes...

10
src/fl_rect.cxx

@ -34,9 +34,9 @@
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** see fl_restore_clip() */ /** see fl_restore_clip() */
@ -59,8 +59,8 @@ Fl_Region Fl_Graphics_Driver::clip_region() {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */

10
src/fl_shortcut.cxx

@ -373,9 +373,9 @@ int Fl_Widget::test_shortcut() {
} }
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
const char *Fl_System_Driver::shortcut_add_key_name(unsigned key, char *p, char *buf, const char **eom) const char *Fl_System_Driver::shortcut_add_key_name(unsigned key, char *p, char *buf, const char **eom)
@ -417,8 +417,8 @@ const char *Fl_System_Driver::shortcut_add_key_name(unsigned key, char *p, char
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

2
src/fl_utf8.cxx

@ -615,7 +615,7 @@ void fl_make_path_for_file( const char *path ) {
#if ERRORS_TO_CP1252 #if ERRORS_TO_CP1252
/* Codes 0x80..0x9f from the Microsoft CP1252 character set, translated /* Codes 0x80..0x9f from the Microsoft CP1252 character set, translated
* to Unicode: to Unicode:
*/ */
static unsigned short cp1252[32] = { static unsigned short cp1252[32] = {
0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,

10
src/fl_vertex.cxx

@ -38,9 +38,9 @@
#include <stdlib.h> #include <stdlib.h>
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
/** see fl_push_matrix() */ /** see fl_push_matrix() */
@ -134,8 +134,8 @@ double Fl_Graphics_Driver::transform_dy(double x, double y) {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
// //

12
src/gl_draw.cxx

@ -456,10 +456,10 @@ void gl_texture_pile_height(int max)
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
void Fl_Gl_Window_Driver::draw_string_legacy(const char* str, int n) void Fl_Gl_Window_Driver::draw_string_legacy(const char* str, int n)
{ {
@ -793,8 +793,8 @@ char *Fl_Cocoa_Gl_Window_Driver::alpha_mask_for_string(const char *str, int n, i
#endif // FL_CFG_GFX_QUARTZ #endif // FL_CFG_GFX_QUARTZ
/** /**
* @} \}
* @endcond \endcond
*/ */
#endif // HAVE_GL || defined(FL_DOXYGEN) #endif // HAVE_GL || defined(FL_DOXYGEN)

10
src/gl_start.cxx

@ -87,9 +87,9 @@ void gl_finish() {
} }
/** /**
* @cond DriverDev \cond DriverDev
* @addtogroup DriverDeveloper \addtogroup DriverDeveloper
* @{ \{
*/ */
void Fl_Gl_Window_Driver::gl_visual(Fl_Gl_Choice *c) { void Fl_Gl_Window_Driver::gl_visual(Fl_Gl_Choice *c) {
@ -129,8 +129,8 @@ int Fl::gl_visual(int mode, int *alist) {
} }
/** /**
* @} \}
* @endcond \endcond
*/ */
#endif // HAVE_GL #endif // HAVE_GL

Loading…
Cancel
Save