]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/prevwin.tex
Apply patch [ 1554736 ] wxXmlDocument::DetachRoot
[wxWidgets.git] / docs / latex / wx / prevwin.tex
1 \section{\class{wxPreviewCanvas}}\label{wxpreviewcanvas}
2
3 A preview canvas is the default canvas used by the print preview
4 system to display the preview.
5
6 \wxheading{Derived from}
7
8 \helpref{wxScrolledWindow}{wxscrolledwindow}\\
9 \helpref{wxWindow}{wxwindow}\\
10 \helpref{wxevthandler}{wxevthandler}\\
11 \helpref{wxObject}{wxobject}
12
13 \wxheading{Include files}
14
15 <wx/print.h>
16
17 \wxheading{See also}
18
19 \helpref{wxPreviewFrame}{wxpreviewframe}, \helpref{wxPreviewControlBar}{wxpreviewcontrolbar},\rtfsp
20 \helpref{wxPrintPreview}{wxprintpreview}
21
22 \latexignore{\rtfignore{\wxheading{Members}}}
23
24 \membersection{wxPreviewCanvas::wxPreviewCanvas}\label{wxpreviewcanvasctor}
25
26 \func{}{wxPreviewCanvas}{\param{wxPrintPreview* }{preview}, \param{wxWindow* }{parent},
27 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},
28 \param{long}{ style = 0}, \param{const wxString\& }{name = ``canvas"}}
29
30 Constructor.
31
32 \membersection{wxPreviewCanvas::\destruct{wxPreviewCanvas}}\label{wxpreviewcanvasdtor}
33
34 \func{}{\destruct{wxPreviewCanvas}}{\void}
35
36 Destructor.
37
38 \membersection{wxPreviewCanvas::OnPaint}\label{wxpreviewcanvasonpaint}
39
40 \func{void}{OnPaint}{\param{wxPaintEvent\& }{event}}
41
42 Calls \helpref{wxPrintPreview::PaintPage}{wxprintpreviewpaintpage} to refresh the canvas.
43
44 \section{\class{wxPreviewControlBar}}\label{wxpreviewcontrolbar}
45
46 This is the default implementation of the preview control bar, a panel
47 with buttons and a zoom control. You can derive a new class from this and
48 override some or all member functions to change the behaviour and appearance;
49 or you can leave it as it is.
50
51 \wxheading{Derived from}
52
53 \helpref{wxPanel}{wxpanel}\\
54 \helpref{wxWindow}{wxwindow}\\
55 \helpref{wxEvtHandler}{wxevthandler}\\
56 \helpref{wxObject}{wxobject}
57
58 \wxheading{Include files}
59
60 <wx/print.h>
61
62 \wxheading{See also}
63
64 \helpref{wxPreviewFrame}{wxpreviewframe}, \helpref{wxPreviewCanvas}{wxpreviewcanvas},\rtfsp
65 \helpref{wxPrintPreview}{wxprintpreview}
66
67 \latexignore{\rtfignore{\wxheading{Members}}}
68
69 \membersection{wxPreviewControlBar::wxPreviewControlbar}\label{wxpreviewcontrolbarctor}
70
71 \func{}{wxPreviewControlBar}{\param{wxPrintPreview* }{preview}, \param{long}{ buttons}, \param{wxWindow* }{parent},
72 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},
73 \param{long}{ style = 0}, \param{const wxString\& }{name = ``panel"}}
74
75 Constructor.
76
77 The buttons parameter may be a combination of the following, using the bitwise `or' operator.
78
79 \begin{twocollist}\itemsep=0pt
80 \twocolitem{wxPREVIEW\_PRINT}{Create a print button.}
81 \twocolitem{wxPREVIEW\_NEXT}{Create a next page button.}
82 \twocolitem{wxPREVIEW\_PREVIOUS}{Create a previous page button.}
83 \twocolitem{wxPREVIEW\_ZOOM}{Create a zoom control.}
84 \twocolitem{wxPREVIEW\_DEFAULT}{Equivalent to a combination of wxPREVIEW\_PREVIOUS, wxPREVIEW\_NEXT and
85 wxPREVIEW\_ZOOM.}
86 \end{twocollist}
87
88 \membersection{wxPreviewControlBar::\destruct{wxPreviewControlBar}}\label{wxpreviewcontrolbardtor}
89
90 \func{}{\destruct{wxPreviewControlBar}}{\void}
91
92 Destructor.
93
94 \membersection{wxPreviewControlBar::CreateButtons}\label{wxpreviewcontrolbarcreatebuttons}
95
96 \func{void}{CreateButtons}{\void}
97
98 Creates buttons, according to value of the button style flags.
99
100 \membersection{wxPreviewControlBar::GetPrintPreview}\label{wxpreviewcontrolbargetprintpreview}
101
102 \func{wxPrintPreview *}{GetPrintPreview}{\void}
103
104 Gets the print preview object associated with the control bar.
105
106 \membersection{wxPreviewControlBar::GetZoomControl}\label{wxpreviewcontrolbargetzoomcontrol}
107
108 \func{int}{GetZoomControl}{\void}
109
110 Gets the current zoom setting in percent.
111
112 \membersection{wxPreviewControlBar::SetZoomControl}\label{wxpreviewcontrolbarsetzoomcontrol}
113
114 \func{void}{SetZoomControl}{\param{int }{percent}}
115
116 Sets the zoom control.
117
118 \section{\class{wxPreviewFrame}}\label{wxpreviewframe}
119
120 This class provides the default method of managing the print preview interface.
121 Member functions may be overridden to replace functionality, or the
122 class may be used without derivation.
123
124 \wxheading{Derived from}
125
126 \helpref{wxFrame}{wxframe}\\
127 \helpref{wxWindow}{wxwindow}\\
128 \helpref{wxEvtHandler}{wxevthandler}\\
129 \helpref{wxObject}{wxobject}
130
131 \wxheading{Include files}
132
133 <wx/print.h>
134
135 \wxheading{See also}
136
137 \helpref{wxPreviewCanvas}{wxpreviewcanvas}, \helpref{wxPreviewControlBar}{wxpreviewcontrolbar},\rtfsp
138 \helpref{wxPrintPreview}{wxprintpreview}
139
140 \latexignore{\rtfignore{\wxheading{Members}}}
141
142 \membersection{wxPreviewFrame::wxPreviewFrame}\label{wxpreviewframector}
143
144 \func{}{wxPreviewFrame}{\param{wxPrintPreview* }{preview}, \param{wxWindow* }{parent}, \param{const wxString\& }{title},
145 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& size }{size = wxDefaultSize},
146 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = ``frame"}}
147
148 Constructor. Pass a print preview object plus other normal frame arguments.
149 The print preview object will be destroyed by the frame when it closes.
150
151 \membersection{wxPreviewFrame::\destruct{wxPreviewFrame}}\label{wxpreviewframedtor}
152
153 \func{}{\destruct{wxPreviewFrame}}{\void}
154
155 Destructor.
156
157 \membersection{wxPreviewFrame::CreateControlBar}\label{wxpreviewframecreatecontrolbar}
158
159 \func{void}{CreateControlBar}{\void}
160
161 Creates a wxPreviewControlBar. Override this function to allow
162 a user-defined preview control bar object to be created.
163
164 \membersection{wxPreviewFrame::CreateCanvas}\label{wxpreviewframecreatecanvas}
165
166 \func{void}{CreateCanvas}{\void}
167
168 Creates a wxPreviewCanvas. Override this function to allow
169 a user-defined preview canvas object to be created.
170
171 \membersection{wxPreviewFrame::Initialize}\label{wxpreviewframeinitialize}
172
173 \func{void}{Initialize}{\void}
174
175 Creates the preview canvas and control bar, and calls
176 wxWindow::MakeModal(true) to disable other top-level windows
177 in the application.
178
179 This function should be called by the application prior to
180 showing the frame.
181
182 \membersection{wxPreviewFrame::OnCloseWindow}\label{wxpreviewframeonclosewindow}
183
184 \func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
185
186 Enables the other frames in the application, and deletes the print preview
187 object, implicitly deleting any printout objects associated with the print
188 preview object.
189