1 \section{\class{wxRichTextPrinting
}}\label{wxrichtextprinting
}
3 This class provides a simple interface for performing
\helpref{wxRichTextBuffer
}{wxrichtextbuffer
} printing
4 and previewing. It uses
\helpref{wxRichTextPrintout
}{wxrichtextprintout
} for layout and rendering.
6 \wxheading{Derived from
}
8 \helpref{wxObject
}{wxobject
}
10 \wxheading{Include files
}
12 <wx/richtext/richtextprint.h>
16 \helpref{wxRichtext
}{librarieslist
}
18 \wxheading{Data structures
}
20 \latexignore{\rtfignore{\wxheading{Members
}}}
22 \membersection{wxRichTextPrinting::wxRichTextPrinting
}\label{wxrichtextprintingwxrichtextprinting
}
24 \func{}{wxRichTextPrinting
}{\param{const wxString\&
}{name = wxT("Printing")
},
\param{wxWindow*
}{parentWindow = NULL
}}
26 Constructor. Optionally pass a title to be used in the preview frame and printing wait dialog, and
27 also a parent window for these windows.
29 \membersection{wxRichTextPrinting::GetFooterText
}\label{wxrichtextprintinggetfootertext
}
31 \constfunc{wxString
}{GetFooterText
}{\param{wxRichTextOddEvenPage
}{page = wxRICHTEXT
\_PAGE\_EVEN},
\param{wxRichTextPageLocation
}{location = wxRICHTEXT
\_PAGE\_CENTRE}}
33 A convenience function to get the footer text. See
\helpref{wxRichTextHeaderFooterData
}{wxrichtextheaderfooterdata
} for details.
35 \membersection{wxRichTextPrinting::GetHeaderFooterData
}\label{wxrichtextprintinggetheaderfooterdata
}
37 \constfunc{const wxRichTextHeaderFooterData\&
}{GetHeaderFooterData
}{\void}
39 Returns the internal
\helpref{wxRichTextHeaderFooterData
}{wxrichtextheaderfooterdata
} object.
41 \membersection{wxRichTextPrinting::GetHeaderText
}\label{wxrichtextprintinggetheadertext
}
43 \constfunc{wxString
}{GetHeaderText
}{\param{wxRichTextOddEvenPage
}{page = wxRICHTEXT
\_PAGE\_EVEN},
\param{wxRichTextPageLocation
}{location = wxRICHTEXT
\_PAGE\_CENTRE}}
45 A convenience function to get the header text. See
\helpref{wxRichTextHeaderFooterData
}{wxrichtextheaderfooterdata
} for details.
47 \membersection{wxRichTextPrinting::GetPageSetupData
}\label{wxrichtextprintinggetpagesetupdata
}
49 \func{wxPageSetupDialogData*
}{GetPageSetupData
}{\void}
51 Returns a pointer to the internal page setup data.
53 \membersection{wxRichTextPrinting::GetParentWindow
}\label{wxrichtextprintinggetparentwindow
}
55 \constfunc{wxWindow*
}{GetParentWindow
}{\void}
57 Returns the parent window to be used for the preview window and printing wait dialog.
59 \membersection{wxRichTextPrinting::GetPreviewRect
}\label{wxrichtextprintinggetpreviewrect
}
61 \constfunc{const wxRect\&
}{GetPreviewRect
}{\void}
63 Returns the dimensions to be used for the preview window.
65 \membersection{wxRichTextPrinting::GetPrintData
}\label{wxrichtextprintinggetprintdata
}
67 \func{wxPrintData*
}{GetPrintData
}{\void}
69 Returns a pointer to the internal print data.
71 \membersection{wxRichTextPrinting::GetTitle
}\label{wxrichtextprintinggettitle
}
73 \constfunc{const wxString\&
}{GetTitle
}{\void}
75 Returns the title of the preview window or printing wait caption.
77 \membersection{wxRichTextPrinting::PageSetup
}\label{wxrichtextprintingpagesetup
}
79 \func{void
}{PageSetup
}{\void}
81 Shows the page setup dialog.
83 \membersection{wxRichTextPrinting::PreviewBuffer
}\label{wxrichtextprintingpreviewbuffer
}
85 \func{bool
}{PreviewBuffer
}{\param{const wxRichTextBuffer\&
}{buffer
}}
87 Shows a preview window for the given buffer. The function takes its own copy of
{\it buffer
}.
89 \membersection{wxRichTextPrinting::PreviewFile
}\label{wxrichtextprintingpreviewfile
}
91 \func{bool
}{PreviewFile
}{\param{const wxString\&
}{richTextFile
}}
93 Shows a preview window for the given file.
{\it richTextFile
} can be a text file or XML file, or other file
94 depending on the available file handlers.
96 \membersection{wxRichTextPrinting::PrintBuffer
}\label{wxrichtextprintingprintbuffer
}
98 \func{bool
}{PrintBuffer
}{\param{const wxRichTextBuffer\&
}{buffer
}}
100 Prints the given buffer. The function takes its own copy of
{\it buffer
}.
102 \membersection{wxRichTextPrinting::PrintFile
}\label{wxrichtextprintingprintfile
}
104 \func{bool
}{PrintFile
}{\param{const wxString\&
}{richTextFile
}}
106 Prints the given file.
{\it richTextFile
} can be a text file or XML file, or other file
107 depending on the available file handlers.
109 \membersection{wxRichTextPrinting::SetFooterText
}\label{wxrichtextprintingsetfootertext
}
111 \func{void
}{SetFooterText
}{\param{const wxString\&
}{text
},
\param{wxRichTextOddEvenPage
}{page = wxRICHTEXT
\_PAGE\_ALL},
\param{wxRichTextPageLocation
}{location = wxRICHTEXT
\_PAGE\_CENTRE}}
113 A convenience function to set the footer text. See
\helpref{wxRichTextHeaderFooterData
}{wxrichtextheaderfooterdata
} for details.
115 \membersection{wxRichTextPrinting::SetHeaderFooterData
}\label{wxrichtextprintingsetheaderfooterdata
}
117 \func{void
}{SetHeaderFooterData
}{\param{const wxRichTextHeaderFooterData\&
}{data
}}
119 Sets the internal
\helpref{wxRichTextHeaderFooterData
}{wxrichtextheaderfooterdata
} object.
121 \membersection{wxRichTextPrinting::SetHeaderFooterFont
}\label{wxrichtextprintingsetheaderfooterfont
}
123 \func{void
}{SetHeaderFooterFont
}{\param{const wxFont\&
}{font
}}
125 Sets the
\helpref{wxRichTextHeaderFooterData
}{wxrichtextheaderfooterdata
} font.
127 \membersection{wxRichTextPrinting::SetHeaderFooterTextColour
}\label{wxrichtextprintingsetheaderfootertextcolour
}
129 \func{void
}{SetHeaderFooterTextColour
}{\param{const wxColour\&
}{colour
}}
131 Sets the
\helpref{wxRichTextHeaderFooterData
}{wxrichtextheaderfooterdata
} text colour.
133 \membersection{wxRichTextPrinting::SetHeaderText
}\label{wxrichtextprintingsetheadertext
}
135 \func{void
}{SetHeaderText
}{\param{const wxString\&
}{text
},
\param{wxRichTextOddEvenPage
}{page = wxRICHTEXT
\_PAGE\_ALL},
\param{wxRichTextPageLocation
}{location = wxRICHTEXT
\_PAGE\_CENTRE}}
137 A convenience function to set the header text. See
\helpref{wxRichTextHeaderFooterData
}{wxrichtextheaderfooterdata
} for details.
139 \membersection{wxRichTextPrinting::SetPageSetupData
}\label{wxrichtextprintingsetpagesetupdata
}
141 \func{void
}{SetPageSetupData
}{\param{const wxPageSetupData\&
}{pageSetupData
}}
143 Sets the page setup data.
145 \membersection{wxRichTextPrinting::SetParentWindow
}\label{wxrichtextprintingsetparentwindow
}
147 \func{void
}{SetParentWindow
}{\param{wxWindow*
}{parent
}}
149 Sets the parent window to be used for the preview window and printing wait dialog.
151 \membersection{wxRichTextPrinting::SetPreviewRect
}\label{wxrichtextprintingsetpreviewrect
}
153 \func{void
}{SetPreviewRect
}{\param{const wxRect\&
}{rect
}}
155 Sets the dimensions to be used for the preview window.
157 \membersection{wxRichTextPrinting::SetPrintData
}\label{wxrichtextprintingsetprintdata
}
159 \func{void
}{SetPrintData
}{\param{const wxPrintData\&
}{printData
}}
163 \membersection{wxRichTextPrinting::SetShowOnFirstPage
}\label{wxrichtextprintingsetshowonfirstpage
}
165 \func{void
}{SetShowOnFirstPage
}{\param{bool
}{show
}}
167 Pass
\true to show the header and footer on the first page.
169 \membersection{wxRichTextPrinting::SetTitle
}\label{wxrichtextprintingsettitle
}
171 \func{void
}{SetTitle
}{\param{const wxString\&
}{title
}}
173 Pass the title of the preview window or printing wait caption.