mirror of https://github.com/fltk/fltk
Fixed all Doxygen warnings triggered by new Fl_Device and Fl_Printer classes
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
369366f2ae
commit
d305d7078b
|
@ -56,19 +56,23 @@ typedef void (*Fl_Draw_Image_Cb)(void* ,int,int,int,uchar*);
|
|||
<br> The preferred FLTK API for drawing operations is the function collection of the
|
||||
\ref fl_drawings and \ref fl_attributes modules.
|
||||
<br> Alternatively, member functions of the Fl_Device class can be called
|
||||
using the global variable Fl_Device *fl_device that points at all time to the single device
|
||||
(an instance of an Fl_Device subclass) that's currently receiving drawing requests:<br>
|
||||
<tt>fl_device->rect(x, y, w, h);</tt>
|
||||
using the global variable Fl_Device * \ref fl_device that points at all time to the single device
|
||||
(an instance of an Fl_Device subclass) that's currently receiving graphics requests:
|
||||
\code fl_device->rect(x, y, w, h); \endcode
|
||||
<br>Each member function of the Fl_Device class has the same effect and parameter list as the
|
||||
function of the \ref fl_drawings and \ref fl_attributes modules which bears the same name
|
||||
augmented with the fl_ prefix.
|
||||
prefixed with fl_ .
|
||||
*/
|
||||
class FL_EXPORT Fl_Device {
|
||||
protected:
|
||||
/** \brief The device type */
|
||||
int type_;
|
||||
/** \brief color for background and/or mixing if device does not support masking or alpha */
|
||||
uchar bg_r_, bg_g_, bg_b_;
|
||||
/** \brief red color for background and/or mixing if device does not support masking or alpha */
|
||||
uchar bg_r_;
|
||||
/** \brief green color for background and/or mixing if device does not support masking or alpha */
|
||||
uchar bg_g_;
|
||||
/** \brief blue color for background and/or mixing if device does not support masking or alpha */
|
||||
uchar bg_b_;
|
||||
friend void fl_rect(int x, int y, int w, int h);
|
||||
friend void fl_rectf(int x, int y, int w, int h);
|
||||
friend void fl_line_style(int style, int width, char* dashes);
|
||||
|
@ -95,16 +99,16 @@ protected:
|
|||
friend void fl_begin_loop();
|
||||
friend void fl_begin_polygon();
|
||||
friend void fl_vertex(double x, double y);
|
||||
friend void fl_curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3);
|
||||
friend void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3);
|
||||
friend void fl_circle(double x, double y, double r);
|
||||
friend void fl_arc(double x, double y, double r, double start, double a);
|
||||
friend void fl_arc(double x, double y, double r, double start, double end);
|
||||
friend void fl_arc(int x, int y, int w, int h, double a1, double a2);
|
||||
friend void fl_pie(int x, int y, int w, int h, double a1, double a2);
|
||||
friend void fl_end_points();
|
||||
friend void fl_end_line();
|
||||
friend void fl_end_loop();
|
||||
friend void fl_end_polygon();
|
||||
friend void fl_transformed_vertex(double x, double y);
|
||||
friend void fl_transformed_vertex(double xf, double yf);
|
||||
friend void fl_push_clip(int x, int y, int w, int h);
|
||||
friend int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H);
|
||||
friend int fl_not_clipped(int x, int y, int w, int h);
|
||||
|
@ -113,10 +117,10 @@ protected:
|
|||
friend void fl_begin_complex_polygon();
|
||||
friend void fl_gap();
|
||||
friend void fl_end_complex_polygon();
|
||||
friend void fl_draw_image(const uchar*, int,int,int,int, int delta, int ldelta);
|
||||
friend void fl_draw_image_mono(const uchar*, int,int,int,int, int delta, int ld);
|
||||
friend void fl_draw_image(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta);
|
||||
friend FL_EXPORT void fl_draw_image_mono(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta);
|
||||
friend void fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L);
|
||||
friend void fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L);
|
||||
friend void fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D);
|
||||
friend FL_EXPORT void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D);
|
||||
|
||||
/** \brief see fl_rect(int x, int y, int w, int h). */
|
||||
virtual void rect(int x, int y, int w, int h);
|
||||
|
@ -170,12 +174,12 @@ protected:
|
|||
virtual void begin_polygon();
|
||||
/** \brief see fl_vertex(double x, double y). */
|
||||
virtual void vertex(double x, double y);
|
||||
/** \brief see fl_curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3). */
|
||||
virtual void curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3);
|
||||
/** \brief see fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3). */
|
||||
virtual void curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3);
|
||||
/** \brief see fl_circle(double x, double y, double r). */
|
||||
virtual void circle(double x, double y, double r);
|
||||
/** \brief see fl_arc(double x, double y, double r, double start, double a). */
|
||||
virtual void arc(double x, double y, double r, double start, double a);
|
||||
/** \brief see fl_arc(double x, double y, double r, double start, double end). */
|
||||
virtual void arc(double x, double y, double r, double start, double end);
|
||||
/** \brief see fl_arc(int x, int y, int w, int h, double a1, double a2). */
|
||||
virtual void arc(int x, int y, int w, int h, double a1, double a2);
|
||||
/** \brief see fl_pie(int x, int y, int w, int h, double a1, double a2). */
|
||||
|
@ -194,8 +198,8 @@ protected:
|
|||
virtual void gap();
|
||||
/** \brief see fl_end_complex_polygon(). */
|
||||
virtual void end_complex_polygon();
|
||||
/** \brief see fl_transformed_vertex(double x, double y). */
|
||||
virtual void transformed_vertex(double x, double y);
|
||||
/** \brief see fl_transformed_vertex(double xf, double yf). */
|
||||
virtual void transformed_vertex(double xf, double yf);
|
||||
/** \brief see fl_push_clip(int x, int y, int w, int h). */
|
||||
virtual void push_clip(int x, int y, int w, int h);
|
||||
/** \brief see fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H). */
|
||||
|
@ -207,14 +211,14 @@ protected:
|
|||
/** \brief see fl_pop_clip(). */
|
||||
virtual void pop_clip();
|
||||
// Images
|
||||
/** \brief see fl_draw_image(const uchar*, int,int,int,int, int delta, int ldelta). */
|
||||
virtual void draw_image(const uchar*, int,int,int,int, int delta=3, int ldelta=0);
|
||||
/** \brief see fl_draw_image_mono(const uchar*, int,int,int,int, int delta, int ldelta). */
|
||||
virtual void draw_image_mono(const uchar*, int,int,int,int, int delta=1, int ld=0);
|
||||
/** \brief see fl_draw_image(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta). */
|
||||
virtual void draw_image(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta=3);
|
||||
/** \brief see fl_draw_image_mono(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta). */
|
||||
virtual void draw_image_mono(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta=1);
|
||||
/** \brief see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L). */
|
||||
virtual void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0);
|
||||
/** \brief see fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L). */
|
||||
virtual void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0);
|
||||
/** \brief see fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D). */
|
||||
virtual void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3);
|
||||
/** \brief see fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D). */
|
||||
virtual void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1);
|
||||
// Image classes
|
||||
/** \brief Draws an Fl_Pixmap object to the device.
|
||||
*
|
||||
|
@ -315,11 +319,19 @@ public:
|
|||
*/
|
||||
class Fl_Device_Plugin : public Fl_Plugin {
|
||||
public:
|
||||
/** \brief The constructor */
|
||||
Fl_Device_Plugin(const char *name)
|
||||
: Fl_Plugin(klass(), name) { }
|
||||
/** \brief Returns the class name */
|
||||
virtual const char *klass() { return "fltk:device"; }
|
||||
/** \brief Returns the plugin name */
|
||||
virtual const char *name() = 0;
|
||||
virtual int print(Fl_Abstract_Printer*, Fl_Widget*, int x, int y) { return 0; }
|
||||
/** \brief Prints a widget
|
||||
\param p the printer
|
||||
\param w the widget
|
||||
\param x,y offsets where to print relatively to coordinates origin
|
||||
*/
|
||||
virtual int print(Fl_Abstract_Printer* p, Fl_Widget* w, int x, int y) { return 0; }
|
||||
};
|
||||
|
||||
#endif // Fl_Device_H
|
||||
|
|
13
FL/fl_draw.H
13
FL/fl_draw.H
|
@ -42,6 +42,7 @@ class Fl_Image;
|
|||
|
||||
// Label flags...
|
||||
FL_EXPORT extern char fl_draw_shortcut;
|
||||
/** \brief The device that currently receives all graphics requests */
|
||||
FL_EXPORT extern Fl_Device *fl_device;
|
||||
|
||||
/** \addtogroup fl_attributes
|
||||
|
@ -56,9 +57,9 @@ FL_EXPORT extern Fl_Device *fl_device;
|
|||
then a least-squares algorithm is used to find the closest color.
|
||||
If no valid graphical context (fl_gc) is available,
|
||||
the foreground is not set for the current window.
|
||||
\param[in] i color
|
||||
\param[in] c color
|
||||
*/
|
||||
inline void fl_color(Fl_Color i) {fl_device->color(i); }; // select indexed color
|
||||
inline void fl_color(Fl_Color c) {fl_device->color(c); }; // select indexed color
|
||||
/** for back compatibility - use fl_color(Fl_Color c) instead */
|
||||
inline void fl_color(int c) {fl_color((Fl_Color)c);}
|
||||
/**
|
||||
|
@ -72,6 +73,7 @@ inline void fl_color(int c) {fl_color((Fl_Color)c);}
|
|||
\param[in] r,g,b color components
|
||||
*/
|
||||
inline void fl_color(uchar r, uchar g, uchar b) {fl_device->color(r,g,b); }; // select actual color
|
||||
/** \brief The current color */
|
||||
extern FL_EXPORT Fl_Color fl_color_;
|
||||
/**
|
||||
Returns the last fl_color() that was set.
|
||||
|
@ -296,7 +298,7 @@ inline void fl_yxline(int x, int y, int y1, int x2, int y3) {fl_device->yxline(x
|
|||
|
||||
fl_arc() draws a series of lines to approximate the arc. Notice that the
|
||||
integer version of fl_arc() has a different number of arguments than the
|
||||
double version fl_arc(double x, double y, double r, double start, double a)
|
||||
double version fl_arc(double x, double y, double r, double start, double end)
|
||||
|
||||
\param[in] x,y,w,h bounding box of complete circle
|
||||
\param[in] a1,a2 start and end angles of arc measured in degrees
|
||||
|
@ -452,7 +454,7 @@ extern FL_EXPORT Fl_Font fl_font_; ///< current font index
|
|||
This can be used to save/restore the font.
|
||||
*/
|
||||
inline Fl_Font fl_font() {return fl_font_;}
|
||||
/** current font size */
|
||||
/** \brief current font size */
|
||||
extern FL_EXPORT Fl_Fontsize fl_size_;
|
||||
/**
|
||||
Returns the \p size set by the most recent call to fl_font().
|
||||
|
@ -619,7 +621,6 @@ typedef void (*Fl_Draw_Image_Cb)(void* data,int x,int y,int w,uchar* buf);
|
|||
any visual of 8 bits or less, and all common TrueColor visuals up
|
||||
to 32 bits.
|
||||
*/
|
||||
//FL_EXPORT void fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0);
|
||||
inline void fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0)
|
||||
{ fl_device->draw_image(buf, X, Y, W, H, D, L); };
|
||||
|
||||
|
@ -627,7 +628,6 @@ inline void fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, in
|
|||
Draw a gray-scale (1 channel) image.
|
||||
\see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L)
|
||||
*/
|
||||
//FL_EXPORT void fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0);
|
||||
inline void fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0)
|
||||
{ fl_device->draw_image_mono(buf, X, Y, W, H, D, L); };
|
||||
|
||||
|
@ -663,7 +663,6 @@ inline void fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=
|
|||
|
||||
If \p D is 4 or more, you must fill in the unused bytes with zero.
|
||||
*/
|
||||
//FL_EXPORT void fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3);
|
||||
inline void fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3)
|
||||
{ fl_device->draw_image(cb, data, X, Y, W, H, D); };
|
||||
|
||||
|
|
|
@ -128,7 +128,13 @@ static void print_gl_window(Fl_Abstract_Printer *printer, Fl_Gl_Window *glw, int
|
|||
class Fl_Gl_Device_Plugin : public Fl_Device_Plugin {
|
||||
public:
|
||||
Fl_Gl_Device_Plugin() : Fl_Device_Plugin(name()) { }
|
||||
/** \brief Returns the plugin name */
|
||||
virtual const char *name() { return "opengl.device.fltk.org"; }
|
||||
/** \brief Prints a widget
|
||||
\param p the printer
|
||||
\param w the widget
|
||||
\param x,y offsets where to print relatively to coordinates origin
|
||||
*/
|
||||
virtual int print(Fl_Abstract_Printer *p, Fl_Widget *w, int x, int y) {
|
||||
Fl_Gl_Window *glw = w->as_gl_window();
|
||||
if (!glw) return 0;
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
// http://www.fltk.org/str.php
|
||||
//
|
||||
|
||||
#ifndef FL_DOXYGEN
|
||||
|
||||
#include <FL/Fl_PSfile_Device.H>
|
||||
|
||||
#include <FL/Fl.H>
|
||||
|
@ -1323,7 +1325,9 @@ void print_cb(Fl_Return_Button *, void *) {
|
|||
}
|
||||
*/
|
||||
|
||||
#endif
|
||||
#endif // ! (defined(__APPLE__) || defined(WIN32) )
|
||||
|
||||
#endif // FL_DOXYGEN
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
// Please report all bugs and problems to "fltk-bugs@fltk.org".
|
||||
//
|
||||
|
||||
|
||||
#ifndef FL_DOXYGEN
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
@ -534,6 +534,7 @@ void Fl_PSfile_Device::draw(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, i
|
|||
pop_clip();
|
||||
};
|
||||
|
||||
#endif // FL_DOXYGEN
|
||||
|
||||
//
|
||||
// End of "$Id: image.cxx 4324 2005-05-09 21:47:22Z rokan $"
|
||||
|
|
Loading…
Reference in New Issue