Fixed tab key navigation to inactive widgets (STR #2420), fixed a few pedantic warnings

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7788 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher
2010-10-31 20:47:50 +00:00
parent 48f107775d
commit 1e26ada2c5
8 changed files with 81 additions and 78 deletions
+1
View File
@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0 CHANGES IN FLTK 1.3.0
- Fixed tab key navigation to inactive widgets (STR #2420)
- Fixed outside label redraw damage areas (STR #2436) - Fixed outside label redraw damage areas (STR #2436)
- Added callback when double-clicking file in a file chooser - Added callback when double-clicking file in a file chooser
(STR #2346) (STR #2346)
+1 -1
View File
@@ -50,7 +50,7 @@ public:
NO_OPTIONS = 0x0000, // no options enabled NO_OPTIONS = 0x0000, // no options enabled
SAVEAS_CONFIRM = 0x0001, // Show native 'Save As' overwrite confirm dialog (if supported) SAVEAS_CONFIRM = 0x0001, // Show native 'Save As' overwrite confirm dialog (if supported)
NEW_FOLDER = 0x0002, // Show 'New Folder' icon (if supported) NEW_FOLDER = 0x0002, // Show 'New Folder' icon (if supported)
PREVIEW = 0x0004, // enable preview mode PREVIEW = 0x0004 // enable preview mode
}; };
private: private:
int _btype; // kind-of browser to show() int _btype; // kind-of browser to show()
+1 -1
View File
@@ -99,7 +99,7 @@ public:
Fl_Preferences( Fl_Preferences *parent, int groupIndex ); Fl_Preferences( Fl_Preferences *parent, int groupIndex );
Fl_Preferences(const Fl_Preferences&); Fl_Preferences(const Fl_Preferences&);
Fl_Preferences( ID id ); Fl_Preferences( ID id );
~Fl_Preferences(); virtual ~Fl_Preferences();
/** Return an ID that can later be reused to open more references to this dataset. /** Return an ID that can later be reused to open more references to this dataset.
*/ */
+3 -1
View File
@@ -752,7 +752,9 @@ public:
&& visible()) but is faster. && visible()) but is faster.
\retval 0 if the widget takes no events \retval 0 if the widget takes no events
*/ */
unsigned int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));} unsigned int takesevents() const {
return !output() && active_r() && visible_r();
}
/** /**
Checks if the widget value changed since the last callback. Checks if the widget value changed since the last callback.
+48 -48
View File
@@ -57,7 +57,7 @@ FL_EXPORT extern char fl_draw_shortcut;
the foreground is not set for the current window. the foreground is not set for the current window.
\param[in] c color \param[in] c color
*/ */
inline void fl_color(Fl_Color c) {fl_graphics_driver->color(c); }; // select indexed color inline void fl_color(Fl_Color c) {fl_graphics_driver->color(c); } // select indexed color
/** for back compatibility - use fl_color(Fl_Color c) instead */ /** for back compatibility - use fl_color(Fl_Color c) instead */
inline void fl_color(int c) {fl_color((Fl_Color)c);} inline void fl_color(int c) {fl_color((Fl_Color)c);}
/** /**
@@ -70,7 +70,7 @@ inline void fl_color(int c) {fl_color((Fl_Color)c);}
the foreground is not set for the current window. the foreground is not set for the current window.
\param[in] r,g,b color components \param[in] r,g,b color components
*/ */
inline void fl_color(uchar r, uchar g, uchar b) {fl_graphics_driver->color(r,g,b); }; // select actual color inline void fl_color(uchar r, uchar g, uchar b) {fl_graphics_driver->color(r,g,b); } // select actual color
/** \brief The current color */ /** \brief The current color */
extern FL_EXPORT Fl_Color fl_color_; extern FL_EXPORT Fl_Color fl_color_;
/** /**
@@ -89,13 +89,13 @@ inline Fl_Color fl_color() {return fl_color_;}
new region onto the stack. new region onto the stack.
\param[in] x,y,w,h position and size \param[in] x,y,w,h position and size
*/ */
inline void fl_push_clip(int x, int y, int w, int h) {fl_graphics_driver->push_clip(x,y,w,h); }; inline void fl_push_clip(int x, int y, int w, int h) {fl_graphics_driver->push_clip(x,y,w,h); }
/** The fl_clip() name is deprecated and will be removed from future releases */ /** The fl_clip() name is deprecated and will be removed from future releases */
#define fl_clip fl_push_clip #define fl_clip fl_push_clip
/** /**
Pushes an empty clip region onto the stack so nothing will be clipped. Pushes an empty clip region onto the stack so nothing will be clipped.
*/ */
inline void fl_push_no_clip() {fl_graphics_driver->push_no_clip(); }; inline void fl_push_no_clip() {fl_graphics_driver->push_no_clip(); }
/** /**
Restores the previous clip region. Restores the previous clip region.
@@ -103,7 +103,7 @@ inline void fl_push_no_clip() {fl_graphics_driver->push_no_clip(); };
Unpredictable results may occur if the clip stack is not empty when Unpredictable results may occur if the clip stack is not empty when
you return to FLTK. you return to FLTK.
*/ */
inline void fl_pop_clip() {fl_graphics_driver->pop_clip(); }; inline void fl_pop_clip() {fl_graphics_driver->pop_clip(); }
/** /**
Does the rectangle intersect the current clip region? Does the rectangle intersect the current clip region?
\param[in] x,y,w,h position and size of rectangle \param[in] x,y,w,h position and size of rectangle
@@ -114,7 +114,7 @@ inline void fl_pop_clip() {fl_graphics_driver->pop_clip(); };
Under X this returns 2 if the rectangle is partially clipped, Under X this returns 2 if the rectangle is partially clipped,
and 1 if it is entirely inside the clip region. and 1 if it is entirely inside the clip region.
*/ */
inline int fl_not_clipped(int x, int y, int w, int h) {return fl_graphics_driver->not_clipped(x,y,w,h); }; inline int fl_not_clipped(int x, int y, int w, int h) {return fl_graphics_driver->not_clipped(x,y,w,h); }
/** /**
Intersects the rectangle with the current clip region and returns the Intersects the rectangle with the current clip region and returns the
bounding box of the result. bounding box of the result.
@@ -130,7 +130,7 @@ inline int fl_not_clipped(int x, int y, int w, int h) {return fl_graphics_driver
\returns Non-zero if the resulting rectangle is different to the original. \returns Non-zero if the resulting rectangle is different to the original.
*/ */
inline int fl_clip_box(int x , int y, int w, int h, int& X, int& Y, int& W, int& H) inline int fl_clip_box(int x , int y, int w, int h, int& X, int& Y, int& W, int& H)
{return fl_graphics_driver->clip_box(x,y,w,h,X,Y,W,H); }; {return fl_graphics_driver->clip_box(x,y,w,h,X,Y,W,H); }
/** Undoes any clobbering of clip done by your program */ /** Undoes any clobbering of clip done by your program */
extern void fl_restore_clip(); extern void fl_restore_clip();
/** /**
@@ -150,7 +150,7 @@ extern Fl_Region fl_clip_region();
/** /**
Draws a single pixel at the given coordinates Draws a single pixel at the given coordinates
*/ */
inline void fl_point(int x, int y) { fl_graphics_driver->point(x,y); }; inline void fl_point(int x, int y) { fl_graphics_driver->point(x,y); }
// line type: // line type:
/** /**
@@ -180,7 +180,7 @@ inline void fl_point(int x, int y) { fl_graphics_driver->point(x,y); };
\note The \p dashes array does not work under Windows 95, 98 or Me, \note The \p dashes array does not work under Windows 95, 98 or Me,
since those operating systems do not support complex line styles. since those operating systems do not support complex line styles.
*/ */
inline void fl_line_style(int style, int width=0, char* dashes=0) {fl_graphics_driver->line_style(style,width,dashes); }; inline void fl_line_style(int style, int width=0, char* dashes=0) {fl_graphics_driver->line_style(style,width,dashes); }
enum { enum {
FL_SOLID = 0, ///< line style: <tt>___________</tt> FL_SOLID = 0, ///< line style: <tt>___________</tt>
FL_DASH = 1, ///< line style: <tt>_ _ _ _ _ _</tt> FL_DASH = 1, ///< line style: <tt>_ _ _ _ _ _</tt>
@@ -204,12 +204,12 @@ enum {
This function is meant for quick drawing of simple boxes. The behavior is This function is meant for quick drawing of simple boxes. The behavior is
undefined for line widths that are not 1. undefined for line widths that are not 1.
*/ */
inline void fl_rect(int x, int y, int w, int h) { fl_graphics_driver->rect(x,y,w,h); }; inline void fl_rect(int x, int y, int w, int h) { fl_graphics_driver->rect(x,y,w,h); }
/** Draws with passed color a 1-pixel border \e inside the given bounding box */ /** Draws with passed color a 1-pixel border \e inside the given bounding box */
inline void fl_rect(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rect(x,y,w,h);} inline void fl_rect(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rect(x,y,w,h);}
/** Colors with current color a rectangle that exactly fills the given bounding box */ /** Colors with current color a rectangle that exactly fills the given bounding box */
inline void fl_rectf(int x, int y, int w, int h) { fl_graphics_driver->rectf(x,y,w,h); }; inline void fl_rectf(int x, int y, int w, int h) { fl_graphics_driver->rectf(x,y,w,h); }
/** Colors with passsed color a rectangle that exactly fills the given bounding box */ /** Colors with passsed color a rectangle that exactly fills the given bounding box */
inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rectf(x,y,w,h);} inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rectf(x,y,w,h);}
@@ -226,63 +226,63 @@ FL_EXPORT void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b);
/** /**
Draws a line from (x,y) to (x1,y1) Draws a line from (x,y) to (x1,y1)
*/ */
inline void fl_line(int x, int y, int x1, int y1) {fl_graphics_driver->line(x,y,x1,y1); }; inline void fl_line(int x, int y, int x1, int y1) {fl_graphics_driver->line(x,y,x1,y1); }
/** /**
Draws a line from (x,y) to (x1,y1) and another from (x1,y1) to (x2,y2) Draws a line from (x,y) to (x1,y1) and another from (x1,y1) to (x2,y2)
*/ */
inline void fl_line(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->line(x,y,x1,y1,x2,y2); }; inline void fl_line(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->line(x,y,x1,y1,x2,y2); }
// closed line segments: // closed line segments:
/** /**
Outlines a 3-sided polygon with lines Outlines a 3-sided polygon with lines
*/ */
inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->loop(x,y,x1,y1,x2,y2); }; inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->loop(x,y,x1,y1,x2,y2); }
/** /**
Outlines a 4-sided polygon with lines Outlines a 4-sided polygon with lines
*/ */
inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3)
{fl_graphics_driver->loop(x,y,x1,y1,x2,y2,x3,y3); }; {fl_graphics_driver->loop(x,y,x1,y1,x2,y2,x3,y3); }
// filled polygons // filled polygons
/** /**
Fills a 3-sided polygon. The polygon must be convex. Fills a 3-sided polygon. The polygon must be convex.
*/ */
inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->polygon(x,y,x1,y1,x2,y2); }; inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->polygon(x,y,x1,y1,x2,y2); }
/** /**
Fills a 4-sided polygon. The polygon must be convex. Fills a 4-sided polygon. The polygon must be convex.
*/ */
inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3)
{ fl_graphics_driver->polygon(x,y,x1,y1,x2,y2,x3,y3); }; { fl_graphics_driver->polygon(x,y,x1,y1,x2,y2,x3,y3); }
// draw rectilinear lines, horizontal segment first: // draw rectilinear lines, horizontal segment first:
/** /**
Draws a horizontal line from (x,y) to (x1,y) Draws a horizontal line from (x,y) to (x1,y)
*/ */
inline void fl_xyline(int x, int y, int x1) {fl_graphics_driver->xyline(x,y,x1);}; inline void fl_xyline(int x, int y, int x1) {fl_graphics_driver->xyline(x,y,x1);}
/** /**
Draws a horizontal line from (x,y) to (x1,y), then vertical from (x1,y) to (x1,y2) Draws a horizontal line from (x,y) to (x1,y), then vertical from (x1,y) to (x1,y2)
*/ */
inline void fl_xyline(int x, int y, int x1, int y2) {fl_graphics_driver->xyline(x,y,x1,y2);}; inline void fl_xyline(int x, int y, int x1, int y2) {fl_graphics_driver->xyline(x,y,x1,y2);}
/** /**
Draws a horizontal line from (x,y) to (x1,y), then a vertical from (x1,y) to (x1,y2) Draws a horizontal line from (x,y) to (x1,y), then a vertical from (x1,y) to (x1,y2)
and then another horizontal from (x1,y2) to (x3,y2) and then another horizontal from (x1,y2) to (x3,y2)
*/ */
inline void fl_xyline(int x, int y, int x1, int y2, int x3) {fl_graphics_driver->xyline(x,y,x1,y2,x3);}; inline void fl_xyline(int x, int y, int x1, int y2, int x3) {fl_graphics_driver->xyline(x,y,x1,y2,x3);}
// draw rectilinear lines, vertical segment first: // draw rectilinear lines, vertical segment first:
/** /**
Draws a vertical line from (x,y) to (x,y1) Draws a vertical line from (x,y) to (x,y1)
*/ */
inline void fl_yxline(int x, int y, int y1) {fl_graphics_driver->yxline(x,y,y1);}; inline void fl_yxline(int x, int y, int y1) {fl_graphics_driver->yxline(x,y,y1);}
/** /**
Draws a vertical line from (x,y) to (x,y1), then a horizontal from (x,y1) to (x2,y1) Draws a vertical line from (x,y) to (x,y1), then a horizontal from (x,y1) to (x2,y1)
*/ */
inline void fl_yxline(int x, int y, int y1, int x2) {fl_graphics_driver->yxline(x,y,y1,x2);}; inline void fl_yxline(int x, int y, int y1, int x2) {fl_graphics_driver->yxline(x,y,y1,x2);}
/** /**
Draws a vertical line from (x,y) to (x,y1) then a horizontal from (x,y1) Draws a vertical line from (x,y) to (x,y1) then a horizontal from (x,y1)
to (x2,y1), then another vertical from (x2,y1) to (x2,y3) to (x2,y1), then another vertical from (x2,y1) to (x2,y3)
*/ */
inline void fl_yxline(int x, int y, int y1, int x2, int y3) {fl_graphics_driver->yxline(x,y,y1,x2,y3);}; inline void fl_yxline(int x, int y, int y1, int x2, int y3) {fl_graphics_driver->yxline(x,y,y1,x2,y3);}
// circular lines and pie slices (code in fl_arci.C): // circular lines and pie slices (code in fl_arci.C):
/** /**
@@ -307,7 +307,7 @@ inline void fl_yxline(int x, int y, int y1, int x2, int y3) {fl_graphics_driver-
counter-clockwise from 3 o'clock. \p a2 must be greater counter-clockwise from 3 o'clock. \p a2 must be greater
than or equal to \p a1. than or equal to \p a1.
*/ */
inline void fl_arc(int x, int y, int w, int h, double a1, double a2) {fl_graphics_driver->arc(x,y,w,h,a1,a2); }; inline void fl_arc(int x, int y, int w, int h, double a1, double a2) {fl_graphics_driver->arc(x,y,w,h,a1,a2); }
/** /**
Draw filled ellipse sections using integer coordinates. Draw filled ellipse sections using integer coordinates.
@@ -320,7 +320,7 @@ inline void fl_arc(int x, int y, int w, int h, double a1, double a2) {fl_graphic
counter-clockwise from 3 o'clock. \p a2 must be greater counter-clockwise from 3 o'clock. \p a2 must be greater
than or equal to \p a1. than or equal to \p a1.
*/ */
inline void fl_pie(int x, int y, int w, int h, double a1, double a2) {fl_graphics_driver->pie(x,y,w,h,a1,a2); }; inline void fl_pie(int x, int y, int w, int h, double a1, double a2) {fl_graphics_driver->pie(x,y,w,h,a1,a2); }
/** fl_chord declaration is a place holder - the function does not yet exist */ /** fl_chord declaration is a place holder - the function does not yet exist */
FL_EXPORT void fl_chord(int x, int y, int w, int h, double a1, double a2); // nyi FL_EXPORT void fl_chord(int x, int y, int w, int h, double a1, double a2); // nyi
@@ -335,24 +335,24 @@ FL_EXPORT void fl_mult_matrix(double a, double b, double c, double d, double x,d
/** /**
Starts drawing a list of points. Points are added to the list with fl_vertex() Starts drawing a list of points. Points are added to the list with fl_vertex()
*/ */
inline void fl_begin_points() {fl_graphics_driver->begin_points(); }; inline void fl_begin_points() {fl_graphics_driver->begin_points(); }
/** /**
Starts drawing a list of lines. Starts drawing a list of lines.
*/ */
inline void fl_begin_line() {fl_graphics_driver->begin_line(); }; inline void fl_begin_line() {fl_graphics_driver->begin_line(); }
/** /**
Starts drawing a closed sequence of lines. Starts drawing a closed sequence of lines.
*/ */
inline void fl_begin_loop() {fl_graphics_driver->begin_loop(); }; inline void fl_begin_loop() {fl_graphics_driver->begin_loop(); }
/** /**
Starts drawing a convex filled polygon. Starts drawing a convex filled polygon.
*/ */
inline void fl_begin_polygon() {fl_graphics_driver->begin_polygon(); }; inline void fl_begin_polygon() {fl_graphics_driver->begin_polygon(); }
/** /**
Adds a single vertex to the current path. Adds a single vertex to the current path.
\param[in] x,y coordinate \param[in] x,y coordinate
*/ */
inline void fl_vertex(double x, double y) {fl_graphics_driver->vertex(x,y); }; inline void fl_vertex(double x, double y) {fl_graphics_driver->vertex(x,y); }
/** /**
Add a series of points on a Bezier curve to the path. Add a series of points on a Bezier curve to the path.
The curve ends (and two of the points) are at X0,Y0 and X3,Y3. The curve ends (and two of the points) are at X0,Y0 and X3,Y3.
@@ -362,7 +362,7 @@ inline void fl_vertex(double x, double y) {fl_graphics_driver->vertex(x,y); };
\param[in] X3,Y3 curve end point \param[in] X3,Y3 curve end point
*/ */
inline void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3) inline void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3)
{fl_graphics_driver->curve(X0,Y0,X1,Y1,X2,Y2,X3,Y3); }; {fl_graphics_driver->curve(X0,Y0,X1,Y1,X2,Y2,X3,Y3); }
/** /**
Add a series of points to the current path on the arc of a circle; you Add a series of points to the current path on the arc of a circle; you
can get elliptical paths by using scale and rotate before calling fl_arc(). can get elliptical paths by using scale and rotate before calling fl_arc().
@@ -371,7 +371,7 @@ inline void fl_curve(double X0, double Y0, double X1, double Y1, double X2, doub
counter-clockwise from 3 o'clock. If \p end is less than \p start counter-clockwise from 3 o'clock. If \p end is less than \p start
then it draws the arc in a clockwise direction. then it draws the arc in a clockwise direction.
*/ */
inline void fl_arc(double x, double y, double r, double start, double end) {fl_graphics_driver->arc(x,y,r,start,end); }; inline void fl_arc(double x, double y, double r, double start, double end) {fl_graphics_driver->arc(x,y,r,start,end); }
/** /**
fl_circle() is equivalent to fl_arc(x,y,r,0,360), but may be faster. fl_circle() is equivalent to fl_arc(x,y,r,0,360), but may be faster.
@@ -379,23 +379,23 @@ inline void fl_arc(double x, double y, double r, double start, double end) {fl_g
a complex polygon you must use fl_arc() a complex polygon you must use fl_arc()
\param[in] x,y,r center and radius of circle \param[in] x,y,r center and radius of circle
*/ */
inline void fl_circle(double x, double y, double r) {fl_graphics_driver->circle(x,y,r); }; inline void fl_circle(double x, double y, double r) {fl_graphics_driver->circle(x,y,r); }
/** /**
Ends list of points, and draws. Ends list of points, and draws.
*/ */
inline void fl_end_points() {fl_graphics_driver->end_points(); }; inline void fl_end_points() {fl_graphics_driver->end_points(); }
/** /**
Ends list of lines, and draws. Ends list of lines, and draws.
*/ */
inline void fl_end_line() {fl_graphics_driver->end_line(); }; inline void fl_end_line() {fl_graphics_driver->end_line(); }
/** /**
Ends closed sequence of lines, and draws. Ends closed sequence of lines, and draws.
*/ */
inline void fl_end_loop() {fl_graphics_driver->end_loop(); }; inline void fl_end_loop() {fl_graphics_driver->end_loop(); }
/** /**
Ends convex filled polygon, and draws. Ends convex filled polygon, and draws.
*/ */
inline void fl_end_polygon() {fl_graphics_driver->end_polygon(); }; inline void fl_end_polygon() {fl_graphics_driver->end_polygon(); }
/** /**
Starts drawing a complex filled polygon. Starts drawing a complex filled polygon.
@@ -410,18 +410,18 @@ inline void fl_end_polygon() {fl_graphics_driver->end_polygon(); };
whether "even/odd" or "non-zero" winding rules are used to fill them. whether "even/odd" or "non-zero" winding rules are used to fill them.
Holes should be drawn in the opposite direction to the outside loop. Holes should be drawn in the opposite direction to the outside loop.
*/ */
inline void fl_begin_complex_polygon() {fl_graphics_driver->begin_complex_polygon(); }; inline void fl_begin_complex_polygon() {fl_graphics_driver->begin_complex_polygon(); }
/** /**
Call fl_gap() to separate loops of the path. Call fl_gap() to separate loops of the path.
It is unnecessary but harmless to call fl_gap() before the first vertex, It is unnecessary but harmless to call fl_gap() before the first vertex,
after the last vertex, or several times in a row. after the last vertex, or several times in a row.
*/ */
inline void fl_gap() {fl_graphics_driver->gap(); }; inline void fl_gap() {fl_graphics_driver->gap(); }
/** /**
Ends complex filled polygon, and draws. Ends complex filled polygon, and draws.
*/ */
inline void fl_end_complex_polygon() {fl_graphics_driver->end_complex_polygon(); }; inline void fl_end_complex_polygon() {fl_graphics_driver->end_complex_polygon(); }
// get and use transformed positions: // get and use transformed positions:
FL_EXPORT double fl_transform_x(double x, double y); FL_EXPORT double fl_transform_x(double x, double y);
FL_EXPORT double fl_transform_y(double x, double y); FL_EXPORT double fl_transform_y(double x, double y);
@@ -431,7 +431,7 @@ FL_EXPORT double fl_transform_dy(double x, double y);
Adds coordinate pair to the vertex list without further transformations. Adds coordinate pair to the vertex list without further transformations.
\param[in] xf,yf transformed coordinate \param[in] xf,yf transformed coordinate
*/ */
inline void fl_transformed_vertex(double xf, double yf) {fl_graphics_driver->transformed_vertex(xf,yf); }; inline void fl_transformed_vertex(double xf, double yf) {fl_graphics_driver->transformed_vertex(xf,yf); }
/** @} */ /** @} */
/** \addtogroup fl_attributes /** \addtogroup fl_attributes
@@ -448,7 +448,7 @@ inline void fl_transformed_vertex(double xf, double yf) {fl_graphics_driver->tra
The size of the font is measured in pixels and not "points". The size of the font is measured in pixels and not "points".
Lines should be spaced \p size pixels apart or more. Lines should be spaced \p size pixels apart or more.
*/ */
inline void fl_font(Fl_Font face, Fl_Fontsize size) { fl_graphics_driver->font(face,size); }; inline void fl_font(Fl_Font face, Fl_Fontsize size) { fl_graphics_driver->font(face,size); }
extern FL_EXPORT Fl_Font fl_font_; ///< current font index extern FL_EXPORT Fl_Font fl_font_; ///< current font index
/** /**
@@ -554,16 +554,16 @@ FL_EXPORT void fl_draw(int angle, const char* str, int x, int y);
/** /**
Draws an array of \p n characters starting at the given location. Draws an array of \p n characters starting at the given location.
*/ */
inline void fl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->draw(str,n,x,y); }; inline void fl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->draw(str,n,x,y); }
/** /**
Draws an array of \p n characters starting at the given location, Draws an array of \p n characters starting at the given location,
rotating \p angle degrees counterclockwise. rotating \p angle degrees counterclockwise.
*/ */
inline void fl_draw(int angle,const char* str, int n, int x, int y) {fl_graphics_driver->draw(angle,str,n,x,y); }; inline void fl_draw(int angle,const char* str, int n, int x, int y) {fl_graphics_driver->draw(angle,str,n,x,y); }
/** /**
Draws an array of \p n characters right to left starting at given location. Draws an array of \p n characters right to left starting at given location.
*/ */
inline void fl_rtl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->rtl_draw(str,n,x,y); }; inline void fl_rtl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->rtl_draw(str,n,x,y); }
FL_EXPORT void fl_measure(const char* str, int& x, int& y, FL_EXPORT void fl_measure(const char* str, int& x, int& y,
int draw_symbols = 1); int draw_symbols = 1);
FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h, FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h,
@@ -615,14 +615,14 @@ FL_EXPORT void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color);
to 32 bits. to 32 bits.
*/ */
inline 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_graphics_driver->draw_image(buf, X, Y, W, H, D, L); }; { fl_graphics_driver->draw_image(buf, X, Y, W, H, D, L); }
/** /**
Draw a gray-scale (1 channel) image. 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) \see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L)
*/ */
inline 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_graphics_driver->draw_image_mono(buf, X, Y, W, H, D, L); }; { fl_graphics_driver->draw_image_mono(buf, X, Y, W, H, D, L); }
/** /**
Draw image using callback function to generate image data. Draw image using callback function to generate image data.
@@ -657,7 +657,7 @@ 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. If \p D is 4 or more, you must fill in the unused bytes with zero.
*/ */
inline 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_graphics_driver->draw_image(cb, data, X, Y, W, H, D); }; { fl_graphics_driver->draw_image(cb, data, X, Y, W, H, D); }
/** /**
Draw gray-scale image using callback function to generate image data. Draw gray-scale image using callback function to generate image data.
+21 -21
View File
@@ -699,7 +699,7 @@ void Fl_PostScript_Graphics_Driver::page(double pw, double ph, int media) {
} }
} }
fprintf(output, "GS\nCS\n"); fprintf(output, "GS\nCS\n");
}; }
void Fl_PostScript_Graphics_Driver::page(int format){ void Fl_PostScript_Graphics_Driver::page(int format){
@@ -712,7 +712,7 @@ void Fl_PostScript_Graphics_Driver::page(int format){
ph_=Fl_PostScript_Graphics_Driver::page_formats[format & 0xFF].height; ph_=Fl_PostScript_Graphics_Driver::page_formats[format & 0xFF].height;
} }
page(pw_,ph_,format & 0xFF00);//,orientation only; page(pw_,ph_,format & 0xFF00);//,orientation only;
}; }
void Fl_PostScript_Graphics_Driver::rect(int x, int y, int w, int h) { void Fl_PostScript_Graphics_Driver::rect(int x, int y, int w, int h) {
// Commented code does not work, i can't find the bug ;-( // Commented code does not work, i can't find the bug ;-(
@@ -758,7 +758,7 @@ void Fl_PostScript_Graphics_Driver::xyline(int x, int y, int x1, int y2, int x3)
fprintf(output,"%i %i LT\n", x3 , y2); fprintf(output,"%i %i LT\n", x3 , y2);
fprintf(output, "ELP\n"); fprintf(output, "ELP\n");
fprintf(output, "GR\n"); fprintf(output, "GR\n");
}; }
void Fl_PostScript_Graphics_Driver::xyline(int x, int y, int x1, int y2){ void Fl_PostScript_Graphics_Driver::xyline(int x, int y, int x1, int y2){
@@ -770,7 +770,7 @@ void Fl_PostScript_Graphics_Driver::xyline(int x, int y, int x1, int y2){
fprintf(output, "%i %i LT\n", x1 , y2 ); fprintf(output, "%i %i LT\n", x1 , y2 );
fprintf(output, "ELP\n"); fprintf(output, "ELP\n");
fprintf(output, "GR\n"); fprintf(output, "GR\n");
}; }
void Fl_PostScript_Graphics_Driver::xyline(int x, int y, int x1){ void Fl_PostScript_Graphics_Driver::xyline(int x, int y, int x1){
fprintf(output, "GS\n"); fprintf(output, "GS\n");
@@ -780,7 +780,7 @@ void Fl_PostScript_Graphics_Driver::xyline(int x, int y, int x1){
fprintf(output, "ELP\n"); fprintf(output, "ELP\n");
fprintf(output, "GR\n"); fprintf(output, "GR\n");
}; }
void Fl_PostScript_Graphics_Driver::yxline(int x, int y, int y1, int x2, int y3){ void Fl_PostScript_Graphics_Driver::yxline(int x, int y, int y1, int x2, int y3){
fprintf(output, "GS\n"); fprintf(output, "GS\n");
@@ -792,7 +792,7 @@ void Fl_PostScript_Graphics_Driver::yxline(int x, int y, int y1, int x2, int y3)
fprintf(output , "%i %i LT\n", x2 , y3); fprintf(output , "%i %i LT\n", x2 , y3);
fprintf(output, "ELP\n"); fprintf(output, "ELP\n");
fprintf(output, "GR\n"); fprintf(output, "GR\n");
}; }
void Fl_PostScript_Graphics_Driver::yxline(int x, int y, int y1, int x2){ void Fl_PostScript_Graphics_Driver::yxline(int x, int y, int y1, int x2){
fprintf(output, "GS\n"); fprintf(output, "GS\n");
@@ -802,7 +802,7 @@ void Fl_PostScript_Graphics_Driver::yxline(int x, int y, int y1, int x2){
fprintf(output, "%i %i LT\n", x2 , y1); fprintf(output, "%i %i LT\n", x2 , y1);
fprintf(output, "ELP\n"); fprintf(output, "ELP\n");
fprintf(output, "GR\n"); fprintf(output, "GR\n");
}; }
void Fl_PostScript_Graphics_Driver::yxline(int x, int y, int y1){ void Fl_PostScript_Graphics_Driver::yxline(int x, int y, int y1){
fprintf(output, "GS\n"); fprintf(output, "GS\n");
@@ -811,7 +811,7 @@ void Fl_PostScript_Graphics_Driver::yxline(int x, int y, int y1){
fprintf(output, "%i %i LT\n", x , y1); fprintf(output, "%i %i LT\n", x , y1);
fprintf(output, "ELP\n"); fprintf(output, "ELP\n");
fprintf(output, "GR\n"); fprintf(output, "GR\n");
}; }
void Fl_PostScript_Graphics_Driver::loop(int x0, int y0, int x1, int y1, int x2, int y2) { void Fl_PostScript_Graphics_Driver::loop(int x0, int y0, int x1, int y1, int x2, int y2) {
fprintf(output, "GS\n"); fprintf(output, "GS\n");
@@ -936,7 +936,7 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
} }
} }
fprintf(output, "] 0 setdash\n"); fprintf(output, "] 0 setdash\n");
}; }
static const char *_fontNames[] = { static const char *_fontNames[] = {
"Helvetica2B", "Helvetica2B",
@@ -964,7 +964,7 @@ void Fl_PostScript_Graphics_Driver::font(int f, int s) {
fprintf(output,"%i FS\n", s); fprintf(output,"%i FS\n", s);
Fl_Display_Device::display_device()->driver()->font(f,s); // Use display fonts for font measurement Fl_Display_Device::display_device()->driver()->font(f,s); // Use display fonts for font measurement
font_ = f; size_ = s; font_ = f; size_ = s;
}; }
void Fl_PostScript_Graphics_Driver::color(Fl_Color c) { void Fl_PostScript_Graphics_Driver::color(Fl_Color c) {
Fl::get_color(c, cr_, cg_, cb_); Fl::get_color(c, cr_, cg_, cb_);
@@ -1146,7 +1146,7 @@ void Fl_PostScript_Graphics_Driver::begin_points(){
fprintf(output, "BP\n"); fprintf(output, "BP\n");
gap_=1; gap_=1;
shape_=POINTS; shape_=POINTS;
}; }
void Fl_PostScript_Graphics_Driver::begin_line(){ void Fl_PostScript_Graphics_Driver::begin_line(){
fprintf(output, "GS\n"); fprintf(output, "GS\n");
@@ -1154,7 +1154,7 @@ void Fl_PostScript_Graphics_Driver::begin_line(){
fprintf(output, "BP\n"); fprintf(output, "BP\n");
gap_=1; gap_=1;
shape_=LINE; shape_=LINE;
}; }
void Fl_PostScript_Graphics_Driver::begin_loop(){ void Fl_PostScript_Graphics_Driver::begin_loop(){
fprintf(output, "GS\n"); fprintf(output, "GS\n");
@@ -1162,7 +1162,7 @@ void Fl_PostScript_Graphics_Driver::begin_loop(){
fprintf(output, "BP\n"); fprintf(output, "BP\n");
gap_=1; gap_=1;
shape_=LOOP; shape_=LOOP;
}; }
void Fl_PostScript_Graphics_Driver::begin_polygon(){ void Fl_PostScript_Graphics_Driver::begin_polygon(){
fprintf(output, "GS\n"); fprintf(output, "GS\n");
@@ -1170,7 +1170,7 @@ void Fl_PostScript_Graphics_Driver::begin_polygon(){
fprintf(output, "BP\n"); fprintf(output, "BP\n");
gap_=1; gap_=1;
shape_=POLYGON; shape_=POLYGON;
}; }
void Fl_PostScript_Graphics_Driver::vertex(double x, double y){ void Fl_PostScript_Graphics_Driver::vertex(double x, double y){
if(shape_==POINTS){ if(shape_==POINTS){
@@ -1183,7 +1183,7 @@ void Fl_PostScript_Graphics_Driver::vertex(double x, double y){
gap_=0; gap_=0;
}else }else
fprintf(output, "%g %g LT\n", x , y); fprintf(output, "%g %g LT\n", x , y);
}; }
void Fl_PostScript_Graphics_Driver::curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3){ void Fl_PostScript_Graphics_Driver::curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3){
if(shape_==NONE) return; if(shape_==NONE) return;
@@ -1194,7 +1194,7 @@ void Fl_PostScript_Graphics_Driver::curve(double x, double y, double x1, double
gap_=0; gap_=0;
fprintf(output, "%g %g %g %g %g %g curveto \n", x1 , y1 , x2 , y2 , x3 , y3); fprintf(output, "%g %g %g %g %g %g curveto \n", x1 , y1 , x2 , y2 , x3 , y3);
}; }
void Fl_PostScript_Graphics_Driver::circle(double x, double y, double r){ void Fl_PostScript_Graphics_Driver::circle(double x, double y, double r){
@@ -1210,7 +1210,7 @@ void Fl_PostScript_Graphics_Driver::circle(double x, double y, double r){
fprintf(output, "%g %g %g 0 360 arc\n", x , y , r); fprintf(output, "%g %g %g 0 360 arc\n", x , y , r);
}; }
void Fl_PostScript_Graphics_Driver::arc(double x, double y, double r, double start, double a){ void Fl_PostScript_Graphics_Driver::arc(double x, double y, double r, double start, double a){
if(shape_==NONE) return; if(shape_==NONE) return;
@@ -1220,7 +1220,7 @@ void Fl_PostScript_Graphics_Driver::arc(double x, double y, double r, double sta
else else
fprintf(output, "%g %g %g %g %g arcn\n", x , y , r , -start, -a); fprintf(output, "%g %g %g %g %g arcn\n", x , y , r , -start, -a);
}; }
void Fl_PostScript_Graphics_Driver::arc(int x, int y, int w, int h, double a1, double a2) { void Fl_PostScript_Graphics_Driver::arc(int x, int y, int w, int h, double a1, double a2) {
fprintf(output, "GS\n"); fprintf(output, "GS\n");
@@ -1293,7 +1293,7 @@ void Fl_PostScript_Graphics_Driver::transformed_vertex(double x, double y){
}else }else
fprintf(output, "%g %g LT\n", x , y); fprintf(output, "%g %g LT\n", x , y);
concat(); concat();
}; }
///////////////////////////// Clipping ///////////////////////////////////////////// ///////////////////////////// Clipping /////////////////////////////////////////////
@@ -1366,7 +1366,7 @@ int Fl_PostScript_Graphics_Driver::clip_box(int x, int y, int w, int h, int &X,
return 1; return 1;
} }
return ret; return ret;
}; }
int Fl_PostScript_Graphics_Driver::not_clipped(int x, int y, int w, int h){ int Fl_PostScript_Graphics_Driver::not_clipped(int x, int y, int w, int h){
if(!clip_) return 1; if(!clip_) return 1;
@@ -1375,7 +1375,7 @@ int Fl_PostScript_Graphics_Driver::not_clipped(int x, int y, int w, int h){
clip_box(x, y, w, h, X, Y, W, H); clip_box(x, y, w, h, X, Y, W, H);
if(W) return 1; if(W) return 1;
return 0; return 0;
}; }
void Fl_PostScript_File_Device::margins(int *left, int *top, int *right, int *bottom) // to implement void Fl_PostScript_File_Device::margins(int *left, int *top, int *right, int *bottom) // to implement
+1 -1
View File
@@ -60,7 +60,7 @@ extern "C" {
extern "C" { extern "C" {
int XUtf8Tolower(int ucs); int XUtf8Tolower(int ucs);
unsigned short XUtf8IsNonSpacing(unsigned int ucs); unsigned short XUtf8IsNonSpacing(unsigned int ucs);
}; }
#else // X-windows platform #else // X-windows platform
+5 -5
View File
@@ -260,7 +260,7 @@ void Fl_PostScript_Graphics_Driver::draw_scaled_image(const uchar *data, double
fprintf(output," >\nrestore\n" ); fprintf(output," >\nrestore\n" );
}; }
void Fl_PostScript_Graphics_Driver::draw_scaled_image(Fl_Draw_Image_Cb call, void *data, double x, double y, double w, double h, int iw, int ih, int D) { void Fl_PostScript_Graphics_Driver::draw_scaled_image(Fl_Draw_Image_Cb call, void *data, double x, double y, double w, double h, int iw, int ih, int D) {
@@ -405,7 +405,7 @@ void Fl_PostScript_Graphics_Driver::draw_scaled_image_mono(const uchar *data, do
fprintf(output," >\nrestore\n" ); fprintf(output," >\nrestore\n" );
}; }
@@ -472,7 +472,7 @@ void Fl_PostScript_Graphics_Driver::draw(Fl_Pixmap * pxm,int XP, int YP, int WP,
delete[] mask; delete[] mask;
mask=0; mask=0;
fl_mask_bitmap=0; fl_mask_bitmap=0;
}; }
void Fl_PostScript_Graphics_Driver::draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy){ void Fl_PostScript_Graphics_Driver::draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy){
const uchar * di = rgb->array; const uchar * di = rgb->array;
@@ -486,7 +486,7 @@ void Fl_PostScript_Graphics_Driver::draw(Fl_RGB_Image * rgb,int XP, int YP, int
pop_clip(); pop_clip();
delete[]mask; delete[]mask;
mask=0; mask=0;
}; }
void Fl_PostScript_Graphics_Driver::draw(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy){ void Fl_PostScript_Graphics_Driver::draw(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy){
const uchar * di = bitmap->array; const uchar * di = bitmap->array;
@@ -523,7 +523,7 @@ void Fl_PostScript_Graphics_Driver::draw(Fl_Bitmap * bitmap,int XP, int YP, int
} }
fprintf(output,">\n"); fprintf(output,">\n");
pop_clip(); pop_clip();
}; }
#endif // FL_DOXYGEN #endif // FL_DOXYGEN