wx.Printout Class Reference

Inheritance diagram for wx.Printout:


List of all members.

Public Member Functions

virtual void GetPageInfo (ref int minPage, ref int maxPage, ref int pageFrom, ref int pageTo)
void GetPageSizeMM (out int w, out int h)
void GetPageSizePixels (out int w, out int h)
void GetPPIPrinter (out int x, out int y)
void GetPPIScreen (out int x, out int y)
virtual bool HasPage (int page)
virtual bool OnBeginDocument (int startPage, int endPage)
virtual void OnBeginPrinting ()
virtual void OnEndDocument ()
virtual void OnEndPrinting ()
virtual void OnPreparePrinting ()
abstract bool OnPrintPage (int page)
 Printout (wxString title)
 Printout (string title)
void SetPageSizeMM (int w, int h)
void SetPageSizePixels (int w, int h)
void SetPPIPrinter (int x, int y)
void SetPPIScreen (int x, int y)


DC DC [get, set]
bool IsPreview [get, set]
string Title [get]

Detailed Description

This class encapsulates the functionality of printing out an application document. A new class must be derived and members overridden to respond to calls such as OnPrintPage() and HasPage() and to render the print image onto an associated wx.DC. Instances of this class are passed to wx.Printer.Print() or to a wx.PrintPreview object to initiate printing or previewing.

Your derived wx.Printout is responsible for drawing both the preview image and the printed page. If your windows' drawing routines accept an arbitrary DC as an argument, you can re-use those routines within your wxPrintout subclass to draw the printout image. You may also add additional drawing elements within your wx.Printout subclass, like headers, footers, and/or page numbers. However, the image on the printed page will often differ from the image drawn on the screen, as will the print preview image -- not just in the presence of headers and footers, but typically in scale. A high-resolution printer presents a much larger drawing surface (i.e., a higher-resolution DC); a zoomed-out preview image presents a much smaller drawing surface (lower-resolution DC). By using the routines FitThisSizeToXXX() and/or MapScreenSizeToXXX() within your wxPrintout subclass to set the user scale and origin of the associated DC, you can easily use a single drawing routine to draw on your application's windows, to create the print preview image, and to create the printed paper image, and achieve a common appearance to the preview image and the printed page.

Constructor & Destructor Documentation

wx.Printout.Printout ( string  title  ) 

wx.Printout.Printout ( wxString  title  ) 

Member Function Documentation

virtual void wx.Printout.GetPageInfo ( ref int  minPage,
ref int  maxPage,
ref int  pageFrom,
ref int  pageTo 
) [virtual]

void wx.Printout.GetPageSizeMM ( out int  w,
out int  h 

void wx.Printout.GetPageSizePixels ( out int  w,
out int  h 

void wx.Printout.GetPPIPrinter ( out int  x,
out int  y 

void wx.Printout.GetPPIScreen ( out int  x,
out int  y 

virtual bool wx.Printout.HasPage ( int  page  )  [virtual]

virtual bool wx.Printout.OnBeginDocument ( int  startPage,
int  endPage 
) [virtual]

virtual void wx.Printout.OnBeginPrinting (  )  [virtual]

virtual void wx.Printout.OnEndDocument (  )  [virtual]

virtual void wx.Printout.OnEndPrinting (  )  [virtual]

virtual void wx.Printout.OnPreparePrinting (  )  [virtual]

abstract bool wx.Printout.OnPrintPage ( int  page  )  [pure virtual]

void wx.Printout.SetPageSizeMM ( int  w,
int  h 

void wx.Printout.SetPageSizePixels ( int  w,
int  h 

void wx.Printout.SetPPIPrinter ( int  x,
int  y 

void wx.Printout.SetPPIScreen ( int  x,
int  y 

Property Documentation

DC wx.Printout.DC [get, set]

bool wx.Printout.IsPreview [get, set]

string wx.Printout.Title [get]

Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads