]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/docmdipr.tex
* Doc updates
[wxWidgets.git] / docs / latex / wx / docmdipr.tex
... / ...
CommitLineData
1\section{\class{wxDocMDIParentFrame}}\label{wxdocmdiparentframe}
2
3The wxDocMDIParentFrame class provides a default top-level frame for
4applications using the document/view framework. This class can only be used for MDI parent frames.
5
6It cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument},
7\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplates}{wxdoctemplate} classes.
8
9See the example application in {\tt samples/docview}.
10
11\wxheading{Derived from}
12
13\helpref{wxMDIParentFrame}{wxmdiparentframe}\\
14\helpref{wxFrame}{wxframe}\\
15\helpref{wxWindow}{wxwindow}\\
16\helpref{wxEvtHandler}{wxevthandler}\\
17\helpref{wxObject}{wxobject}
18
19\wxheading{See also}
20
21\helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIParentFrame}{wxmdiparentframe}
22
23\latexignore{\rtfignore{\wxheading{Members}}}
24
25\membersection{wxDocMDIParentFrame::wxDocMDIParentFrame}
26
27\func{}{wxDocParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
28 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
29 \param{const wxSize\&}{ size = wxDefaultSize},
30 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
31
32Constructor.
33
34\membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}}
35
36\func{}{\destruct{wxDocMDIParentFrame}}{\void}
37
38Destructor.
39
40\membersection{wxDocMDIParentFrame::OnCloseWindow}
41
42\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
43
44Deletes all views and documents. If no user input cancelled the
45operation, the frame will be destroyed and the application will exit.
46
47Since understanding how document/view clean-up takes place can be difficult,
48the implementation of this function is shown below.
49
50\begin{verbatim}
51void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
52{
53 if (m_docManager->Clear(!event.CanVeto()))
54 {
55 this->Destroy();
56 }
57 else
58 event.Veto();
59}
60\end{verbatim}
61