summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-04-10 13:14:04 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-04-10 13:14:04 +0200
commit7a0bebb22fba0e2ed260b513421f6082a1c27a9e (patch)
tree2dd0a5b06a4f404767527722bb3de2b08a3db05c /FL
parent22a5dc3085836f17c0e895040b7dac4a7a0919c5 (diff)
New virtual member function bool Fl_Surface_Device::is_current()
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Copy_Surface.H10
-rw-r--r--FL/Fl_Device.H1
-rw-r--r--FL/Fl_Image_Surface.H11
-rw-r--r--FL/Fl_Printer.H1
4 files changed, 13 insertions, 10 deletions
diff --git a/FL/Fl_Copy_Surface.H b/FL/Fl_Copy_Surface.H
index afbe2e290..9fb5021c7 100644
--- a/FL/Fl_Copy_Surface.H
+++ b/FL/Fl_Copy_Surface.H
@@ -56,6 +56,7 @@ public:
Fl_Copy_Surface(int w, int h);
~Fl_Copy_Surface();
void set_current();
+ virtual bool is_current();
/** Returns the pixel width of the copy surface */
int w();
/** Returns the pixel height of the copy surface */
@@ -87,11 +88,10 @@ protected:
int height;
Fl_Copy_Surface_Driver(int w, int h) : Fl_Widget_Surface(NULL), width(w), height(h) {}
virtual ~Fl_Copy_Surface_Driver() {}
- virtual void set_current() {}
- virtual void translate(int x, int y) {}
- virtual void untranslate() {}
- int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
- virtual Fl_RGB_Image *image() {return NULL;}
+ virtual void set_current() = 0;
+ virtual void translate(int x, int y) = 0;
+ virtual void untranslate() = 0;
+ int printable_rect(int *w, int *h);
/** Each platform implements this function its own way.
It returns an object implementing all virtual functions
of class Fl_Copy_Surface_Driver for the plaform.
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H
index d2b9cfabb..fc3664408 100644
--- a/FL/Fl_Device.H
+++ b/FL/Fl_Device.H
@@ -77,6 +77,7 @@ protected:
Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; }
public:
virtual void set_current(void);
+ virtual bool is_current();
/** \brief Sets the graphics driver of this drawing surface. */
inline void driver(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver;};
/** \brief Returns the graphics driver of this drawing surface. */
diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H
index 3ec0f93cf..34121d043 100644
--- a/FL/Fl_Image_Surface.H
+++ b/FL/Fl_Image_Surface.H
@@ -76,6 +76,7 @@ public:
Fl_Image_Surface(int w, int h, int high_res = 0, Fl_Offscreen off = 0);
~Fl_Image_Surface();
void set_current();
+ virtual bool is_current();
Fl_RGB_Image *image();
Fl_Shared_Image *highres_image();
void origin(int *x, int *y);
@@ -106,11 +107,11 @@ protected:
int external_offscreen;
Fl_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off) : Fl_Widget_Surface(NULL), width(w), height(h), offscreen(off) {external_offscreen = (off != 0);}
virtual ~Fl_Image_Surface_Driver() {}
- virtual void set_current() {}
- virtual void translate(int x, int y) {}
- virtual void untranslate() {}
- int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
- virtual Fl_RGB_Image *image() {return NULL;}
+ virtual void set_current() = 0;
+ virtual void translate(int x, int y) = 0;
+ virtual void untranslate() = 0;
+ int printable_rect(int *w, int *h);
+ virtual Fl_RGB_Image *image() = 0;
/** Each platform implements this function its own way.
It returns an object implementing all virtual functions
of class Fl_Image_Surface_Driver for the plaform.
diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H
index 825f765d9..8d3219783 100644
--- a/FL/Fl_Printer.H
+++ b/FL/Fl_Printer.H
@@ -105,6 +105,7 @@ public:
void end_job (void);
void draw_decorated_window(Fl_Window *win, int x_offset, int y_offset);
void set_current(void);
+ virtual bool is_current();
/** \name These attributes are useful for the Linux/Unix platform only.
\{