FLTK 1.3.3
|
Supports copying of graphical data to the clipboard. More...
#include <Fl_Copy_Surface.H>
Public Member Functions | |
const char * | class_name () |
Returns the name of the class of this object. More... | |
void | draw (Fl_Widget *widget, int delta_x=0, int delta_y=0) |
Copies a widget in the clipboard. More... | |
Fl_Copy_Surface (int w, int h) | |
Constructor. More... | |
void | set_current () |
Use this drawing surface for future graphics requests. More... | |
~Fl_Copy_Surface () | |
Destructor. | |
Public Member Functions inherited from Fl_Surface_Device | |
const char * | class_name () |
Returns the name of the class of this object. More... | |
void | driver (Fl_Graphics_Driver *graphics_driver) |
Sets the graphics driver of this drawing surface. More... | |
Fl_Graphics_Driver * | driver () |
Returns the graphics driver of this drawing surface. More... | |
virtual | ~Fl_Surface_Device () |
The destructor. More... | |
Public Member Functions inherited from Fl_Device | |
virtual | ~Fl_Device () |
Virtual destructor. More... | |
Static Public Attributes | |
static const char * | class_id = "Fl_Copy_Surface" |
Static Public Attributes inherited from Fl_Surface_Device | |
static const char * | class_id = "Fl_Surface_Device" |
Static Public Attributes inherited from Fl_Device | |
static const char * | class_id = "Fl_Device" |
A string that identifies each subclass of Fl_Device. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Fl_Surface_Device | |
static Fl_Surface_Device * | surface () |
the surface that currently receives graphics output | |
Protected Member Functions inherited from Fl_Surface_Device | |
Fl_Surface_Device (Fl_Graphics_Driver *graphics_driver) | |
Constructor that sets the graphics driver to use for the created surface. More... | |
Supports copying of graphical data to the clipboard.
After creation of an Fl_Copy_Surface object, call set_current() on it, and all subsequent graphics requests will be recorded in the clipboard. It's possible to draw widgets (using Fl_Copy_Surface::draw() ) or to use any of the Drawing functions or the Color & Font functions. Finally, delete the Fl_Copy_Surface object to load the clipboard with the graphical data.
Fl_GL_Window 's can be copied to the clipboard as well.
Usage example:
Platform details:
Fl_Copy_Surface::Fl_Copy_Surface | ( | int | w, |
int | h | ||
) |
Constructor.
w | and |
h | are the width and height of the clipboard surface in pixels where drawing will occur. |
|
inlinevirtual |
Returns the name of the class of this object.
Use of the class_name() function is discouraged because it will be removed from future FLTK versions.
The class of an instance of an Fl_Device subclass can be checked with code such as:
Reimplemented from Fl_Device.
void Fl_Copy_Surface::draw | ( | Fl_Widget * | widget, |
int | delta_x = 0 , |
||
int | delta_y = 0 |
||
) |
Copies a widget in the clipboard.
widget | any FLTK widget (e.g., standard, custom, window, GL view) to copy |
delta_x | and |
delta_y | give the position in the clipboard of the top-left corner of the widget |
|
virtual |
Use this drawing surface for future graphics requests.
Reimplemented from Fl_Surface_Device.