#include <Fl_Native_Printer.H>
Public Member Functions | |
| Fl_Native_Printer (void) | |
| The constructor. | |
| int | startjob (int pagecount, int *frompage, int *topage) |
| Starts a print job. | |
| int | startpage (int left_margin=0, int top_margin=0) |
| Starts a new printed page. | |
| int | getprintablerect (int *x, int *y, int *w, int *h) |
| Computes the origin and size of the printable area of the page. | |
| int | setclip (int x, int y, int w, int h) |
| Sets the clip zone for further drawing operations. | |
| int | endpage (void) |
| To be called at the end of each page. | |
| void | endjob (void) |
| To be called at the end of a print job. | |
This class provides an OS-independent interface to printing under MSWindows and Mac OS X only. It allows to use all FLTK drawing, color, and text functions, and to have them operate on printed page(s). FLTK clip functions should not be used in a print context, member function setclip() is to be used instead.
| int Fl_Native_Printer::endpage | ( | void | ) |
To be called at the end of each page.
| int Fl_Native_Printer::getprintablerect | ( | int * | x, | |
| int * | y, | |||
| int * | w, | |||
| int * | h | |||
| ) |
Computes the origin and size of the printable area of the page.
Values are in the same unit as that used by FLTK drawing functions. This unit accounts for the effect of the startpage() function when getprintablerect() is called after startpage().
| int Fl_Native_Printer::setclip | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) |
Sets the clip zone for further drawing operations.
A new clip call resets any previous one.
| int Fl_Native_Printer::startjob | ( | int | pagecount, | |
| int * | frompage, | |||
| int * | topage | |||
| ) |
Starts a print job.
| pagecount | the total number of pages of the job | |
| frompage | is returned set to the first page the user wants printed | |
| topage | is returned set to the last page the user wants printed |
| int Fl_Native_Printer::startpage | ( | int | left_margin = 0, |
|
| int | top_margin = 0 | |||
| ) |
Starts a new printed page.
| left_margin | the offset from the left border of the printable page area that will have 0 coordinate for FLTK drawing functions | |
| top_margin | the offset from the top border of the printable page area that will have 0 coordinate for FLTK drawing functions |
1.5.9