Fl_Native_Printer Class Reference

Provides an OS-independent interface to printing under MSWindows and Mac OS X. More...

#include <Fl_Native_Printer.H>

List of all members.

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.


Detailed Description

Provides an OS-independent interface to printing under MSWindows and Mac OS X.

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.


Member Function Documentation

int Fl_Native_Printer::endpage ( void   ) 

To be called at the end of each page.

Returns:
0 iff error.

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().

Returns:
0 iff error.

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.

Returns:
0 iff error.

int Fl_Native_Printer::startjob ( int  pagecount,
int *  frompage,
int *  topage 
)

Starts a print job.

Parameters:
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
Returns:
0 iff OK

int Fl_Native_Printer::startpage ( int  left_margin = 0,
int  top_margin = 0 
)

Starts a new printed page.

Parameters:
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
Returns:
0 iff error


The documentation for this class was generated from the following file:

Generated on Sun Jan 24 23:00:37 2010 for FlNativePrinter by  doxygen 1.5.9