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{wxWindow
}{wxwindow
}\\
10 \helpref{wxevthandler
}{wxevthandler
}\\
11 \helpref{wxObject
}{wxobject
}
13 \wxheading{Include files
}
19 \helpref{wxPreviewFrame
}{wxpreviewframe
},
\helpref{wxPreviewControlBar
}{wxpreviewcontrolbar
},
\rtfsp
20 \helpref{wxPrintPreview
}{wxprintpreview
}
22 \latexignore{\rtfignore{\wxheading{Members
}}}
24 \membersection{wxPreviewCanvas::wxPreviewCanvas
}
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"
}}
32 \membersection{wxPreviewCanvas::
\destruct{wxPreviewCanvas
}}
34 \func{}{\destruct{wxPreviewCanvas
}}{\void}
38 \membersection{wxPreviewCanvas::OnPaint
}\label{wxpreviewcanvasonpaint
}
40 \func{void
}{OnPaint
}{\param{wxPaintEvent\&
}{event
}}
42 Calls
\helpref{wxPrintPreview::PaintPage
}{wxprintpreviewpaintpage
} to refresh the canvas.
44 \section{\class{wxPreviewControlBar
}}\label{wxpreviewcontrolbar
}
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.
51 \wxheading{Derived from
}
53 \helpref{wxPanel
}{wxpanel
}\\
54 \helpref{wxWindow
}{wxwindow
}\\
55 \helpref{wxEvtHandler
}{wxevthandler
}\\
56 \helpref{wxObject
}{wxobject
}
58 \wxheading{Include files
}
64 \helpref{wxPreviewFrame
}{wxpreviewframe
},
\helpref{wxPreviewCanvas
}{wxpreviewcanvas
},
\rtfsp
65 \helpref{wxPrintPreview
}{wxprintpreview
}
67 \latexignore{\rtfignore{\wxheading{Members
}}}
69 \membersection{wxPreviewControlBar::wxPreviewControlbar
}
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"
}}
77 The buttons parameter may be a combination of the following, using the bitwise `or' operator.
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
88 \membersection{wxPreviewControlBar::
\destruct{wxPreviewControlBar
}}
90 \func{}{\destruct{wxPreviewControlBar
}}{\void}
94 \membersection{wxPreviewControlBar::CreateButtons
}
96 \func{void
}{CreateButtons
}{\void}
98 Creates buttons, according to value of the button style flags.
100 \membersection{wxPreviewControlBar::GetPrintPreview
}
102 \func{wxPrintPreview *
}{GetPrintPreview
}{\void}
104 Gets the print preview object associated with the control bar.
106 \membersection{wxPreviewControlBar::GetZoomControl
}
108 \func{int
}{GetZoomControl
}{\void}
110 Gets the current zoom setting in percent.
112 \membersection{wxPreviewControlBar::SetZoomControl
}
114 \func{void
}{SetZoomControl
}{\param{int
}{percent
}}
116 Sets the zoom control.
118 \section{\class{wxPreviewFrame
}}\label{wxpreviewframe
}
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.
124 \wxheading{Derived from
}
126 \helpref{wxFrame
}{wxframe
}\\
127 \helpref{wxWindow
}{wxwindow
}\\
128 \helpref{wxEvtHandler
}{wxevthandler
}\\
129 \helpref{wxObject
}{wxobject
}
131 \wxheading{Include files
}
137 \helpref{wxPreviewCanvas
}{wxpreviewcanvas
},
\helpref{wxPreviewControlBar
}{wxpreviewcontrolbar
},
\rtfsp
138 \helpref{wxPrintPreview
}{wxprintpreview
}
140 \latexignore{\rtfignore{\wxheading{Members
}}}
142 \membersection{wxPreviewFrame::wxPreviewFrame
}
144 \func{}{wxPreviewFrame
}{\param{wxPrintPreview*
}{preview
},
\param{wxFrame*
}{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"
}}
148 Constructor. Pass a print preview object plus other normal frame arguments.
150 \membersection{wxPreviewFrame::
\destruct{wxPreviewFrame
}}
152 \func{}{\destruct{wxPreviewFrame
}}{\void}
156 \membersection{wxPreviewFrame::CreateControlBar
}
158 \func{void
}{CreateControlBar
}{\void}
160 Creates a wxPreviewControlBar. Override this function to allow
161 a user-defined preview control bar object to be created.
163 \membersection{wxPreviewFrame::CreateCanvas
}
165 \func{void
}{CreateCanvas
}{\void}
167 Creates a wxPreviewCanvas. Override this function to allow
168 a user-defined preview canvas object to be created.
170 \membersection{wxPreviewFrame::Initialize
}
172 \func{void
}{Initialize
}{\void}
174 Creates the preview canvas and control bar, and calls
175 wxWindow::MakeModal(TRUE) to disable other top-level windows
178 This function should be called by the application prior to
181 \membersection{wxPreviewFrame::OnCloseWindow
}
183 \func{void
}{OnCloseWindow
}{\param{wxCloseEvent\&
}{ event
}}
185 Enables the other frames in the application, and deletes the print preview
186 object, implicitly deleting any printout objects associated with the print