]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/docprfrm.tex
some minor fixes to the docs (bugs 13271[56])
[wxWidgets.git] / docs / latex / wx / docprfrm.tex
CommitLineData
a660d684
KB
1\section{\class{wxDocParentFrame}}\label{wxdocparentframe}
2
3The wxDocParentFrame class provides a default top-level frame for
4applications using the document/view framework. This class can only be used for SDI (not 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{wxFrame}{wxframe}\\
14\helpref{wxWindow}{wxwindow}\\
15\helpref{wxEvtHandler}{wxevthandler}\\
16\helpref{wxObject}{wxobject}
17
954b8ae6
JS
18\wxheading{Include files}
19
20<wx/docview.h>
21
a660d684
KB
22\wxheading{See also}
23
24\helpref{Document/view overview}{docviewoverview}, \helpref{wxFrame}{wxframe}
25
26\latexignore{\rtfignore{\wxheading{Members}}}
27
28\membersection{wxDocParentFrame::wxDocParentFrame}
29
82540ef2
JS
30\func{}{wxDocParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
31 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
32 \param{const wxSize\&}{ size = wxDefaultSize},
33 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
a660d684
KB
34
35Constructor.
36
37\membersection{wxDocParentFrame::\destruct{wxDocParentFrame}}
38
39\func{}{\destruct{wxDocParentFrame}}{\void}
40
41Destructor.
42
82540ef2 43\membersection{wxDocParentFrame::OnCloseWindow}
a660d684 44
82540ef2 45\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
a660d684
KB
46
47Deletes all views and documents. If no user input cancelled the
82540ef2 48operation, the frame will be destroyed and the application will exit.
a660d684
KB
49
50Since understanding how document/view clean-up takes place can be difficult,
51the implementation of this function is shown below.
52
53\begin{verbatim}
82540ef2 54void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
a660d684 55{
82540ef2 56 if (m_docManager->Clear(!event.CanVeto()))
a660d684 57 {
82540ef2 58 this->Destroy();
a660d684 59 }
82540ef2
JS
60 else
61 event.Veto();
a660d684
KB
62}
63\end{verbatim}
64