a9fd08ff5a
Uncomment `ENABLED_SECTIONS += DriverDev` in documentation/Doxyfile.in to enable driver documentation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
65 lines
1.7 KiB
C++
65 lines
1.7 KiB
C++
//
|
|
// "$Id$"
|
|
//
|
|
// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK).
|
|
//
|
|
// Copyright 1998-2016 by Bill Spitzak and others.
|
|
//
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
// file is missing or damaged, see the license at:
|
|
//
|
|
// http://www.fltk.org/COPYING.php
|
|
//
|
|
// Please report all bugs and problems on the following page:
|
|
//
|
|
// http://www.fltk.org/str.php
|
|
//
|
|
|
|
#include <FL/Fl_Copy_Surface.H>
|
|
|
|
/** the constructor
|
|
\param w, h Width and height of the drawing surface in FLTK units */
|
|
Fl_Copy_Surface::Fl_Copy_Surface(int w, int h) : Fl_Widget_Surface(NULL) {
|
|
platform_surface = Fl_Copy_Surface_Driver::newCopySurfaceDriver(w, h);
|
|
if (platform_surface) driver(platform_surface->driver());
|
|
}
|
|
|
|
/** the destructor */
|
|
Fl_Copy_Surface::~Fl_Copy_Surface() { delete platform_surface; }
|
|
|
|
void Fl_Copy_Surface::origin(int x, int y) {platform_surface->origin(x, y);}
|
|
|
|
void Fl_Copy_Surface::origin(int *x, int *y) {
|
|
if (platform_surface) platform_surface->origin(x, y);
|
|
}
|
|
|
|
void Fl_Copy_Surface::set_current() {
|
|
if (platform_surface) platform_surface->set_current();
|
|
}
|
|
|
|
void Fl_Copy_Surface::translate(int x, int y) {
|
|
if (platform_surface) platform_surface->translate(x, y);
|
|
}
|
|
|
|
void Fl_Copy_Surface::untranslate() {
|
|
if (platform_surface) platform_surface->untranslate();
|
|
}
|
|
|
|
int Fl_Copy_Surface::w() {return platform_surface ? platform_surface->width : 0;}
|
|
|
|
int Fl_Copy_Surface::h() {return platform_surface ? platform_surface->height : 0;}
|
|
|
|
int Fl_Copy_Surface::printable_rect(int *w, int *h) {
|
|
if (platform_surface)
|
|
return platform_surface->printable_rect(w, h);
|
|
else {
|
|
*w = *h = 0;
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
//
|
|
// End of "$Id$".
|
|
//
|