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