summaryrefslogtreecommitdiff
path: root/FL/Fl_Copy_Surface.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-26 12:51:47 +0000
committerManolo Gouy <Manolo>2016-02-26 12:51:47 +0000
commit682f95079691dd9c9b0677cb66e727397f910e0d (patch)
tree9be00996ebe41d8d87fb1965ceff4f6f69b41310 /FL/Fl_Copy_Surface.H
parente1f5f5f7ec75ed203fb14571e6bcbf6b0bd30771 (diff)
Create class Fl_Widget_Surface that supports draw(Fl_Widget *, int, int).
This simplifies the implementation of Fl_Copy_Surface and Fl_Image_Surface which now are made to derive from Fl_Widget_Surface. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Copy_Surface.H')
-rw-r--r--FL/Fl_Copy_Surface.H40
1 files changed, 4 insertions, 36 deletions
diff --git a/FL/Fl_Copy_Surface.H b/FL/Fl_Copy_Surface.H
index 7bd26ee01..292d04577 100644
--- a/FL/Fl_Copy_Surface.H
+++ b/FL/Fl_Copy_Surface.H
@@ -48,11 +48,10 @@
Applications to which the clipboard content is pasted can use the flavor that suits them best.
\li X11: the graphical data are copied to the clipboard as an image in BMP format.
*/
-class FL_EXPORT Fl_Copy_Surface : public Fl_Surface_Device {
+class FL_EXPORT Fl_Copy_Surface : public Fl_Widget_Surface {
private:
int width;
int height;
- Fl_Paged_Device *helper;
#ifdef __APPLE__ // PORTME: Fl_Surface_Driver - platform surface driver
CFMutableDataRef pdfdata;
CGContextRef oldgc;
@@ -72,12 +71,13 @@ private:
Window oldwindow;
Fl_Surface_Device *_ss;
#endif
+protected:
+ void translate(int x, int y);
+ void untranslate();
public:
Fl_Copy_Surface(int w, int h);
~Fl_Copy_Surface();
void set_current();
- void draw(Fl_Widget* widget, int delta_x = 0, int delta_y = 0);
- void draw_decorated_window(Fl_Window* win, int delta_x = 0, int delta_y = 0);
/** Returns the pixel width of the copy surface */
int w() { return width; }
/** Returns the pixel height of the copy surface */
@@ -86,47 +86,15 @@ public:
#if defined(__APPLE__) // PORTME: Fl_Surface_Driver - platform surface driver
-/* Mac class to reimplement Fl_Paged_Device::printable_rect() */
-class FL_EXPORT Fl_Quartz_Surface_ : public Fl_System_Printer {
-protected:
- int width;
- int height;
-public:
- Fl_Quartz_Surface_(int w, int h);
- virtual int printable_rect(int *w, int *h);
- virtual ~Fl_Quartz_Surface_() {};
-};
#elif defined(WIN32)
-/* Win class to implement translate()/untranslate() */
-class FL_EXPORT Fl_GDI_Surface_ : public Fl_Paged_Device {
- int width;
- int height;
- unsigned depth;
- POINT origins[10];
-public:
- Fl_GDI_Surface_();
- virtual void translate(int x, int y);
- virtual void untranslate();
- virtual ~Fl_GDI_Surface_();
-};
-
#elif defined(FL_PORTING)
# pragma message "FL_PORTING: define a drawing surface for your platform"
#elif !defined(FL_DOXYGEN)
-/* Xlib class to implement translate()/untranslate() */
-class FL_EXPORT Fl_Xlib_Surface_ : public Fl_Paged_Device {
-public:
- Fl_Xlib_Surface_();
- virtual void translate(int x, int y);
- virtual void untranslate();
- virtual ~Fl_Xlib_Surface_();
-};
-
#endif
#endif // Fl_Copy_Surface_H