Contents Up Previous Next

wxRichTextPrintout

This class implements print layout for wxRichTextBuffer. Instead of using it directly, you should normally use the wxRichTextPrinting class.

Derived from

wxPrintout

Include files

<wx/richtext/richtextprint.h>

Data structures

Members

wxRichTextPrintout::wxRichTextPrintout
wxRichTextPrintout::CalculateScaling
wxRichTextPrintout::GetHeaderFooterData
wxRichTextPrintout::GetPageInfo
wxRichTextPrintout::GetRichTextBuffer
wxRichTextPrintout::HasPage
wxRichTextPrintout::OnPreparePrinting
wxRichTextPrintout::OnPrintPage
wxRichTextPrintout::SetHeaderFooterData
wxRichTextPrintout::SetMargins
wxRichTextPrintout::SetRichTextBuffer


wxRichTextPrintout::wxRichTextPrintout

wxRichTextPrintout(const wxString& title = wxT("Printout"))

Constructor.


wxRichTextPrintout::CalculateScaling

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

Calculates scaling and text, header and footer rectangles.


wxRichTextPrintout::GetHeaderFooterData

const wxRichTextHeaderFooterData& GetHeaderFooterData() const

Returns the header and footer data associated with the printout.


wxRichTextPrintout::GetPageInfo

void GetPageInfo(int* minPage, int* maxPage, int* selPageFrom, int* selPageTo)

Gets the page information.


wxRichTextPrintout::GetRichTextBuffer

wxRichTextBuffer* GetRichTextBuffer() const

Returns a pointer to the buffer being rendered.


wxRichTextPrintout::HasPage

bool HasPage(int page)

Returns true if the given page exists in the printout.


wxRichTextPrintout::OnPreparePrinting

void OnPreparePrinting()

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


wxRichTextPrintout::OnPrintPage

bool OnPrintPage(int page)

Does the actual printing for this page.


wxRichTextPrintout::SetHeaderFooterData

void SetHeaderFooterData(const wxRichTextHeaderFooterData& data)

Sets the header and footer data associated with the printout.


wxRichTextPrintout::SetMargins

void SetMargins(int top = 252, int bottom = 252, int left = 252, int right = 252)

Sets margins in 10ths of millimetre. Defaults to 1 inch for margins.


wxRichTextPrintout::SetRichTextBuffer

void 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.