From 495b3b5af5051dd69f595aa05989f679ed992fef Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 12 Dec 2010 16:13:55 +0000 Subject: Moved enums Page_Format and Page_Layout to class Fl_Paged_Device where they are better located. Small reorganization of device-related include files. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8017 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Device.H | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'FL/Fl_Device.H') diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index 39a0d4895..975c99aa2 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -26,7 +26,8 @@ // http://www.fltk.org/str.php // /** \file Fl_Device.H - \brief declaration of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device. + \brief declaration of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, + Fl_Display_Device, Fl_Device_Plugin. */ #ifndef Fl_Device_H @@ -374,6 +375,28 @@ public: static Fl_Display_Device *display_device() { return fl_display_device; }; }; +/** + This plugin socket allows the integration of new device drivers for special + window or screen types. It is currently used to provide an automated printing + service for OpenGL windows, if linked with fltk_gl. + */ +class Fl_Device_Plugin : public Fl_Plugin { +public: + /** \brief The constructor */ + Fl_Device_Plugin(const char *name) + : Fl_Plugin(klass(), name) { } + /** \brief Returns the class name */ + virtual const char *klass() { return "fltk:device"; } + /** \brief Returns the plugin name */ + virtual const char *name() = 0; + /** \brief Prints a widget + \param w the widget + \param x,y offsets where to print relatively to coordinates origin + \param height height of the current drawing area + */ + virtual int print(Fl_Widget* w, int x, int y, int height) { return 0; } +}; + #endif // Fl_Device_H // -- cgit v1.2.3