1 \section{\class{wxPreviewCanvas
}}\label{wxpreviewcanvas
}
3 A preview canvas is the default canvas used by the print preview
4 system to display the preview.
6 \wxheading{Derived from
}
8 \helpref{wxScrolledWindow
}{wxscrolledwindow
}\\
9 \helpref{wxPanel
}{wxpanel
}\\
10 \helpref{wxWindow
}{wxwindow
}\\
11 \helpref{wxEvtHandler
}{wxevthandler
}\\
12 \helpref{wxObject
}{wxobject
}
14 \wxheading{Include files
}
20 \helpref{wxPreviewFrame
}{wxpreviewframe
},
\helpref{wxPreviewControlBar
}{wxpreviewcontrolbar
},
\rtfsp
21 \helpref{wxPrintPreview
}{wxprintpreview
}
23 \latexignore{\rtfignore{\wxheading{Members
}}}
25 \membersection{wxPreviewCanvas::wxPreviewCanvas
}\label{wxpreviewcanvasctor
}
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"
}}
33 \membersection{wxPreviewCanvas::
\destruct{wxPreviewCanvas
}}\label{wxpreviewcanvasdtor
}
35 \func{}{\destruct{wxPreviewCanvas
}}{\void}
39 \membersection{wxPreviewCanvas::OnPaint
}\label{wxpreviewcanvasonpaint
}
41 \func{void
}{OnPaint
}{\param{wxPaintEvent\&
}{event
}}
43 Calls
\helpref{wxPrintPreview::PaintPage
}{wxprintpreviewpaintpage
} to refresh the canvas.
45 \section{\class{wxPreviewControlBar
}}\label{wxpreviewcontrolbar
}
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.
52 \wxheading{Derived from
}
54 \helpref{wxPanel
}{wxpanel
}\\
55 \helpref{wxWindow
}{wxwindow
}\\
56 \helpref{wxEvtHandler
}{wxevthandler
}\\
57 \helpref{wxObject
}{wxobject
}
59 \wxheading{Include files
}
65 \helpref{wxPreviewFrame
}{wxpreviewframe
},
\helpref{wxPreviewCanvas
}{wxpreviewcanvas
},
\rtfsp
66 \helpref{wxPrintPreview
}{wxprintpreview
}
68 \latexignore{\rtfignore{\wxheading{Members
}}}
70 \membersection{wxPreviewControlBar::wxPreviewControlbar
}\label{wxpreviewcontrolbarctor
}
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"
}}
78 The buttons parameter may be a combination of the following, using the bitwise `or' operator.
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
89 \membersection{wxPreviewControlBar::
\destruct{wxPreviewControlBar
}}\label{wxpreviewcontrolbardtor
}
91 \func{}{\destruct{wxPreviewControlBar
}}{\void}
95 \membersection{wxPreviewControlBar::CreateButtons
}\label{wxpreviewcontrolbarcreatebuttons
}
97 \func{void
}{CreateButtons
}{\void}
99 Creates buttons, according to value of the button style flags.
101 \membersection{wxPreviewControlBar::GetPrintPreview
}\label{wxpreviewcontrolbargetprintpreview
}
103 \func{wxPrintPreview *
}{GetPrintPreview
}{\void}
105 Gets the print preview object associated with the control bar.
107 \membersection{wxPreviewControlBar::GetZoomControl
}\label{wxpreviewcontrolbargetzoomcontrol
}
109 \func{int
}{GetZoomControl
}{\void}
111 Gets the current zoom setting in percent.
113 \membersection{wxPreviewControlBar::SetZoomControl
}\label{wxpreviewcontrolbarsetzoomcontrol
}
115 \func{void
}{SetZoomControl
}{\param{int
}{percent
}}
117 Sets the zoom control.
119 \section{\class{wxPreviewFrame
}}\label{wxpreviewframe
}
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.
125 \wxheading{Derived from
}
127 \helpref{wxFrame
}{wxframe
}\\
128 \helpref{wxTopLevelWindow
}{wxtoplevelwindow
}\\
129 \helpref{wxWindow
}{wxwindow
}\\
130 \helpref{wxEvtHandler
}{wxevthandler
}\\
131 \helpref{wxObject
}{wxobject
}
133 \wxheading{Include files
}
139 \helpref{wxPreviewCanvas
}{wxpreviewcanvas
},
\helpref{wxPreviewControlBar
}{wxpreviewcontrolbar
},
\rtfsp
140 \helpref{wxPrintPreview
}{wxprintpreview
}
142 \latexignore{\rtfignore{\wxheading{Members
}}}
144 \membersection{wxPreviewFrame::wxPreviewFrame
}\label{wxpreviewframector
}
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"
}}
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.
153 \membersection{wxPreviewFrame::
\destruct{wxPreviewFrame
}}\label{wxpreviewframedtor
}
155 \func{}{\destruct{wxPreviewFrame
}}{\void}
159 \membersection{wxPreviewFrame::CreateControlBar
}\label{wxpreviewframecreatecontrolbar
}
161 \func{void
}{CreateControlBar
}{\void}
163 Creates a wxPreviewControlBar. Override this function to allow
164 a user-defined preview control bar object to be created.
166 \membersection{wxPreviewFrame::CreateCanvas
}\label{wxpreviewframecreatecanvas
}
168 \func{void
}{CreateCanvas
}{\void}
170 Creates a wxPreviewCanvas. Override this function to allow
171 a user-defined preview canvas object to be created.
173 \membersection{wxPreviewFrame::Initialize
}\label{wxpreviewframeinitialize
}
175 \func{void
}{Initialize
}{\void}
177 Creates the preview canvas and control bar, and calls
178 wxWindow::MakeModal(true) to disable other top-level windows
181 This function should be called by the application prior to
184 \membersection{wxPreviewFrame::OnCloseWindow
}\label{wxpreviewframeonclosewindow
}
186 \func{void
}{OnCloseWindow
}{\param{wxCloseEvent\&
}{ event
}}
188 Enables the other frames in the application, and deletes the print preview
189 object, implicitly deleting any printout objects associated with the print