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