Author: matt
Date: 2010-04-04 12:37:35 -0700 (Sun, 04 Apr 2010)
New Revision: 7419
Log:
Ported Fl_Device

Added:
   branches/branch-3.0/fltk3/Device.h
Removed:
   branches/branch-3.0/fltk3/Fl_Device.H
Modified:
   branches/branch-3.0/fltk3/Fl_Abstract_Printer.H
   branches/branch-3.0/fltk3/draw.h
   branches/branch-3.0/fltk3/win32.H
   branches/branch-3.0/src/Fl_Abstract_Printer.cxx
   branches/branch-3.0/src/Fl_Bitmap.cxx
   branches/branch-3.0/src/Fl_Device.cxx
   branches/branch-3.0/src/Fl_GDI_Printer.cxx
   branches/branch-3.0/src/Fl_Image.cxx
   branches/branch-3.0/src/Fl_PS_Printer.cxx
   branches/branch-3.0/src/Fl_Pixmap.cxx
   branches/branch-3.0/src/Fl_Quartz_Printer.mm
   branches/branch-3.0/src/Fl_cocoa.mm
   branches/branch-3.0/src/Fl_win32.cxx
   branches/branch-3.0/src/Fl_x.cxx
   branches/branch-3.0/src/fl_arc.cxx
   branches/branch-3.0/src/fl_arci.cxx
   branches/branch-3.0/src/fl_color.cxx
   branches/branch-3.0/src/fl_color_mac.cxx
   branches/branch-3.0/src/fl_color_win32.cxx
   branches/branch-3.0/src/fl_curve.cxx
   branches/branch-3.0/src/fl_draw_image.cxx
   branches/branch-3.0/src/fl_draw_image_mac.cxx
   branches/branch-3.0/src/fl_draw_image_win32.cxx
   branches/branch-3.0/src/fl_font_mac.cxx
   branches/branch-3.0/src/fl_font_win32.cxx
   branches/branch-3.0/src/fl_font_xft.cxx
   branches/branch-3.0/src/fl_line_style.cxx
   branches/branch-3.0/src/fl_rect.cxx
   branches/branch-3.0/src/fl_vertex.cxx

Copied: branches/branch-3.0/fltk3/Device.h (from rev 7417, 
branches/branch-3.0/fltk3/Fl_Device.H)
===================================================================
--- branches/branch-3.0/fltk3/Device.h                          (rev 0)
+++ branches/branch-3.0/fltk3/Device.h  2010-04-04 19:37:35 UTC (rev 7419)
@@ -0,0 +1,371 @@
+//
+// "$Id: Device.H 7330 2010-03-25 13:59:00Z manolo $"
+//
+// Definition of classes Device, Fl_Display, Fl_Quartz_Display, Fl_GDI_Display,
+// and Fl_Xlib_Display for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2010 by Bill Spitzak and others.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+/** \file Device.H 
+ \brief declaration of classes Device, Fl_Display.
+*/
+
+#ifndef Fltk3_Device_H
+#define Fltk3_Device_H
+
+#include <fltk3/x.H>
+#include <fltk3/Fl_Plugin.H>
+#include <fltk3/Fl_Image.H>
+#include <fltk3/Fl_Bitmap.H>
+#include <fltk3/Fl_Pixmap.H>
+#include <fltk3/Fl_RGB_Image.H>
+#ifdef WIN32
+#include <commdlg.h>
+#elif defined(__APPLE__)
+#else
+#include <stdio.h>
+#endif
+
+class Fl_Pixmap;
+class Fl_Bitmap;
+class Fl_RGB_Image;
+
+namespace fltk3 {
+  class Widget;
+  class Device;
+}
+
+class Fl_Display;
+class Fl_Abstract_Printer;
+/** \brief Points to the device that currently receives all graphics requests 
*/
+FL_EXPORT extern fltk3::Device *fl_device;
+/** \brief Points to the platform's display device */
+FL_EXPORT extern Fl_Display *fl_display_device;
+
+/**
+ signature of image generation callback function.
+ \param[in]  data  user data passed to function
+ \param[in]  x,y,w position and width of scan line in image
+ \param[out] buf   buffer for generated image data. You must copy \p w
+ pixels from scanline \p y, starting at pixel \p x
+ to this buffer.
+ */
+typedef void (*Fl_Draw_Image_Cb)(void* data,int x,int y,int w,uchar* buf);
+
+
+extern void fl_rect(int x, int y, int w, int h);
+extern void fl_rectf(int x, int y, int w, int h);
+extern void fl_line_style(int style, int width, char* dashes);
+extern void fl_xyline(int x, int y, int x1);
+extern void fl_xyline(int x, int y, int x1, int y2);
+extern void fl_xyline(int x, int y, int x1, int y2, int x3);
+extern void fl_yxline(int x, int y, int y1);
+extern void fl_yxline(int x, int y, int y1, int x2);
+extern void fl_yxline(int x, int y, int y1, int x2, int y3);
+extern void fl_line(int x, int y, int x1, int y1);
+extern void fl_line(int x, int y, int x1, int y1, int x2, int y2);
+extern void fl_draw(const char *str, int n, int x, int y);
+extern void fl_draw(int angle, const char *str, int n, int x, int y);
+extern void fl_font(Fl_Font face, Fl_Fontsize size);
+extern void fl_color(Fl_Color c);
+extern void fl_color(uchar r, uchar g, uchar b);
+extern void fl_point(int x, int y);
+extern void fl_loop(int x0, int y0, int x1, int y1, int x2, int y2);
+extern void fl_loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, 
int y3);
+extern void fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2);
+extern void fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, 
int y3);
+extern void fl_begin_points();
+extern void fl_begin_line();
+extern void fl_begin_loop();
+extern void fl_begin_polygon();
+extern void fl_vertex(double x, double y);
+extern void fl_curve(double X0, double Y0, double X1, double Y1, double X2, 
double Y2, double X3, double Y3);
+extern void fl_circle(double x, double y, double r);
+extern void fl_arc(double x, double y, double r, double start, double end);
+extern void fl_arc(int x, int y, int w, int h, double a1, double a2);
+extern void fl_pie(int x, int y, int w, int h, double a1, double a2);
+extern void fl_end_points();
+extern void fl_end_line();
+extern void fl_end_loop();
+extern void fl_end_polygon();
+extern void fl_transformed_vertex(double xf, double yf);
+extern void fl_push_clip(int x, int y, int w, int h);
+extern int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int 
&H);
+extern int fl_not_clipped(int x, int y, int w, int h);
+extern void fl_push_no_clip();
+extern void fl_pop_clip();
+extern void fl_begin_complex_polygon();
+extern void fl_gap();
+extern void fl_end_complex_polygon();
+extern void fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, 
int L);
+extern void fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int 
D, int L);
+extern void fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int 
W,int H, int D);
+extern void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int 
Y,int W,int H, int D);
+
+/**
+ \brief A pure virtual class subclassed to send the output of drawing 
functions to display, printers, or local files.
+ *
+ The protected virtual methods of this class are those that a device should 
implement to
+ support all of FLTK drawing functions.
+ <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 Device class can be called
+ using the global variable Device * \ref fl_device that points at all time to 
the single device 
+ (an instance of an Device subclass) that's currently receiving graphics 
requests:
+ \code fl_device->rect(x, y, w, h); \endcode
+ <br>Each member function of the 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
+ prefixed with fl_ .
+  */
+class fltk3::Device {
+protected:
+  /** \brief The device type */
+  int type_; 
+  /** \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 class ::Fl_Pixmap;
+  friend class ::Fl_Bitmap;
+  friend class ::Fl_RGB_Image;
+  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);
+  friend void ::fl_xyline(int x, int y, int x1);
+  friend void ::fl_xyline(int x, int y, int x1, int y2);
+  friend void ::fl_xyline(int x, int y, int x1, int y2, int x3);
+  friend void ::fl_yxline(int x, int y, int y1);
+  friend void ::fl_yxline(int x, int y, int y1, int x2);
+  friend void ::fl_yxline(int x, int y, int y1, int x2, int y3);
+  friend void ::fl_line(int x, int y, int x1, int y1);
+  friend void ::fl_line(int x, int y, int x1, int y1, int x2, int y2);
+  friend void ::fl_draw(const char *str, int n, int x, int y);
+  friend void ::fl_draw(int angle, const char *str, int n, int x, int y);
+  friend void ::fl_font(Fl_Font face, Fl_Fontsize size);
+  friend void ::fl_color(Fl_Color c);
+  friend void ::fl_color(uchar r, uchar g, uchar b);
+  friend void ::fl_point(int x, int y);
+  friend void ::fl_loop(int x0, int y0, int x1, int y1, int x2, int y2);
+  friend void ::fl_loop(int x0, int y0, int x1, int y1, int x2, int y2, int 
x3, int y3);
+  friend void ::fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2);
+  friend void ::fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2, int 
x3, int y3);
+  friend void ::fl_begin_points();
+  friend void ::fl_begin_line();
+  friend void ::fl_begin_loop();
+  friend void ::fl_begin_polygon();
+  friend void ::fl_vertex(double x, double y);
+  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 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 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);
+  friend void ::fl_push_no_clip();
+  friend void ::fl_pop_clip();
+  friend void ::fl_begin_complex_polygon();
+  friend void ::fl_gap();
+  friend void ::fl_end_complex_polygon();
+  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 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);
+  /** \brief see fl_rectf(int x, int y, int w, int h). */
+  virtual void rectf(int x, int y, int w, int h);
+  /** \brief see fl_line_style(int style, int width, char* dashes). */
+  virtual void line_style(int style, int width=0, char* dashes=0);
+  /** \brief see fl_xyline(int x, int y, int x1). */
+  virtual void xyline(int x, int y, int x1);
+  /** \brief see fl_xyline(int x, int y, int x1, int y2). */
+  virtual void xyline(int x, int y, int x1, int y2);
+  /** \brief see fl_xyline(int x, int y, int x1, int y2, int x3). */
+  virtual void xyline(int x, int y, int x1, int y2, int x3);
+  /** \brief see fl_yxline(int x, int y, int y1). */
+  virtual void yxline(int x, int y, int y1);
+  /** \brief see fl_yxline(int x, int y, int y1, int x2). */
+  virtual void yxline(int x, int y, int y1, int x2);
+  /** \brief see fl_yxline(int x, int y, int y1, int x2, int y3). */
+  virtual void yxline(int x, int y, int y1, int x2, int y3);
+  /** \brief see fl_line(int x, int y, int x1, int y1). */
+  virtual void line(int x, int y, int x1, int y1);
+  /** \brief see fl_line(int x, int y, int x1, int y1, int x2, int y2). */
+  virtual void line(int x, int y, int x1, int y1, int x2, int y2);
+  /** \brief see fl_draw(const char *str, int n, int x, int y). */
+  virtual void draw(const char *str, int n, int x, int y);
+  /** \brief see fl_draw(int angle, const char *str, int n, int x, int y). */
+  virtual void draw(int angle, const char *str, int n, int x, int y);
+  /** \brief see fl_font(Fl_Font face, Fl_Fontsize size). */
+  virtual void font(Fl_Font face, Fl_Fontsize size);
+  /** \brief see fl_color(Fl_Color c). */
+  virtual void color(Fl_Color c);
+  /** \brief see fl_color(uchar r, uchar g, uchar b). */
+  virtual void color(uchar r, uchar g, uchar b);
+  /** \brief see fl_point(int x, int y). */
+  virtual void point(int x, int y);
+  /** \brief see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2). */
+  virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2);
+  /** \brief see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2, int 
x3, int y3). */
+  virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, 
int y3);
+  /** \brief see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2). */
+  virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2);
+  /** \brief see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2, 
int x3, int y3). */
+  virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, 
int y3);
+  /** \brief see fl_begin_points(). */
+  virtual void begin_points();
+  /** \brief see fl_begin_line(). */
+  virtual void begin_line();
+  /** \brief see fl_begin_loop(). */
+  virtual void begin_loop();
+  /** \brief see fl_begin_polygon(). */
+  virtual void begin_polygon();
+  /** \brief see fl_vertex(double x, double y). */
+  virtual void vertex(double x, double y);
+  /** \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 
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). */
+  virtual void pie(int x, int y, int w, int h, double a1, double a2);
+  /** \brief see fl_end_points(). */
+  virtual void end_points();
+  /** \brief see fl_end_line(). */
+  virtual void end_line();
+  /** \brief see fl_end_loop(). */
+  virtual void end_loop();
+  /** \brief see fl_end_polygon(). */
+  virtual void end_polygon();
+  /** \brief see fl_begin_complex_polygon(). */
+  virtual void begin_complex_polygon();
+  /** \brief see fl_gap(). */
+  virtual void gap();
+  /** \brief see fl_end_complex_polygon(). */
+  virtual void end_complex_polygon();
+  /** \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). */
+  virtual int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int 
&H);
+  /** \brief see fl_not_clipped(int x, int y, int w, int h). */
+  virtual int not_clipped(int x, int y, int w, int h);
+  /** \brief see fl_push_no_clip(). */
+  virtual void push_no_clip();
+  /** \brief see fl_pop_clip(). */
+  virtual void pop_clip();
+  // Images
+  /** \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
+  virtual   void draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int 
cx, int cy);
+  virtual   void draw(Fl_Bitmap * bmp,int XP, int YP, int WP, int HP, int cx, 
int cy);  
+  virtual   void draw(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, 
int cy);
+  
+public:
+  /** 
+   @brief All implemented graphics output devices.
+   */
+  enum device_types { 
+    xlib_display = 0, /**< The X11 display. */
+    quartz_display,  /**< The Mac OS X display. */
+    gdi_display,  /**< The MSWindows display. */
+    gdi_printer = 256,  /**< The MSWindows printer. */
+    quartz_printer,  /**< The Mac OS X printer. */
+    postscript_device  /**< The PostScript device. */
+  };
+  /** 
+   @brief An RTTI emulation of device classes. It returns values < 256 if it 
is a display device 
+   */
+  inline int type() {return type_;};
+  virtual Device *set_current(void);
+  
+  virtual ~Device() {};
+  static Device *current();
+  
+  /**
+   @brief    Returns the platform's display device.
+   */
+  static Fl_Display *display_device() { return fl_display_device; };
+  
+};
+extern FL_EXPORT fltk3::Device *fl_device;
+
+/**
+ @brief A virtual class subclassed for OS-specific display graphics.
+ */
+class Fl_Display : public fltk3::Device {
+  friend class Fl_PSfile_Device;
+};
+
+#if defined(__APPLE__) || defined(FL_DOXYGEN)
+/**
+ @brief The Mac OS X-specific display graphics class.
+ */
+class Fl_Quartz_Display : public Fl_Display {
+public:
+  Fl_Quartz_Display() { type_ = quartz_display; };
+};
+#endif
+#if defined(WIN32) || defined(FL_DOXYGEN)
+/**
+ @brief The MSWindows-specific display graphics class.
+ */
+class Fl_GDI_Display : public Fl_Display {
+public:
+  Fl_GDI_Display() { type_ = gdi_display; };
+};
+#endif
+#if !( defined(__APPLE__) || defined(WIN32)) || defined(FL_DOXYGEN)
+/**
+ @brief The X11-specific display graphics class.
+ */
+class Fl_Xlib_Display : public Fl_Display {
+public:
+  Fl_Xlib_Display() { type_ = xlib_display; };
+};
+#endif
+
+#endif // Device_H
+
+//
+// End of "$Id: Device.H 7330 2010-03-25 13:59:00Z manolo $".
+//

Modified: branches/branch-3.0/fltk3/Fl_Abstract_Printer.H
===================================================================
--- branches/branch-3.0/fltk3/Fl_Abstract_Printer.H     2010-04-04 19:08:22 UTC 
(rev 7418)
+++ branches/branch-3.0/fltk3/Fl_Abstract_Printer.H     2010-04-04 19:37:35 UTC 
(rev 7419)
@@ -32,14 +32,14 @@
 #ifndef Fl_Abstract_Printer_H
 #define Fl_Abstract_Printer_H
 
-#include <fltk3/Fl_Device.H>
+#include <fltk3/Device.h>
 
 /**
  \brief A virtual class for print support with several platform-specific 
implementations.
  *
  This class has no public constructor: don't instantiate it; use Fl_Printer or 
Fl_PSfile_Device instead.
  */
-class Fl_Abstract_Printer : public Fl_Device {
+class Fl_Abstract_Printer : public fltk3::Device {
   friend class Fl_Pixmap;
   friend class Fl_RGB_Image;
   friend class Fl_Bitmap;
@@ -69,7 +69,7 @@
   void delete_image_list(); 
 #endif
 public:
-  Fl_Device *set_current(void);
+  fltk3::Device *set_current(void);
   virtual int start_job(int pagecount, int *frompage = NULL, int *topage = 
NULL);
   virtual int start_page(void);
   virtual int printable_rect(int *w, int *h);

Deleted: branches/branch-3.0/fltk3/Fl_Device.H

Modified: branches/branch-3.0/fltk3/draw.h
===================================================================
--- branches/branch-3.0/fltk3/draw.h    2010-04-04 19:08:22 UTC (rev 7418)
+++ branches/branch-3.0/fltk3/draw.h    2010-04-04 19:37:35 UTC (rev 7419)
@@ -35,7 +35,7 @@
 
 #include "Enumerations.H"  // for the color names
 #include "Window.h"       // for fl_set_spot()
-#include "Fl_Device.H"
+#include "Device.h"
 
 // Image class...
 class Fl_Image;

Modified: branches/branch-3.0/fltk3/win32.H
===================================================================
--- branches/branch-3.0/fltk3/win32.H   2010-04-04 19:08:22 UTC (rev 7418)
+++ branches/branch-3.0/fltk3/win32.H   2010-04-04 19:37:35 UTC (rev 7419)
@@ -45,7 +45,7 @@
 #define VK_APPS 0x5D
 #endif
 
-#include <fltk3/Fl_Device.H>
+#include <fltk3/Device.h>
 
 // some random X equivalents
 typedef HWND NativeWindow;

Modified: branches/branch-3.0/src/Fl_Abstract_Printer.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Abstract_Printer.cxx     2010-04-04 19:08:22 UTC 
(rev 7418)
+++ branches/branch-3.0/src/Fl_Abstract_Printer.cxx     2010-04-04 19:37:35 UTC 
(rev 7419)
@@ -124,7 +124,7 @@
 void Fl_Abstract_Printer::print_window_part(fltk3::Window *win, int x, int y, 
int w, int h, int delta_x, int delta_y)
 {
   int slice, width, offset, count = 0;
-  Fl_Device::display_device()->set_current();
+  fltk3::Device::display_device()->set_current();
   fltk3::Window *save_front = fltk3::first_window();
   win->show();
   fl_gc = NULL;
@@ -177,7 +177,7 @@
 }
 #endif
 
-Fl_Device *Fl_Abstract_Printer::set_current(void)
+fltk3::Device *Fl_Abstract_Printer::set_current(void)
 {
 #ifdef __APPLE__
   fl_gc = (CGContextRef)gc;
@@ -186,7 +186,7 @@
 #else
   fl_gc = (_XGC*)gc;
 #endif
-  return this->Fl_Device::set_current();
+  return this->fltk3::Device::set_current();
 }
 
 

Modified: branches/branch-3.0/src/Fl_Bitmap.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Bitmap.cxx       2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/Fl_Bitmap.cxx       2010-04-04 19:37:35 UTC (rev 
7419)
@@ -248,7 +248,7 @@
 }
 
 void Fl_Bitmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
-  if(fl_device->type() == Fl_Device::postscript_device) {
+  if(fl_device->type() == fltk3::Device::postscript_device) {
     fl_device->draw(this, XP, YP, WP, HP, cx, cy);
     return;
   }
@@ -286,7 +286,7 @@
   HDC tempdc;
   int save;
   BOOL use_print_algo = false;
-  if (fl_device->type() == Fl_Device::gdi_printer) {
+  if (fl_device->type() == fltk3::Device::gdi_printer) {
     static HMODULE hMod = NULL;
     if (!hMod) {
       hMod = LoadLibrary("MSIMG32.DLL");

Modified: branches/branch-3.0/src/Fl_Device.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Device.cxx       2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/Fl_Device.cxx       2010-04-04 19:37:35 UTC (rev 
7419)
@@ -1,7 +1,7 @@
 //
 // "$Id$"
 //
-// implementation of Fl_Device class for the Fast Light Tool Kit (FLTK).
+// implementation of fltk3::Device class for the Fast Light Tool Kit (FLTK).
 //
 // Copyright 2010 by Bill Spitzak and others.
 //
@@ -26,7 +26,7 @@
 //
 
 #include <fltk3/run.h>
-#include <fltk3/Fl_Device.H>
+#include <fltk3/Device.h>
 //#include <fltk3/draw.h>
 #include <fltk3/Fl_Image.H>
 
@@ -35,7 +35,7 @@
  Specifies a bounding box for the image, with the origin (upper left-hand 
corner) of 
  the image offset by the cx and cy arguments.
  */
-void Fl_Device::draw(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int cx, 
int cy)
+void fltk3::Device::draw(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int 
cx, int cy)
 {
   pxm->draw(XP, YP, WP, HP, cx, cy);
 }
@@ -45,7 +45,7 @@
  Specifies a bounding box for the image, with the origin (upper left-hand 
corner) of 
  the image offset by the cx and cy arguments.
  */
-void Fl_Device::draw(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int 
cy)
+void fltk3::Device::draw(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, 
int cy)
 {
   bm->draw(XP, YP, WP, HP, cx, cy);
 }
@@ -55,7 +55,7 @@
  Specifies a bounding box for the image, with the origin (upper left-hand 
corner) of 
  the image offset by the cx and cy arguments.
  */
-void Fl_Device::draw(Fl_RGB_Image *rgb,int XP, int YP, int WP, int HP, int cx, 
int cy)
+void fltk3::Device::draw(Fl_RGB_Image *rgb,int XP, int YP, int WP, int HP, int 
cx, int cy)
 {
   rgb->draw(XP, YP, WP, HP, cx, cy);
 }
@@ -65,9 +65,9 @@
  *
  @return  The current target device of graphics calls.
  */
-Fl_Device *Fl_Device::set_current(void)
+fltk3::Device *fltk3::Device::set_current(void)
 {
-  Fl_Device *current = fl_device;
+  fltk3::Device *current = fl_device;
   fl_device = this;
   return current;
 }
@@ -75,7 +75,7 @@
 /**
  @brief    Returns the current target device of graphics calls.
  */
-Fl_Device *Fl_Device::current(void)
+fltk3::Device *fltk3::Device::current(void)
 {
   return fl_device;
 }

Modified: branches/branch-3.0/src/Fl_GDI_Printer.cxx
===================================================================
--- branches/branch-3.0/src/Fl_GDI_Printer.cxx  2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/Fl_GDI_Printer.cxx  2010-04-04 19:37:35 UTC (rev 
7419)
@@ -111,7 +111,7 @@
 
 void Fl_Printer::end_job (void)
 {
-  Fl_Device::display_device()->set_current();
+  fltk3::Device::display_device()->set_current();
   if (hPr != NULL) {
     if (! abortPrint) {
       prerr = EndDoc (hPr);

Modified: branches/branch-3.0/src/Fl_Image.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Image.cxx        2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/Fl_Image.cxx        2010-04-04 19:37:35 UTC (rev 
7419)
@@ -434,7 +434,7 @@
 #endif // !WIN32 && !__APPLE_QUARTZ__
 
 void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
-  if(fl_device->type() == Fl_Device::postscript_device) {
+  if(fl_device->type() == fltk3::Device::postscript_device) {
     fl_device->draw(this, XP, YP, WP, HP, cx, cy);
     return;
   }

Modified: branches/branch-3.0/src/Fl_PS_Printer.cxx
===================================================================
--- branches/branch-3.0/src/Fl_PS_Printer.cxx   2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/Fl_PS_Printer.cxx   2010-04-04 19:37:35 UTC (rev 
7419)
@@ -861,7 +861,7 @@
     f = fltk3::COURIER;
   fprintf(output, "/%s SF\n" , _fontNames[f]);
   fprintf(output,"%i FS\n", s);
-  Fl_Device::display_device()->font(f,s); // Use display fonts for font 
measurement
+  fltk3::Device::display_device()->font(f,s); // Use display fonts for font 
measurement
   font_ = f; size_ = s;
 };
 
@@ -1275,7 +1275,7 @@
     delete c;
   }
   if (close_cmd_) (*close_cmd_)(output);
-  Fl_Device::display_device()->set_current();
+  fltk3::Device::display_device()->set_current();
 }
 
 #if ! (defined(__APPLE__) || defined(WIN32) )

Modified: branches/branch-3.0/src/Fl_Pixmap.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Pixmap.cxx       2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/Fl_Pixmap.cxx       2010-04-04 19:37:35 UTC (rev 
7419)
@@ -74,7 +74,7 @@
 }
 
 void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
-  if(fl_device->type() == Fl_Device::postscript_device) {
+  if(fl_device->type() == fltk3::Device::postscript_device) {
     fl_device->draw(this, XP, YP, WP, HP, cx, cy);
     return;
     }
@@ -143,7 +143,7 @@
     fl_restore_clip();
   }
 #elif defined(WIN32)
-  if (fl_device->type() == Fl_Device::gdi_printer) {
+  if (fl_device->type() == fltk3::Device::gdi_printer) {
     typedef BOOL (WINAPI* fl_transp_func)  
(HDC,int,int,int,int,HDC,int,int,int,int,UINT);
     static HMODULE hMod = NULL;
     static fl_transp_func fl_TransparentBlt = NULL;

Modified: branches/branch-3.0/src/Fl_Quartz_Printer.mm
===================================================================
--- branches/branch-3.0/src/Fl_Quartz_Printer.mm        2010-04-04 19:08:22 UTC 
(rev 7418)
+++ branches/branch-3.0/src/Fl_Quartz_Printer.mm        2010-04-04 19:37:35 UTC 
(rev 7419)
@@ -285,7 +285,7 @@
     fltk3::alert ("PM Session error %d", (int)status);
   }
   PMSessionEndDocumentNoDialog(printSession);
-  Fl_Device::display_device()->set_current();
+  fltk3::Device::display_device()->set_current();
   fl_gc = 0;
   fltk3::first_window()->show();
 }

Modified: branches/branch-3.0/src/Fl_cocoa.mm
===================================================================
--- branches/branch-3.0/src/Fl_cocoa.mm 2010-04-04 19:08:22 UTC (rev 7418)
+++ branches/branch-3.0/src/Fl_cocoa.mm 2010-04-04 19:37:35 UTC (rev 7419)
@@ -133,7 +133,7 @@
 
 static Fl_Quartz_Display fl_quartz_device;
 FL_EXPORT Fl_Display *fl_display_device = (Fl_Display*)&fl_quartz_device; // 
does not change
-FL_EXPORT Fl_Device *fl_device = (Fl_Device*)&fl_quartz_device; // the current 
target device of graphics operations
+FL_EXPORT fltk3::Device *fl_device = (fltk3::Device*)&fl_quartz_device; // the 
current target device of graphics operations
 
 // public variables
 int fl_screen;
@@ -3475,7 +3475,7 @@
 
 // so a CGRect matches exactly what is denoted x,y,w,h for clipping purposes
 CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h) {
-  if (Fl_Device::current()->type() == Fl_Device::quartz_printer) return 
CGRectMake(x, y, w-1.5 , h-1.5 ); 
+  if (fltk3::Device::current()->type() == fltk3::Device::quartz_printer) 
return CGRectMake(x, y, w-1.5 , h-1.5 ); 
   return CGRectMake(x, y, w > 0 ? w - 0.9 : 0, h > 0 ? h - 0.9 : 0);
 }
 

Modified: branches/branch-3.0/src/Fl_win32.cxx
===================================================================
--- branches/branch-3.0/src/Fl_win32.cxx        2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/Fl_win32.cxx        2010-04-04 19:37:35 UTC (rev 
7419)
@@ -97,7 +97,7 @@
 
 static Fl_GDI_Display fl_gdi_device;
 FL_EXPORT Fl_Display *fl_display_device = (Fl_Display*)&fl_gdi_device; // does 
not change
-FL_EXPORT Fl_Device *fl_device = (Fl_Device*)&fl_gdi_device; // the current 
target device of graphics operations
+FL_EXPORT fltk3::Device *fl_device = (fltk3::Device*)&fl_gdi_device; // the 
current target device of graphics operations
 
 // dynamic wsock dll handling api:
 #if defined(__CYGWIN__) && !defined(SOCKET)
@@ -1925,7 +1925,7 @@
 }
 
 Fl_Region XRectangleRegion(int x, int y, int w, int h) {
-  if (Fl_Device::current()->type() < 256) return CreateRectRgn(x,y,x+w,y+h);
+  if (fltk3::Device::current()->type() < 256) return 
CreateRectRgn(x,y,x+w,y+h);
   // because rotation may apply, the rectangle becomes a polygon in device 
coords
   POINT pt[4] = { {x, y}, {x + w, y}, {x + w, y + h}, {x, y + h} };
   LPtoDP(fl_gc, pt, 4);

Modified: branches/branch-3.0/src/Fl_x.cxx
===================================================================
--- branches/branch-3.0/src/Fl_x.cxx    2010-04-04 19:08:22 UTC (rev 7418)
+++ branches/branch-3.0/src/Fl_x.cxx    2010-04-04 19:37:35 UTC (rev 7419)
@@ -53,7 +53,7 @@
 
 static Fl_Xlib_Display fl_xlib_device;
 FL_EXPORT Fl_Display *fl_display_device = (Fl_Display*)&fl_xlib_device; // 
does not change
-FL_EXPORT Fl_Device *fl_device = (Fl_Device*)&fl_xlib_device; // the current 
target device of graphics operations
+FL_EXPORT fltk3::Device *fl_device = (fltk3::Device*)&fl_xlib_device; // the 
current target device of graphics operations
 
 ////////////////////////////////////////////////////////////////
 // interface to poll/select call:

Modified: branches/branch-3.0/src/fl_arc.cxx
===================================================================
--- branches/branch-3.0/src/fl_arc.cxx  2010-04-04 19:08:22 UTC (rev 7418)
+++ branches/branch-3.0/src/fl_arc.cxx  2010-04-04 19:37:35 UTC (rev 7419)
@@ -43,7 +43,7 @@
   return sqrt(x*x + y*y);
 }
 
-void Fl_Device::arc(double x, double y, double r, double start, double end) {
+void fltk3::Device::arc(double x, double y, double r, double start, double 
end) {
 
   // draw start point accurately:
   

Modified: branches/branch-3.0/src/fl_arci.cxx
===================================================================
--- branches/branch-3.0/src/fl_arci.cxx 2010-04-04 19:08:22 UTC (rev 7418)
+++ branches/branch-3.0/src/fl_arci.cxx 2010-04-04 19:37:35 UTC (rev 7419)
@@ -47,7 +47,7 @@
 #endif
 #include <config.h>
 
-void Fl_Device::arc(int x,int y,int w,int h,double a1,double a2) {
+void fltk3::Device::arc(int x,int y,int w,int h,double a1,double a2) {
   if (w <= 0 || h <= 0) return;
 
 #if defined(USE_X11)
@@ -82,7 +82,7 @@
 #endif
 }
 
-void Fl_Device::pie(int x,int y,int w,int h,double a1,double a2) {
+void fltk3::Device::pie(int x,int y,int w,int h,double a1,double a2) {
   if (w <= 0 || h <= 0) return;
 
 #if defined(USE_X11)

Modified: branches/branch-3.0/src/fl_color.cxx
===================================================================
--- branches/branch-3.0/src/fl_color.cxx        2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_color.cxx        2010-04-04 19:37:35 UTC (rev 
7419)
@@ -127,7 +127,7 @@
 /** Current color for drawing operations */
 Fl_Color fl_color_;
 
-void Fl_Device::color(Fl_Color i) {
+void fltk3::Device::color(Fl_Color i) {
   if (i & 0xffffff00) {
     unsigned rgb = (unsigned)i;
     fl_color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
@@ -138,7 +138,7 @@
   }
 }
 
-void Fl_Device::color(uchar r,uchar g,uchar b) {
+void fltk3::Device::color(uchar r,uchar g,uchar b) {
   fl_color_ = fl_rgb_color(r, g, b);
   if(!fl_gc) return; // don't get a default gc if current window is not yet 
created/valid
   XSetForeground(fl_display, fl_gc, fl_xpixel(r,g,b));

Modified: branches/branch-3.0/src/fl_color_mac.cxx
===================================================================
--- branches/branch-3.0/src/fl_color_mac.cxx    2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_color_mac.cxx    2010-04-04 19:37:35 UTC (rev 
7419)
@@ -49,7 +49,7 @@
 
 Fl_Color fl_color_;
 
-void Fl_Device::color(Fl_Color i) {
+void fltk3::Device::color(Fl_Color i) {
   fl_color_ = i;
   int index;
   uchar r, g, b;
@@ -74,7 +74,7 @@
   CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f);
 }
 
-void Fl_Device::color(uchar r, uchar g, uchar b) {
+void fltk3::Device::color(uchar r, uchar g, uchar b) {
   fl_color_ = fl_rgb_color(r, g, b);
   float fr = r/255.0f;
   float fg = g/255.0f;

Modified: branches/branch-3.0/src/fl_color_win32.cxx
===================================================================
--- branches/branch-3.0/src/fl_color_win32.cxx  2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_color_win32.cxx  2010-04-04 19:37:35 UTC (rev 
7419)
@@ -94,7 +94,7 @@
 
 Fl_Color fl_color_;
 
-void Fl_Device::color(Fl_Color i) {
+void fltk3::Device::color(Fl_Color i) {
   if (i & 0xffffff00) {
     unsigned rgb = (unsigned)i;
     fl_color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
@@ -118,7 +118,7 @@
   }
 }
 
-void Fl_Device::color(uchar r, uchar g, uchar b) {
+void fltk3::Device::color(uchar r, uchar g, uchar b) {
   static Fl_XMap xmap;
   COLORREF c = RGB(r,g,b);
   fl_color_ = fl_rgb_color(r, g, b);

Modified: branches/branch-3.0/src/fl_curve.cxx
===================================================================
--- branches/branch-3.0/src/fl_curve.cxx        2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_curve.cxx        2010-04-04 19:37:35 UTC (rev 
7419)
@@ -38,7 +38,7 @@
 #include <fltk3/draw.h>
 #include <math.h>
 
-void Fl_Device::curve(double X0, double Y0,
+void fltk3::Device::curve(double X0, double Y0,
              double X1, double Y1,
              double X2, double Y2,
              double X3, double Y3) {

Modified: branches/branch-3.0/src/fl_draw_image.cxx
===================================================================
--- branches/branch-3.0/src/fl_draw_image.cxx   2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_draw_image.cxx   2010-04-04 19:37:35 UTC (rev 
7419)
@@ -543,17 +543,17 @@
   }
 }
 
-void Fl_Device::draw_image(const uchar* buf, int x, int y, int w, int h, int 
d, int l){
+void fltk3::Device::draw_image(const uchar* buf, int x, int y, int w, int h, 
int d, int l){
   innards(buf,x,y,w,h,d,l,(d<3&&d>-3),0,0);
 }
-void Fl_Device::draw_image(Fl_Draw_Image_Cb cb, void* data,
+void fltk3::Device::draw_image(Fl_Draw_Image_Cb cb, void* data,
                   int x, int y, int w, int h,int d) {
   innards(0,x,y,w,h,d,0,(d<3&&d>-3),cb,data);
 }
-void Fl_Device::draw_image_mono(const uchar* buf, int x, int y, int w, int h, 
int d, int l){
+void fltk3::Device::draw_image_mono(const uchar* buf, int x, int y, int w, int 
h, int d, int l){
   innards(buf,x,y,w,h,d,l,1,0,0);
 }
-void Fl_Device::draw_image_mono(Fl_Draw_Image_Cb cb, void* data,
+void fltk3::Device::draw_image_mono(Fl_Draw_Image_Cb cb, void* data,
                   int x, int y, int w, int h,int d) {
   innards(0,x,y,w,h,d,0,1,cb,data);
 }

Modified: branches/branch-3.0/src/fl_draw_image_mac.cxx
===================================================================
--- branches/branch-3.0/src/fl_draw_image_mac.cxx       2010-04-04 19:08:22 UTC 
(rev 7418)
+++ branches/branch-3.0/src/fl_draw_image_mac.cxx       2010-04-04 19:37:35 UTC 
(rev 7419)
@@ -148,17 +148,17 @@
   CGContextSetShouldAntialias(fl_gc, true);
 }
 
-void Fl_Device::draw_image(const uchar* buf, int x, int y, int w, int h, int 
d, int l){
+void fltk3::Device::draw_image(const uchar* buf, int x, int y, int w, int h, 
int d, int l){
   innards(buf,x,y,w,h,d,l,(d<3&&d>-3),0,0);
 }
-void Fl_Device::draw_image(Fl_Draw_Image_Cb cb, void* data,
+void fltk3::Device::draw_image(Fl_Draw_Image_Cb cb, void* data,
                   int x, int y, int w, int h,int d) {
   innards(0,x,y,w,h,d,0,(d<3&&d>-3),cb,data);
 }
-void Fl_Device::draw_image_mono(const uchar* buf, int x, int y, int w, int h, 
int d, int l){
+void fltk3::Device::draw_image_mono(const uchar* buf, int x, int y, int w, int 
h, int d, int l){
   innards(buf,x,y,w,h,d,l,1,0,0);
 }
-void Fl_Device::draw_image_mono(Fl_Draw_Image_Cb cb, void* data,
+void fltk3::Device::draw_image_mono(Fl_Draw_Image_Cb cb, void* data,
                   int x, int y, int w, int h,int d) {
   innards(0,x,y,w,h,d,0,1,cb,data);
 }

Modified: branches/branch-3.0/src/fl_draw_image_win32.cxx
===================================================================
--- branches/branch-3.0/src/fl_draw_image_win32.cxx     2010-04-04 19:08:22 UTC 
(rev 7418)
+++ branches/branch-3.0/src/fl_draw_image_win32.cxx     2010-04-04 19:37:35 UTC 
(rev 7419)
@@ -254,7 +254,7 @@
         }            
       }
     }
-    if(Fl_Device::current()->type() == Fl_Device::gdi_printer) {
+    if(fltk3::Device::current()->type() == fltk3::Device::gdi_printer) {
       // if print context, device and logical units are not equal, so 
SetDIBitsToDevice
       // does not do the expected job, whereas StretchDIBits does it.
       StretchDIBits(fl_gc, x, y+j-k, w, k, 0, 0, w, k,
@@ -283,7 +283,7 @@
 
 static int fl_abs(int v) { return v<0 ? -v : v; }
 
-void Fl_Device::draw_image(const uchar* buf, int x, int y, int w, int h, int 
d, int l){
+void fltk3::Device::draw_image(const uchar* buf, int x, int y, int w, int h, 
int d, int l){
   if (fl_abs(d)&FL_IMAGE_WITH_ALPHA) {
     d ^= FL_IMAGE_WITH_ALPHA;
     innards(buf,x,y,w,h,d,l,fl_abs(d),0,0);
@@ -292,7 +292,7 @@
   }
 }
 
-void Fl_Device::draw_image(Fl_Draw_Image_Cb cb, void* data,
+void fltk3::Device::draw_image(Fl_Draw_Image_Cb cb, void* data,
                   int x, int y, int w, int h,int d) {
   if (fl_abs(d)&FL_IMAGE_WITH_ALPHA) {
     d ^= FL_IMAGE_WITH_ALPHA;
@@ -302,7 +302,7 @@
   }
 }
 
-void Fl_Device::draw_image_mono(const uchar* buf, int x, int y, int w, int h, 
int d, int l){
+void fltk3::Device::draw_image_mono(const uchar* buf, int x, int y, int w, int 
h, int d, int l){
   if (fl_abs(d)&FL_IMAGE_WITH_ALPHA) {
     d ^= FL_IMAGE_WITH_ALPHA;
     innards(buf,x,y,w,h,d,l,1,0,0);
@@ -311,7 +311,7 @@
   }
 }
 
-void Fl_Device::draw_image_mono(Fl_Draw_Image_Cb cb, void* data,
+void fltk3::Device::draw_image_mono(Fl_Draw_Image_Cb cb, void* data,
                   int x, int y, int w, int h,int d) {
   if (fl_abs(d)&FL_IMAGE_WITH_ALPHA) {
     d ^= FL_IMAGE_WITH_ALPHA;

Modified: branches/branch-3.0/src/fl_font_mac.cxx
===================================================================
--- branches/branch-3.0/src/fl_font_mac.cxx     2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_font_mac.cxx     2010-04-04 19:37:35 UTC (rev 
7419)
@@ -239,7 +239,7 @@
 Fl_Fontsize fl_size_ = 0;
 
 
-void Fl_Device::font(Fl_Font fnum, Fl_Fontsize size) {
+void fltk3::Device::font(Fl_Font fnum, Fl_Fontsize size) {
   if (fnum==-1) {
     fl_font_ = 0; 
     fl_size_ = 0;
@@ -402,7 +402,7 @@
 
 void fl_draw(const char *str, int n, float x, float y);
 
-void Fl_Device::draw(const char* str, int n, int x, int y) {
+void fltk3::Device::draw(const char* str, int n, int x, int y) {
   fl_draw(str, n, (float)x-0.0f, (float)y+0.5f);
 }
 
@@ -480,7 +480,7 @@
 #endif
 }
 
-void Fl_Device::draw(int angle, const char *str, int n, int x, int y) {
+void fltk3::Device::draw(int angle, const char *str, int n, int x, int y) {
   CGContextSaveGState(fl_gc);
   CGContextTranslateCTM(fl_gc, x, y);
   CGContextRotateCTM(fl_gc, - angle*(M_PI/180) );

Modified: branches/branch-3.0/src/fl_font_win32.cxx
===================================================================
--- branches/branch-3.0/src/fl_font_win32.cxx   2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_font_win32.cxx   2010-04-04 19:37:35 UTC (rev 
7419)
@@ -143,7 +143,7 @@
   fl_fontsize = find(fnum, size, angle);
 }
 
-void Fl_Device::font(Fl_Font fnum, Fl_Fontsize size) {
+void fltk3::Device::font(Fl_Font fnum, Fl_Fontsize size) {
   fl_font(fnum, size, 0);
 }
 
@@ -247,7 +247,7 @@
 
 // if printer context, extents shd be converted to logical coords
 #define EXTENTS_UPDATE(x,y,w,h) \
-  if (Fl_Device::current()->type() == Fl_Device::gdi_printer) { 
on_printer_extents_update(x,y,w,h); }
+  if (fltk3::Device::current()->type() == fltk3::Device::gdi_printer) { 
on_printer_extents_update(x,y,w,h); }
 
 static unsigned short *ext_buff = NULL; // UTF-16 converted version of input 
UTF-8 string
 static unsigned wc_len = 0; // current string buffer dimension
@@ -331,7 +331,7 @@
   return;
 } // fl_text_extents
 
-void Fl_Device::draw(const char* str, int n, int x, int y) {
+void fltk3::Device::draw(const char* str, int n, int x, int y) {
   int i = 0;
   int lx = 0;
   char *end = (char *)&str[n];
@@ -359,7 +359,7 @@
   SetTextColor(fl_gc, oldColor);
 }
 
-void Fl_Device::draw(int angle, const char* str, int n, int x, int y) {
+void fltk3::Device::draw(int angle, const char* str, int n, int x, int y) {
   fl_font(fl_font_, fl_size_, angle);
 //  fl_draw(str, n, (int)x, (int)y);
   int i = 0, i2=0;

Modified: branches/branch-3.0/src/fl_font_xft.cxx
===================================================================
--- branches/branch-3.0/src/fl_font_xft.cxx     2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_font_xft.cxx     2010-04-04 19:37:35 UTC (rev 
7419)
@@ -132,7 +132,7 @@
   fl_xftfont = (void*)f->font;
 }
 
-void Fl_Device::font(Fl_Font fnum, Fl_Fontsize size) {
+void fltk3::Device::font(Fl_Font fnum, Fl_Fontsize size) {
   fl_font(fnum,size,0);
 }
 
@@ -498,7 +498,7 @@
 #endif
 }
 
-void Fl_Device::draw(const char *str, int n, int x, int y) {
+void fltk3::Device::draw(const char *str, int n, int x, int y) {
   if ( !current_font ) {
     fl_font(fltk3::HELVETICA, 14);
   }
@@ -535,7 +535,7 @@
   XftDrawStringUtf8(draw_, &color, current_font, x, y, (XftChar8 *)str, n);
 }
 
-void Fl_Device::draw(int angle, const char *str, int n, int x, int y) {
+void fltk3::Device::draw(int angle, const char *str, int n, int x, int y) {
   fl_font(fl_font_, fl_size_, angle);
   fl_draw(str, n, (int)x, (int)y);
   fl_font(fl_font_, fl_size_);

Modified: branches/branch-3.0/src/fl_line_style.cxx
===================================================================
--- branches/branch-3.0/src/fl_line_style.cxx   2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_line_style.cxx   2010-04-04 19:37:35 UTC (rev 
7419)
@@ -50,7 +50,7 @@
 }
 #endif
 
-void Fl_Device::line_style(int style, int width, char* dashes) {
+void fltk3::Device::line_style(int style, int width, char* dashes) {
 
 #if defined(USE_X11)
   int ndashes = dashes ? strlen(dashes) : 0;
@@ -117,7 +117,7 @@
   fl_quartz_line_width_ = (float)width; 
   fl_quartz_line_cap_ = Cap[(style>>8)&3];
   // when printing kCGLineCapSquare seems better for solid lines
-  if (Fl_Device::current()->type() == quartz_printer && style == FL_SOLID) 
fl_quartz_line_cap_ = kCGLineCapSquare;
+  if (fltk3::Device::current()->type() == quartz_printer && style == FL_SOLID) 
fl_quartz_line_cap_ = kCGLineCapSquare;
   fl_quartz_line_join_ = Join[(style>>12)&3];
   char *d = dashes; 
   static CGFloat pattern[16];

Modified: branches/branch-3.0/src/fl_rect.cxx
===================================================================
--- branches/branch-3.0/src/fl_rect.cxx 2010-04-04 19:08:22 UTC (rev 7418)
+++ branches/branch-3.0/src/fl_rect.cxx 2010-04-04 19:37:35 UTC (rev 7419)
@@ -43,10 +43,10 @@
 
 #ifdef __APPLE_QUARTZ__
 extern float fl_quartz_line_width_;
-#define USINGQUARTZPRINTER  (Fl_Device::current()->type() == quartz_printer)
+#define USINGQUARTZPRINTER  (fltk3::Device::current()->type() == 
quartz_printer)
 #endif
 
-void Fl_Device::rect(int x, int y, int w, int h) {
+void fltk3::Device::rect(int x, int y, int w, int h) {
 
   if (w<=0 || h<=0) return;
 #if defined(USE_X11)
@@ -67,7 +67,7 @@
 #endif
 }
 
-void Fl_Device::rectf(int x, int y, int w, int h) {
+void fltk3::Device::rectf(int x, int y, int w, int h) {
   if (w<=0 || h<=0) return;
 #if defined(USE_X11)
   if (w && h) XFillRectangle(fl_display, fl_window, fl_gc, x, y, w, h);
@@ -86,7 +86,7 @@
 #endif
 }
 
-void Fl_Device::xyline(int x, int y, int x1) {
+void fltk3::Device::xyline(int x, int y, int x1) {
 #if defined(USE_X11)
   XDrawLine(fl_display, fl_window, fl_gc, x, y, x1, y);
 #elif defined(WIN32)
@@ -102,7 +102,7 @@
 #endif
 }
 
-void Fl_Device::xyline(int x, int y, int x1, int y2) {
+void fltk3::Device::xyline(int x, int y, int x1, int y2) {
 #if defined (USE_X11)
   XPoint p[3];
   p[0].x = x;  p[0].y = p[1].y = y;
@@ -126,7 +126,7 @@
 #endif
 }
 
-void Fl_Device::xyline(int x, int y, int x1, int y2, int x3) {
+void fltk3::Device::xyline(int x, int y, int x1, int y2, int x3) {
 #if defined(USE_X11)
   XPoint p[4];
   p[0].x = x;  p[0].y = p[1].y = y;
@@ -153,7 +153,7 @@
 #endif
 }
 
-void Fl_Device::yxline(int x, int y, int y1) {
+void fltk3::Device::yxline(int x, int y, int y1) {
 #if defined(USE_X11)
   XDrawLine(fl_display, fl_window, fl_gc, x, y, x, y1);
 #elif defined(WIN32)
@@ -171,7 +171,7 @@
 #endif
 }
 
-void Fl_Device::yxline(int x, int y, int y1, int x2) {
+void fltk3::Device::yxline(int x, int y, int y1, int x2) {
 #if defined(USE_X11)
   XPoint p[3];
   p[0].x = p[1].x = x;  p[0].y = y;
@@ -195,7 +195,7 @@
 #endif
 }
 
-void Fl_Device::yxline(int x, int y, int y1, int x2, int y3) {
+void fltk3::Device::yxline(int x, int y, int y1, int x2, int y3) {
 #if defined(USE_X11)
   XPoint p[4];
   p[0].x = p[1].x = x;  p[0].y = y;
@@ -222,7 +222,7 @@
 #endif
 }
 
-void Fl_Device::line(int x, int y, int x1, int y1) {
+void fltk3::Device::line(int x, int y, int x1, int y1) {
 #if defined(USE_X11)
   XDrawLine(fl_display, fl_window, fl_gc, x, y, x1, y1);
 #elif defined(WIN32)
@@ -242,7 +242,7 @@
 #endif
 }
 
-void Fl_Device::line(int x, int y, int x1, int y1, int x2, int y2) {
+void fltk3::Device::line(int x, int y, int x1, int y1, int x2, int y2) {
 #if defined(USE_X11)
   XPoint p[3];
   p[0].x = x;  p[0].y = y;
@@ -268,7 +268,7 @@
 #endif
 }
 
-void Fl_Device::loop(int x, int y, int x1, int y1, int x2, int y2) {
+void fltk3::Device::loop(int x, int y, int x1, int y1, int x2, int y2) {
 #if defined(USE_X11)
   XPoint p[4];
   p[0].x = x;  p[0].y = y;
@@ -294,7 +294,7 @@
 #endif
 }
 
-void Fl_Device::loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int 
y3) {
+void fltk3::Device::loop(int x, int y, int x1, int y1, int x2, int y2, int x3, 
int y3) {
 #if defined(USE_X11)
   XPoint p[5];
   p[0].x = x;  p[0].y = y;
@@ -323,7 +323,7 @@
 #endif
 }
 
-void Fl_Device::polygon(int x, int y, int x1, int y1, int x2, int y2) {
+void fltk3::Device::polygon(int x, int y, int x1, int y1, int x2, int y2) {
   XPoint p[4];
   p[0].x = x;  p[0].y = y;
   p[1].x = x1; p[1].y = y1;
@@ -348,7 +348,7 @@
 #endif
 }
 
-void Fl_Device::polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, 
int y3) {
+void fltk3::Device::polygon(int x, int y, int x1, int y1, int x2, int y2, int 
x3, int y3) {
   XPoint p[5];
   p[0].x = x;  p[0].y = y;
   p[1].x = x1; p[1].y = y1;
@@ -375,7 +375,7 @@
 #endif
 }
 
-void Fl_Device::point(int x, int y) {
+void fltk3::Device::point(int x, int y) {
 #if defined(USE_X11)
   XDrawPoint(fl_display, fl_window, fl_gc, x, y);
 #elif defined(WIN32)
@@ -450,7 +450,7 @@
   return rstack[rstackptr];
 }
 
-void Fl_Device::push_clip(int x, int y, int w, int h) {
+void fltk3::Device::push_clip(int x, int y, int w, int h) {
   Fl_Region r;
   if (w > 0 && h > 0) {
     r = XRectangleRegion(x,y,w,h);
@@ -487,14 +487,14 @@
 }
 
 // make there be no clip (used by fl_begin_offscreen() only!)
-void Fl_Device::push_no_clip() {
+void fltk3::Device::push_no_clip() {
   if (rstackptr < STACK_MAX) rstack[++rstackptr] = 0;
   else fltk3::warning("fl_push_no_clip: clip stack overflow!\n");
   fl_restore_clip();
 }
 
 // pop back to previous clip:
-void Fl_Device::pop_clip() {
+void fltk3::Device::pop_clip() {
   if (rstackptr > 0) {
     Fl_Region oldr = rstack[rstackptr--];
     if (oldr) XDestroyRegion(oldr);
@@ -502,7 +502,7 @@
   fl_restore_clip();
 }
 
-int Fl_Device::not_clipped(int x, int y, int w, int h) {
+int fltk3::Device::not_clipped(int x, int y, int w, int h) {
   if (x+w <= 0 || y+h <= 0) return 0;
   Fl_Region r = rstack[rstackptr];
 #if defined (USE_X11)
@@ -510,7 +510,7 @@
 #elif defined(WIN32)
   if (!r) return 1;
   RECT rect;
-  if (Fl_Device::current()->type() == Fl_Device::gdi_printer) { // in case of 
print context, convert coords from logical to device
+  if (fltk3::Device::current()->type() == fltk3::Device::gdi_printer) { // in 
case of print context, convert coords from logical to device
     POINT pt[2] = { {x, y}, {x + w, y + h} };
     LPtoDP(fl_gc, pt, 2);
     rect.left = pt[0].x; rect.top = pt[0].y; rect.right = pt[1].x; rect.bottom 
= pt[1].y;
@@ -533,7 +533,7 @@
 }
 
 // return rectangle surrounding intersection of this rectangle and clip:
-int Fl_Device::clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, 
int& H){
+int fltk3::Device::clip_box(int x, int y, int w, int h, int& X, int& Y, int& 
W, int& H){
   X = x; Y = y; W = w; H = h;
   Fl_Region r = rstack[rstackptr];
   if (!r) return 0;
@@ -572,7 +572,7 @@
   } else {     // partial intersection
     RECT rect;
     GetRgnBox(temp, &rect);
-    if(Fl_Device::current()->type() == Fl_Device::gdi_printer) { // if print 
context, convert coords from device to logical
+    if(fltk3::Device::current()->type() == fltk3::Device::gdi_printer) { // if 
print context, convert coords from device to logical
       POINT pt[2] = { {rect.left, rect.top}, {rect.right, rect.bottom} };
       DPtoLP(fl_gc, pt, 2);
       X = pt[0].x; Y = pt[0].y; W = pt[1].x - X; H = pt[1].y - Y;

Modified: branches/branch-3.0/src/fl_vertex.cxx
===================================================================
--- branches/branch-3.0/src/fl_vertex.cxx       2010-04-04 19:08:22 UTC (rev 
7418)
+++ branches/branch-3.0/src/fl_vertex.cxx       2010-04-04 19:37:35 UTC (rev 
7419)
@@ -145,13 +145,13 @@
 static int what;
 enum {LINE, LOOP, POLYGON, POINT_};
 
-void Fl_Device::begin_points() {n = 0; what = POINT_;}
+void fltk3::Device::begin_points() {n = 0; what = POINT_;}
 
-void Fl_Device::begin_line() {n = 0; what = LINE;}
+void fltk3::Device::begin_line() {n = 0; what = LINE;}
 
-void Fl_Device::begin_loop() {n = 0; what = LOOP;}
+void fltk3::Device::begin_loop() {n = 0; what = LOOP;}
 
-void Fl_Device::begin_polygon() {n = 0; what = POLYGON;}
+void fltk3::Device::begin_polygon() {n = 0; what = POLYGON;}
 
 /**
   Transforms coordinate using the current transformation matrix.
@@ -189,7 +189,7 @@
   }
 }
 
-void Fl_Device::transformed_vertex(double xf, double yf) {
+void fltk3::Device::transformed_vertex(double xf, double yf) {
 #ifdef __APPLE_QUARTZ__
   fl_transformed_vertex(COORD_T(xf), COORD_T(yf));
 #else
@@ -197,11 +197,11 @@
 #endif
 }
 
-void Fl_Device::vertex(double x,double y) {
+void fltk3::Device::vertex(double x,double y) {
   fl_transformed_vertex(x*m.a + y*m.c + m.x, x*m.b + y*m.d + m.y);
 }
 
-void Fl_Device::end_points() {
+void fltk3::Device::end_points() {
 #if defined(USE_X11)
   if (n>1) XDrawPoints(fl_display, fl_window, fl_gc, p, n, 0);
 #elif defined(WIN32)
@@ -219,7 +219,7 @@
 #endif
 }
 
-void Fl_Device::end_line() {
+void fltk3::Device::end_line() {
   if (n < 2) {
     fl_end_points();
     return;
@@ -245,13 +245,13 @@
   while (n>2 && p[n-1].x == p[0].x && p[n-1].y == p[0].y) n--;
 }
 
-void Fl_Device::end_loop() {
+void fltk3::Device::end_loop() {
   fixloop();
   if (n>2) fl_transformed_vertex((COORD_T)p[0].x, (COORD_T)p[0].y);
   fl_end_line();
 }
 
-void Fl_Device::end_polygon() {
+void fltk3::Device::end_polygon() {
   fixloop();
   if (n < 3) {
     fl_end_line();
@@ -284,7 +284,7 @@
 static int numcount;
 #endif
 
-void Fl_Device::begin_complex_polygon() {
+void fltk3::Device::begin_complex_polygon() {
   fl_begin_polygon();
   gap_ = 0;
 #if defined(WIN32)
@@ -292,7 +292,7 @@
 #endif
 }
 
-void Fl_Device::gap() {
+void fltk3::Device::gap() {
   while (n>gap_+2 && p[n-1].x == p[gap_].x && p[n-1].y == p[gap_].y) n--;
   if (n > gap_+2) {
     fl_transformed_vertex((COORD_T)p[gap_].x, (COORD_T)p[gap_].y);
@@ -305,7 +305,7 @@
   }
 }
 
-void Fl_Device::end_complex_polygon() {
+void fltk3::Device::end_complex_polygon() {
   fl_gap();
   if (n < 3) {
     fl_end_line();
@@ -336,7 +336,7 @@
 // warning: these do not draw rotated ellipses correctly!
 // See fl_arc.c for portable version.
 
-void Fl_Device::circle(double x, double y,double r) {
+void fltk3::Device::circle(double x, double y,double r) {
   double xt = fl_transform_x(x,y);
   double yt = fl_transform_y(x,y);
   double rx = r * (m.c ? sqrt(m.a*m.a+m.c*m.c) : fabs(m.a));

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to