summaryrefslogtreecommitdiff
path: root/FL/Fl_Device.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-12-12 16:13:55 +0000
committerManolo Gouy <Manolo>2010-12-12 16:13:55 +0000
commit495b3b5af5051dd69f595aa05989f679ed992fef (patch)
treefd6f1aabff65fdd45ba423dd668fd7ef3dd5f0c7 /FL/Fl_Device.H
parentfc25ffc246ad455f66f9efa6f0d75919ff3067be (diff)
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
Diffstat (limited to 'FL/Fl_Device.H')
-rw-r--r--FL/Fl_Device.H25
1 files changed, 24 insertions, 1 deletions
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
//