2 \section{\class{wxPreviewCanvas
}}\label{wxpreviewcanvas
}
4 A preview canvas is the default canvas used by the print preview
5 system to display the preview.
7 \wxheading{Derived from
}
9 \helpref{wxScrolledWindow
}{wxscrolledwindow
}\\
10 \helpref{wxWindow
}{wxwindow
}\\
11 \helpref{wxevthandler
}{wxevthandler
}\\
12 \helpref{wxObject
}{wxobject
}
16 \helpref{wxPreviewFrame
}{wxpreviewframe
},
\helpref{wxPreviewControlBar
}{wxpreviewcontrolbar
},
\rtfsp
17 \helpref{wxPrintPreview
}{wxprintpreview
}
19 \latexignore{\rtfignore{\wxheading{Members
}}}
21 \membersection{wxPreviewCanvas::wxPreviewCanvas
}
23 \func{}{wxPreviewCanvas
}{\param{wxPrintPreview*
}{preview
},
\param{wxWindow*
}{parent
},
24 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{size = wxDefaultSize
},
25 \param{long
}{ style =
0},
\param{const wxString\&
}{name = ``canvas"
}}
29 \membersection{wxPreviewCanvas::
\destruct{wxPreviewCanvas
}}
31 \func{}{\destruct{wxPreviewCanvas
}}{\void}
35 \membersection{wxPreviewCanvas::OnPaint
}\label{wxpreviewcanvasonpaint
}
37 \func{void
}{OnPaint
}{\param{wxPaintEvent\&
}{event
}}
39 Calls
\helpref{wxPrintPreview::PaintPage
}{wxprintpreviewpaintpage
} to refresh the canvas.
41 \section{\class{wxPreviewControlBar
}}\label{wxpreviewcontrolbar
}
43 This is the default implementation of the preview control bar, a panel
44 with buttons and a zoom control. You can derive a new class from this and
45 override some or all member functions to change the behaviour and appearance;
46 or you can leave it as it is.
48 \wxheading{Derived from
}
50 \helpref{wxPanel
}{wxpanel
}\\
51 \helpref{wxWindow
}{wxwindow
}\\
52 \helpref{wxEvtHandler
}{wxevthandler
}\\
53 \helpref{wxObject
}{wxobject
}
57 \helpref{wxPreviewFrame
}{wxpreviewframe
},
\helpref{wxPreviewCanvas
}{wxpreviewcanvas
},
\rtfsp
58 \helpref{wxPrintPreview
}{wxprintpreview
}
60 \latexignore{\rtfignore{\wxheading{Members
}}}
62 \membersection{wxPreviewControlBar::wxPreviewControlbar
}
64 \func{}{wxPreviewControlBar
}{\param{wxPrintPreview*
}{preview
},
\param{long
}{ buttons
},
\param{wxWindow*
}{parent
},
65 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{size = wxDefaultSize
},
66 \param{long
}{ style =
0},
\param{const wxString\&
}{name = ``panel"
}}
70 The buttons parameter may be a combination of the following, using the bitwise `or' operator.
72 \begin{twocollist
}\itemsep=
0pt
73 \twocolitem{wxPREVIEW
\_PRINT}{Create a print button.
}
74 \twocolitem{wxPREVIEW
\_NEXT}{Create a next page button.
}
75 \twocolitem{wxPREVIEW
\_PREVIOUS}{Create a previous page button.
}
76 \twocolitem{wxPREVIEW
\_ZOOM}{Create a zoom control.
}
77 \twocolitem{wxPREVIEW
\_DEFAULT}{Equivalent to a combination of wxPREVIEW
\_PREVIOUS, wxPREVIEW
\_NEXT and
81 \membersection{wxPreviewControlBar::
\destruct{wxPreviewControlBar
}}
83 \func{}{\destruct{wxPreviewControlBar
}}{\void}
87 \membersection{wxPreviewControlBar::CreateButtons
}
89 \func{void
}{CreateButtons
}{\void}
91 Creates buttons, according to value of the button style flags.
93 \membersection{wxPreviewControlBar::GetPrintPreview
}
95 \func{wxPrintPreview *
}{GetPrintPreview
}{\void}
97 Gets the print preview object associated with the control bar.
99 \membersection{wxPreviewControlBar::GetZoomControl
}
101 \func{int
}{GetZoomControl
}{\void}
103 Gets the current zoom setting in percent.
105 \membersection{wxPreviewControlBar::SetZoomControl
}
107 \func{void
}{SetZoomControl
}{\param{int
}{percent
}}
109 Sets the zoom control.
111 \section{\class{wxPreviewFrame
}}\label{wxpreviewframe
}
113 This class provides the default method of managing the print preview interface.
114 Member functions may be overridden to replace functionality, or the
115 class may be used without derivation.
117 \wxheading{Derived from
}
119 \helpref{wxFrame
}{wxframe
}\\
120 \helpref{wxWindow
}{wxwindow
}\\
121 \helpref{wxEvtHandler
}{wxevthandler
}\\
122 \helpref{wxObject
}{wxobject
}
126 \helpref{wxPreviewCanvas
}{wxpreviewcanvas
},
\helpref{wxPreviewControlBar
}{wxpreviewcontrolbar
},
\rtfsp
127 \helpref{wxPrintPreview
}{wxprintpreview
}
129 \latexignore{\rtfignore{\wxheading{Members
}}}
131 \membersection{wxPreviewFrame::wxPreviewFrame
}
133 \func{}{wxPreviewFrame
}{\param{wxPrintPreview*
}{preview
},
\param{wxFrame*
}{parent
},
\param{const wxString\&
}{title
},
134 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\& size
}{size = wxDefaultSize
},
135 \param{long
}{ style = wxDEFAULT
\_FRAME\_STYLE},
\param{const wxString\&
}{name = ``frame"
}}
137 Constructor. Pass a print preview object plus other normal frame arguments.
139 \membersection{wxPreviewFrame::
\destruct{wxPreviewFrame
}}
141 \func{}{\destruct{wxPreviewFrame
}}{\void}
145 \membersection{wxPreviewFrame::CreateControlBar
}
147 \func{void
}{CreateControlBar
}{\void}
149 Creates a wxPreviewControlBar. Override this function to allow
150 a user-defined preview control bar object to be created.
152 \membersection{wxPreviewFrame::CreateCanvas
}
154 \func{void
}{CreateCanvas
}{\void}
156 Creates a wxPreviewCanvas. Override this function to allow
157 a user-defined preview canvas object to be created.
159 \membersection{wxPreviewFrame::Initialize
}
161 \func{void
}{Initialize
}{\void}
163 Creates the preview canvas and control bar, and calls
164 wxWindow::MakeModal(TRUE) to disable other top-level windows
167 This function should be called by the application prior to
170 \membersection{wxPreviewFrame::OnClose
}
172 \func{bool
}{OnClose
}{\void}
174 Enables the other frames in the application, and deletes the print preview
175 object, implicitly deleting any printout objects associated with the print