summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-25 17:56:48 +0000
committerManolo Gouy <Manolo>2016-02-25 17:56:48 +0000
commit7f17b915db467ed1b49ce1b4a0bb7f36dc5cba85 (patch)
tree667444a3146af11c9ef253f906ec5b39f8342bbc /src
parent31793cbdba8e318350c5ed11b06d5a678eb15608 (diff)
Remove the useless pseudo run-time type information supported by the Fl_Device class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11217 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Copy_Surface.cxx12
-rw-r--r--src/Fl_Device.cxx9
-rw-r--r--src/Fl_Graphics_Driver.cxx4
-rw-r--r--src/Fl_Image_Surface.cxx4
-rw-r--r--src/Fl_Paged_Device.cxx2
-rw-r--r--src/Fl_PostScript.cxx2
-rw-r--r--src/Fl_Printer.cxx12
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx5
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.h6
-rw-r--r--src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx3
-rw-r--r--src/drivers/OpenGL/Fl_OpenGL_Display_Device.h2
-rw-r--r--src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx5
-rw-r--r--src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.h2
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Display_Device.cxx4
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx3
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver.h2
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx3
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h4
18 files changed, 7 insertions, 77 deletions
diff --git a/src/Fl_Copy_Surface.cxx b/src/Fl_Copy_Surface.cxx
index cb051d3c3..1837e08ac 100644
--- a/src/Fl_Copy_Surface.cxx
+++ b/src/Fl_Copy_Surface.cxx
@@ -33,7 +33,6 @@ int Fl_Quartz_Surface_::printable_rect(int *w, int *h) {
return 0;
}
-const char *Fl_Quartz_Surface_::class_id = "Fl_Quartz_Surface_";
#elif defined(WIN32)
@@ -60,13 +59,9 @@ void Fl_GDI_Surface_::untranslate() {
SetWindowOrgEx((HDC)driver()->gc(), origins[depth].x, origins[depth].y, NULL);
}
-const char *Fl_GDI_Surface_::class_id = "Fl_GDI_Surface_";
-
#endif
-const char *Fl_Copy_Surface::class_id = "Fl_Copy_Surface";
-
/** Constructor.
\param w and \param h are the width and height of the clipboard surface
in pixels where drawing will occur.
@@ -243,8 +238,6 @@ class Fl_translated_Xlib_Graphics_Driver_ : public Fl_Xlib_Graphics_Driver {
unsigned depth; // depth of translation stack
int stack_x[20], stack_y[20]; // translation stack allowing cumulative translations
public:
- static const char *class_id;
- const char *class_name() {return class_id;};
Fl_translated_Xlib_Graphics_Driver_() {
offset_x = 0; offset_y = 0;
depth = 0;
@@ -258,7 +251,7 @@ public:
push_matrix();
translate(dx, dy);
if (depth < sizeof(stack_x)/sizeof(int)) depth++;
- else Fl::warning("%s: translate stack overflow!", class_id);
+ else Fl::warning("%s: translate stack overflow!", "Fl_translated_Xlib_Graphics_Driver_");
}
void untranslate_all() { // undoes previous translate_all()
if (depth > 0) depth--;
@@ -353,7 +346,6 @@ public:
void point(int x, int y) { Fl_Xlib_Graphics_Driver::point(x+offset_x, y+offset_y); }
};
-const char *Fl_translated_Xlib_Graphics_Driver_::class_id = "Fl_translated_Xlib_Graphics_Driver_";
void Fl_Xlib_Surface_::translate(int x, int y) {
((Fl_translated_Xlib_Graphics_Driver_*)driver())->translate_all(x, y);
@@ -369,8 +361,6 @@ Fl_Xlib_Surface_::~Fl_Xlib_Surface_() {
delete driver();
}
-const char *Fl_Xlib_Surface_::class_id = "Fl_Xlib_Surface_";
-
#endif
//
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx
index 67a9b4256..7a2b9bca5 100644
--- a/src/Fl_Device.cxx
+++ b/src/Fl_Device.cxx
@@ -23,8 +23,7 @@
/* Attempt at an inheritance diagram.
- Fl_Device: base class for the core device systems
- |
+
+- Fl_Surface_Device: any kind of surface that we can draw onto -> uses an Fl_Graphics_Driver
|
+- Fl_Display_Device: some kind of video device
@@ -38,7 +37,7 @@
+- Fl_PostScript_File_Device
|
+- Fl_PostScript_Printer
- |
+
+- Fl_Graphics_Driver
|
+- Fl_..._Graphics_Driver: platform specific graphics driver
@@ -49,10 +48,6 @@ TODO:
*/
-const char *Fl_Device::class_id = "Fl_Device";
-const char *Fl_Surface_Device::class_id = "Fl_Surface_Device";
-const char *Fl_Display_Device::class_id = "Fl_Display_Device";
-
bool Fl_Display_Device::high_res_window_ = false;
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx
index 365f1df5e..d8d0a8d5a 100644
--- a/src/Fl_Graphics_Driver.cxx
+++ b/src/Fl_Graphics_Driver.cxx
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// implementation of Fl_Device class for the Fast Light Tool Kit (FLTK).
+// implementation of Fl_Graphics_Driver class for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2012 by Bill Spitzak and others.
//
@@ -22,8 +22,6 @@
#include <FL/Fl_Image.H>
#include <FL/fl_draw.H>
-const char *Fl_Graphics_Driver::class_id = "Fl_Graphics_Driver";
-
FL_EXPORT Fl_Graphics_Driver *fl_graphics_driver; // the current target device of graphics operations
const Fl_Graphics_Driver::matrix Fl_Graphics_Driver::m0 = {1, 0, 0, 1, 0, 0};
diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx
index a40a4f716..ea1d372e8 100644
--- a/src/Fl_Image_Surface.cxx
+++ b/src/Fl_Image_Surface.cxx
@@ -32,8 +32,6 @@
#else
#endif
-const char *Fl_Image_Surface::class_id = "Fl_Image_Surface";
-
/** Constructor with optional high resolution.
\param w and \param h give the size in pixels of the resulting image.
\param highres if non-zero, the surface pixel size is twice as high and wide as w and h,
@@ -200,8 +198,6 @@ void Fl_Quartz_Flipped_Surface_::untranslate() {
CGContextRestoreGState((CGContextRef)driver()->gc());
}
-const char *Fl_Quartz_Flipped_Surface_::class_id = "Fl_Quartz_Flipped_Surface_";
-
#endif
/** Draws a window and its borders and title bar to the image drawing surface.
diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx
index 9e2523cd5..51bedc127 100644
--- a/src/Fl_Paged_Device.cxx
+++ b/src/Fl_Paged_Device.cxx
@@ -29,8 +29,6 @@
#include "drivers/Quartz/Fl_Quartz_Graphics_Driver.h"
#endif
-const char *Fl_Paged_Device::class_id = "Fl_Paged_Device";
-
/**
@brief Draws the widget on the printed page.
*
diff --git a/src/Fl_PostScript.cxx b/src/Fl_PostScript.cxx
index 58a1bef7e..6ff365706 100644
--- a/src/Fl_PostScript.cxx
+++ b/src/Fl_PostScript.cxx
@@ -32,8 +32,6 @@
#endif
#endif
-const char *Fl_PostScript_Graphics_Driver::class_id = "Fl_PostScript_Graphics_Driver";
-const char *Fl_PostScript_File_Device::class_id = "Fl_PostScript_File_Device";
/** \brief Label of the PostScript file chooser window */
const char *Fl_PostScript_File_Device::file_chooser_title = "Select a .ps file";
diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx
index 92ddbfafc..4b559a2d2 100644
--- a/src/Fl_Printer.cxx
+++ b/src/Fl_Printer.cxx
@@ -19,8 +19,6 @@
#include <FL/Fl_Printer.H>
-const char *Fl_Printer::class_id = "Fl_Printer";
-
#ifdef NO_PRINT_SUPPORT
Fl_Printer::Fl_Printer(void) {
@@ -116,16 +114,6 @@ const char *Fl_Printer::property_save = "Save";
/** [this text may be customized at run-time] */
const char *Fl_Printer::property_cancel = "Cancel";
-#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN) // PORTME: Fl_Screen_Driver - platform printing
-const char *Fl_System_Printer::class_id = Fl_Printer::class_id;
-#endif
-#if defined(__APPLE__) || defined(WIN32)
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: implement the printer device specifics"
-#else
-const char *Fl_PostScript_Printer::class_id = Fl_Printer::class_id;
-#endif
-
#if defined(__APPLE__) || defined(WIN32) // PORTME: Fl_Screen_Driver - platform printing
void Fl_System_Printer::origin(int *x, int *y)
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
index 74ca1345c..175a48e7e 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
@@ -22,11 +22,6 @@
#include "Fl_GDI_Graphics_Driver.h"
-const char *Fl_GDI_Graphics_Driver::class_id = "Fl_GDI_Graphics_Driver";
-
-// FIXME: move to printer graphics driver
-const char *Fl_GDI_Printer_Graphics_Driver::class_id = "Fl_GDI_Printer_Graphics_Driver";
-
/* Reference to the current device context
For back-compatibility only. The preferred procedure to get this reference is
Fl_Surface_Device::surface()->driver()->gc().
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.h b/src/drivers/GDI/Fl_GDI_Graphics_Driver.h
index 32c17d1b9..6852b4beb 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.h
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.h
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// Definition of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device
+// Definition of classes Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device
// for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2016 by Bill Spitzak and others.
@@ -43,8 +43,6 @@ protected:
void mask_bitmap(uchar **value) { mask_bitmap_ = value; }
public:
Fl_GDI_Graphics_Driver() {mask_bitmap_ = NULL;}
- static const char *class_id;
- const char *class_name() {return class_id;};
virtual int has_feature(driver_feature mask) { return mask & NATIVE; }
char can_do_alpha_blending();
virtual void gc(void *ctxt) {if (ctxt != gc_) global_gc(); gc_ = (HDC)ctxt;}
@@ -132,9 +130,7 @@ protected:
*/
class FL_EXPORT Fl_GDI_Printer_Graphics_Driver : public Fl_GDI_Graphics_Driver {
public:
- static const char *class_id;
virtual int has_feature(driver_feature mask) { return mask & (NATIVE | PRINTER); }
- const char *class_name() {return class_id;};
void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy);
void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy);
int draw_scaled(Fl_Image *img, int XP, int YP, int WP, int HP);
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx
index b81e481c8..bd2ab3b58 100644
--- a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx
+++ b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx
@@ -37,9 +37,6 @@ Fl_OpenGL_Display_Device::Fl_OpenGL_Display_Device(Fl_OpenGL_Graphics_Driver *gr
{
}
-const char *Fl_OpenGL_Display_Device::class_id = "Fl_OpenGL_Display_Device";
-
-
//
// End of "$Id$".
//
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.h b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.h
index ef78bbad8..9730fc9c4 100644
--- a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.h
+++ b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.h
@@ -27,8 +27,6 @@ class Fl_OpenGL_Graphics_Driver;
*/
class FL_EXPORT Fl_OpenGL_Display_Device : public Fl_Surface_Device {
public:
- static const char *class_id;
- const char *class_name() {return class_id;};
Fl_OpenGL_Display_Device(Fl_OpenGL_Graphics_Driver *graphics_driver);
static Fl_OpenGL_Display_Device *display_device();
};
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx
index ff59992d8..af0d3935c 100644
--- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx
+++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx
@@ -19,14 +19,9 @@
#ifndef FL_CFG_GFX_OPENGL_CXX
#define FL_CFG_GFX_OPENGL_CXX
-
#include <FL/gl.h>
#include "Fl_OpenGL_Graphics_Driver.h"
-
-const char *Fl_OpenGL_Graphics_Driver::class_id = "Fl_OpenGL_Graphics_Driver";
-
-
#endif // FL_CFG_GFX_OPENGL_RECT_CXX
//
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.h b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.h
index d4e7074fe..b12e661f9 100644
--- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.h
+++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.h
@@ -33,8 +33,6 @@
*/
class FL_EXPORT Fl_OpenGL_Graphics_Driver : public Fl_Graphics_Driver {
public:
- static const char *class_id;
- const char *class_name() {return class_id;};
// --- line and polygon drawing with integer coordinates
void point(int x, int y);
void rect(int x, int y, int w, int h);
diff --git a/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx b/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx
index 36a54dc57..0983738d9 100644
--- a/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// implementation of Fl_Device class for the Fast Light Tool Kit (FLTK).
+// implementation of Fl_Display_Device class for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2016 by Bill Spitzak and others.
//
@@ -19,8 +19,6 @@
// FIXME: implement this
#if 0
-const char *Fl_Display_Device::class_id = "Fl_Display_Device";
-
/** A constructor that sets the graphics driver used by the display */
Fl_Display_Device::Fl_Display_Device(Fl_Graphics_Driver *graphics_driver) : Fl_Surface_Device(graphics_driver) {
this->set_current();
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
index 8f14af883..32e67a7b2 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
@@ -20,9 +20,6 @@
#include "../../config_lib.h"
#include "Fl_Quartz_Graphics_Driver.h"
-
-const char *Fl_Quartz_Graphics_Driver::class_id = "Fl_Quartz_Graphics_Driver";
-
/* Reference to the current CGContext
For back-compatibility only. The preferred procedure to get this reference is
Fl_Surface_Device::surface()->driver()->gc().
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.h b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.h
index 22b2eaef4..de34ea36a 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.h
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.h
@@ -42,8 +42,6 @@ class Fl_Quartz_Graphics_Driver : public Fl_Graphics_Driver {
protected:
CGContextRef gc_;
public:
- static const char *class_id;
- const char *class_name() {return class_id;};
virtual int has_feature(driver_feature mask) { return mask & NATIVE; }
virtual void gc(void *ctxt) {if (ctxt != gc_) global_gc(); gc_ = (CGContextRef)ctxt; }
virtual void *gc() {return gc_;}
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
index ebaf0792b..76060a62c 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
@@ -27,9 +27,6 @@
#include <X11/extensions/Xrender.h>
#endif
-
-const char *Fl_Xlib_Graphics_Driver::class_id = "Fl_Xlib_Graphics_Driver";
-
/* Reference to the current graphics context
For back-compatibility only. The preferred procedure to get this pointer is
Fl_Surface_Device::surface()->driver()->gc().
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h
index 7c1f4799a..6c7c402c3 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// Definition of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device
+// Definition of classes Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device
// for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2016 by Bill Spitzak and others.
@@ -39,9 +39,7 @@ protected:
uchar **mask_bitmap() {return mask_bitmap_;}
void mask_bitmap(uchar **value) { mask_bitmap_ = value; }
public:
- static const char *class_id;
Fl_Xlib_Graphics_Driver(void);
- const char *class_name() {return class_id;};
virtual int has_feature(driver_feature mask) { return mask & NATIVE; }
virtual void *gc() { return gc_; }
char can_do_alpha_blending();