]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
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}\\ | |
7376079d | 9 | \helpref{wxPanel}{wxpanel}\\ |
a660d684 | 10 | \helpref{wxWindow}{wxwindow}\\ |
7376079d | 11 | \helpref{wxEvtHandler}{wxevthandler}\\ |
a660d684 KB |
12 | \helpref{wxObject}{wxobject} |
13 | ||
954b8ae6 JS |
14 | \wxheading{Include files} |
15 | ||
16 | <wx/print.h> | |
17 | ||
a660d684 KB |
18 | \wxheading{See also} |
19 | ||
20 | \helpref{wxPreviewFrame}{wxpreviewframe}, \helpref{wxPreviewControlBar}{wxpreviewcontrolbar},\rtfsp | |
21 | \helpref{wxPrintPreview}{wxprintpreview} | |
22 | ||
23 | \latexignore{\rtfignore{\wxheading{Members}}} | |
24 | ||
3e79fa75 | 25 | \membersection{wxPreviewCanvas::wxPreviewCanvas}\label{wxpreviewcanvasctor} |
a660d684 KB |
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 | ||
3e79fa75 | 33 | \membersection{wxPreviewCanvas::\destruct{wxPreviewCanvas}}\label{wxpreviewcanvasdtor} |
a660d684 KB |
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 | ||
954b8ae6 JS |
59 | \wxheading{Include files} |
60 | ||
61 | <wx/print.h> | |
62 | ||
a660d684 KB |
63 | \wxheading{See also} |
64 | ||
65 | \helpref{wxPreviewFrame}{wxpreviewframe}, \helpref{wxPreviewCanvas}{wxpreviewcanvas},\rtfsp | |
66 | \helpref{wxPrintPreview}{wxprintpreview} | |
67 | ||
68 | \latexignore{\rtfignore{\wxheading{Members}}} | |
69 | ||
dcbd177f | 70 | \membersection{wxPreviewControlBar::wxPreviewControlbar}\label{wxpreviewcontrolbarctor} |
a660d684 KB |
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 | ||
dcbd177f | 89 | \membersection{wxPreviewControlBar::\destruct{wxPreviewControlBar}}\label{wxpreviewcontrolbardtor} |
a660d684 KB |
90 | |
91 | \func{}{\destruct{wxPreviewControlBar}}{\void} | |
92 | ||
93 | Destructor. | |
94 | ||
dcbd177f | 95 | \membersection{wxPreviewControlBar::CreateButtons}\label{wxpreviewcontrolbarcreatebuttons} |
a660d684 KB |
96 | |
97 | \func{void}{CreateButtons}{\void} | |
98 | ||
99 | Creates buttons, according to value of the button style flags. | |
100 | ||
dcbd177f | 101 | \membersection{wxPreviewControlBar::GetPrintPreview}\label{wxpreviewcontrolbargetprintpreview} |
a660d684 KB |
102 | |
103 | \func{wxPrintPreview *}{GetPrintPreview}{\void} | |
104 | ||
105 | Gets the print preview object associated with the control bar. | |
106 | ||
dcbd177f | 107 | \membersection{wxPreviewControlBar::GetZoomControl}\label{wxpreviewcontrolbargetzoomcontrol} |
a660d684 KB |
108 | |
109 | \func{int}{GetZoomControl}{\void} | |
110 | ||
111 | Gets the current zoom setting in percent. | |
112 | ||
dcbd177f | 113 | \membersection{wxPreviewControlBar::SetZoomControl}\label{wxpreviewcontrolbarsetzoomcontrol} |
a660d684 KB |
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}\\ | |
7376079d | 128 | \helpref{wxTopLevelWindow}{wxtoplevelwindow}\\ |
a660d684 KB |
129 | \helpref{wxWindow}{wxwindow}\\ |
130 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
131 | \helpref{wxObject}{wxobject} | |
132 | ||
954b8ae6 JS |
133 | \wxheading{Include files} |
134 | ||
135 | <wx/print.h> | |
136 | ||
a660d684 KB |
137 | \wxheading{See also} |
138 | ||
139 | \helpref{wxPreviewCanvas}{wxpreviewcanvas}, \helpref{wxPreviewControlBar}{wxpreviewcontrolbar},\rtfsp | |
140 | \helpref{wxPrintPreview}{wxprintpreview} | |
141 | ||
142 | \latexignore{\rtfignore{\wxheading{Members}}} | |
143 | ||
3e79fa75 | 144 | \membersection{wxPreviewFrame::wxPreviewFrame}\label{wxpreviewframector} |
a660d684 | 145 | |
a5ae8241 | 146 | \func{}{wxPreviewFrame}{\param{wxPrintPreview* }{preview}, \param{wxWindow* }{parent}, \param{const wxString\& }{title}, |
a660d684 KB |
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. | |
deda94c5 | 151 | The print preview object will be destroyed by the frame when it closes. |
a660d684 | 152 | |
3e79fa75 | 153 | \membersection{wxPreviewFrame::\destruct{wxPreviewFrame}}\label{wxpreviewframedtor} |
a660d684 KB |
154 | |
155 | \func{}{\destruct{wxPreviewFrame}}{\void} | |
156 | ||
157 | Destructor. | |
158 | ||
3e79fa75 | 159 | \membersection{wxPreviewFrame::CreateControlBar}\label{wxpreviewframecreatecontrolbar} |
a660d684 KB |
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 | ||
3e79fa75 | 166 | \membersection{wxPreviewFrame::CreateCanvas}\label{wxpreviewframecreatecanvas} |
a660d684 KB |
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 | ||
3e79fa75 | 173 | \membersection{wxPreviewFrame::Initialize}\label{wxpreviewframeinitialize} |
a660d684 KB |
174 | |
175 | \func{void}{Initialize}{\void} | |
176 | ||
177 | Creates the preview canvas and control bar, and calls | |
cc81d32f | 178 | wxWindow::MakeModal(true) to disable other top-level windows |
a660d684 KB |
179 | in the application. |
180 | ||
181 | This function should be called by the application prior to | |
182 | showing the frame. | |
183 | ||
3e79fa75 | 184 | \membersection{wxPreviewFrame::OnCloseWindow}\label{wxpreviewframeonclosewindow} |
a660d684 | 185 | |
e3065973 | 186 | \func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}} |
a660d684 KB |
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 |