]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/richtextprinting.tex
API change: a single SELECTION_CHANGED not lots of SELECT and UNSELECT events
[wxWidgets.git] / docs / latex / wx / richtextprinting.tex
1 \section{\class{wxRichTextPrinting}}\label{wxrichtextprinting}
2
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.
5
6 \wxheading{Derived from}
7
8 \helpref{wxObject}{wxobject}
9
10 \wxheading{Include files}
11
12 <wx/richtext/richtextprint.h>
13
14 \wxheading{Library}
15
16 \helpref{wxRichtext}{librarieslist}
17
18 \wxheading{Data structures}
19
20 \latexignore{\rtfignore{\wxheading{Members}}}
21
22 \membersection{wxRichTextPrinting::wxRichTextPrinting}\label{wxrichtextprintingwxrichtextprinting}
23
24 \func{}{wxRichTextPrinting}{\param{const wxString\& }{name = wxT("Printing")}, \param{wxWindow* }{parentWindow = NULL}}
25
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.
28
29 \membersection{wxRichTextPrinting::GetFooterText}\label{wxrichtextprintinggetfootertext}
30
31 \constfunc{wxString}{GetFooterText}{\param{wxRichTextOddEvenPage }{page = wxRICHTEXT\_PAGE\_EVEN}, \param{wxRichTextPageLocation }{location = wxRICHTEXT\_PAGE\_CENTRE}}
32
33 A convenience function to get the footer text. See \helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata} for details.
34
35 \membersection{wxRichTextPrinting::GetHeaderFooterData}\label{wxrichtextprintinggetheaderfooterdata}
36
37 \constfunc{const wxRichTextHeaderFooterData\&}{GetHeaderFooterData}{\void}
38
39 Returns the internal \helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata} object.
40
41 \membersection{wxRichTextPrinting::GetHeaderText}\label{wxrichtextprintinggetheadertext}
42
43 \constfunc{wxString}{GetHeaderText}{\param{wxRichTextOddEvenPage }{page = wxRICHTEXT\_PAGE\_EVEN}, \param{wxRichTextPageLocation }{location = wxRICHTEXT\_PAGE\_CENTRE}}
44
45 A convenience function to get the header text. See \helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata} for details.
46
47 \membersection{wxRichTextPrinting::GetPageSetupData}\label{wxrichtextprintinggetpagesetupdata}
48
49 \func{wxPageSetupDialogData*}{GetPageSetupData}{\void}
50
51 Returns a pointer to the internal page setup data.
52
53 \membersection{wxRichTextPrinting::GetParentWindow}\label{wxrichtextprintinggetparentwindow}
54
55 \constfunc{wxWindow*}{GetParentWindow}{\void}
56
57 Returns the parent window to be used for the preview window and printing wait dialog.
58
59 \membersection{wxRichTextPrinting::GetPreviewRect}\label{wxrichtextprintinggetpreviewrect}
60
61 \constfunc{const wxRect\&}{GetPreviewRect}{\void}
62
63 Returns the dimensions to be used for the preview window.
64
65 \membersection{wxRichTextPrinting::GetPrintData}\label{wxrichtextprintinggetprintdata}
66
67 \func{wxPrintData*}{GetPrintData}{\void}
68
69 Returns a pointer to the internal print data.
70
71 \membersection{wxRichTextPrinting::GetTitle}\label{wxrichtextprintinggettitle}
72
73 \constfunc{const wxString\&}{GetTitle}{\void}
74
75 Returns the title of the preview window or printing wait caption.
76
77 \membersection{wxRichTextPrinting::PageSetup}\label{wxrichtextprintingpagesetup}
78
79 \func{void}{PageSetup}{\void}
80
81 Shows the page setup dialog.
82
83 \membersection{wxRichTextPrinting::PreviewBuffer}\label{wxrichtextprintingpreviewbuffer}
84
85 \func{bool}{PreviewBuffer}{\param{const wxRichTextBuffer\& }{buffer}}
86
87 Shows a preview window for the given buffer. The function takes its own copy of {\it buffer}.
88
89 \membersection{wxRichTextPrinting::PreviewFile}\label{wxrichtextprintingpreviewfile}
90
91 \func{bool}{PreviewFile}{\param{const wxString\& }{richTextFile}}
92
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.
95
96 \membersection{wxRichTextPrinting::PrintBuffer}\label{wxrichtextprintingprintbuffer}
97
98 \func{bool}{PrintBuffer}{\param{const wxRichTextBuffer\& }{buffer}}
99
100 Prints the given buffer. The function takes its own copy of {\it buffer}.
101
102 \membersection{wxRichTextPrinting::PrintFile}\label{wxrichtextprintingprintfile}
103
104 \func{bool}{PrintFile}{\param{const wxString\& }{richTextFile}}
105
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.
108
109 \membersection{wxRichTextPrinting::SetFooterText}\label{wxrichtextprintingsetfootertext}
110
111 \func{void}{SetFooterText}{\param{const wxString\& }{text}, \param{wxRichTextOddEvenPage }{page = wxRICHTEXT\_PAGE\_ALL}, \param{wxRichTextPageLocation }{location = wxRICHTEXT\_PAGE\_CENTRE}}
112
113 A convenience function to set the footer text. See \helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata} for details.
114
115 \membersection{wxRichTextPrinting::SetHeaderFooterData}\label{wxrichtextprintingsetheaderfooterdata}
116
117 \func{void}{SetHeaderFooterData}{\param{const wxRichTextHeaderFooterData\& }{data}}
118
119 Sets the internal \helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata} object.
120
121 \membersection{wxRichTextPrinting::SetHeaderFooterFont}\label{wxrichtextprintingsetheaderfooterfont}
122
123 \func{void}{SetHeaderFooterFont}{\param{const wxFont\& }{font}}
124
125 Sets the \helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata} font.
126
127 \membersection{wxRichTextPrinting::SetHeaderFooterTextColour}\label{wxrichtextprintingsetheaderfootertextcolour}
128
129 \func{void}{SetHeaderFooterTextColour}{\param{const wxColour\& }{colour}}
130
131 Sets the \helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata} text colour.
132
133 \membersection{wxRichTextPrinting::SetHeaderText}\label{wxrichtextprintingsetheadertext}
134
135 \func{void}{SetHeaderText}{\param{const wxString\& }{text}, \param{wxRichTextOddEvenPage }{page = wxRICHTEXT\_PAGE\_ALL}, \param{wxRichTextPageLocation }{location = wxRICHTEXT\_PAGE\_CENTRE}}
136
137 A convenience function to set the header text. See \helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata} for details.
138
139 \membersection{wxRichTextPrinting::SetPageSetupData}\label{wxrichtextprintingsetpagesetupdata}
140
141 \func{void}{SetPageSetupData}{\param{const wxPageSetupData\& }{pageSetupData}}
142
143 Sets the page setup data.
144
145 \membersection{wxRichTextPrinting::SetParentWindow}\label{wxrichtextprintingsetparentwindow}
146
147 \func{void}{SetParentWindow}{\param{wxWindow* }{parent}}
148
149 Sets the parent window to be used for the preview window and printing wait dialog.
150
151 \membersection{wxRichTextPrinting::SetPreviewRect}\label{wxrichtextprintingsetpreviewrect}
152
153 \func{void}{SetPreviewRect}{\param{const wxRect\& }{rect}}
154
155 Sets the dimensions to be used for the preview window.
156
157 \membersection{wxRichTextPrinting::SetPrintData}\label{wxrichtextprintingsetprintdata}
158
159 \func{void}{SetPrintData}{\param{const wxPrintData\& }{printData}}
160
161 Sets the print data.
162
163 \membersection{wxRichTextPrinting::SetShowOnFirstPage}\label{wxrichtextprintingsetshowonfirstpage}
164
165 \func{void}{SetShowOnFirstPage}{\param{bool }{show}}
166
167 Pass \true to show the header and footer on the first page.
168
169 \membersection{wxRichTextPrinting::SetTitle}\label{wxrichtextprintingsettitle}
170
171 \func{void}{SetTitle}{\param{const wxString\& }{title}}
172
173 Pass the title of the preview window or printing wait caption.
174