# wxRichTextPrintout Class Reference
[Rich Text]

`#include </home/work/projects/wx/2.9/wx/interface/wx/richtext/richtextprint.h>`

Inheritance diagram for wxRichTextPrintout:
[legend]

## Detailed Description

This class implements print layout for wxRichTextBuffer.

Instead of using it directly, you should normally use the wxRichTextPrinting class.

##

Library: wxRichText
Category: Rich Text

## Public Member Functions

| wxRichTextPrintout (const wxString &title="Printout")
| Constructor.
void | CalculateScaling (wxDC *dc, wxRect &textRect, wxRect &headerRect, wxRect &footerRect)
| Calculates scaling and text, header and footer rectangles.
const wxRichTextHeaderFooterData & | GetHeaderFooterData () const
| Returns the header and footer data associated with the printout.
virtual void | GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *selPageTo)
| Gets the page information.
wxRichTextBuffer * | GetRichTextBuffer () const
| Returns a pointer to the buffer being rendered.
virtual bool | HasPage (int page)
| Returns true if the given page exists in the printout.
virtual void | OnPreparePrinting ()
| Prepares for printing, laying out the buffer and calculating pagination.
virtual bool | OnPrintPage (int page)
| Does the actual printing for this page.
void | SetHeaderFooterData (const wxRichTextHeaderFooterData &data)
| Sets the header and footer data associated with the printout.
void | SetMargins (int top=254, int bottom=254, int left=254, int right=254)
| Sets margins in 10ths of millimetre.
void | SetRichTextBuffer (wxRichTextBuffer *buffer)
| Sets the buffer to print.

List of all members.

## Constructor & Destructor Documentation

wxRichTextPrintout::wxRichTextPrintout | ( | const wxString & | title = `"Printout"` | ) |

Constructor.

## Member Function Documentation

void wxRichTextPrintout::CalculateScaling | ( | wxDC * | dc,
|  | wxRect & | textRect,
|  | wxRect & | headerRect,
|  | wxRect & | footerRect |
| ) |  |  |

Calculates scaling and text, header and footer rectangles.

const wxRichTextHeaderFooterData& wxRichTextPrintout::GetHeaderFooterData | ( |  | ) | const

Returns the header and footer data associated with the printout.

virtual void wxRichTextPrintout::GetPageInfo | ( | int * | minPage,
|  | int * | maxPage,
|  | int * | selPageFrom,
|  | int * | selPageTo |
| ) |  |  | `[virtual]`

Gets the page information.

Reimplemented from wxPrintout.

wxRichTextBuffer* wxRichTextPrintout::GetRichTextBuffer | ( |  | ) | const

Returns a pointer to the buffer being rendered.

virtual bool wxRichTextPrintout::HasPage | ( | int | page | ) | `[virtual]`

Returns true if the given page exists in the printout.

Reimplemented from wxPrintout.

virtual void wxRichTextPrintout::OnPreparePrinting | ( |  | ) | `[virtual]`

Prepares for printing, laying out the buffer and calculating pagination.

Reimplemented from wxPrintout.

virtual bool wxRichTextPrintout::OnPrintPage | ( | int | page | ) | `[virtual]`

Does the actual printing for this page.

Implements wxPrintout.

void wxRichTextPrintout::SetHeaderFooterData | ( | const wxRichTextHeaderFooterData & | data | ) |

Sets the header and footer data associated with the printout.

void wxRichTextPrintout::SetMargins | ( | int | top = `254`,
|  | int | bottom = `254`,
|  | int | left = `254`,
|  | int | right = `254` |
| ) |  |  |

Sets margins in 10ths of millimetre.

Defaults to 1 inch for margins.

void wxRichTextPrintout::SetRichTextBuffer | ( | wxRichTextBuffer * | buffer | ) |

Sets the buffer to print.

wxRichTextPrintout does not manage this pointer; it should be managed by the calling code, such as wxRichTextPrinting.

|  | [ top ]