]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/docmdipr.tex
added ReadType convenience functions (patch 1764160)
[wxWidgets.git] / docs / latex / wx / docmdipr.tex
CommitLineData
f7bd2698
JS
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}\\
7376079d 15\helpref{wxTopLevelWindow}{wxtoplevelwindow}\\
f7bd2698
JS
16\helpref{wxWindow}{wxwindow}\\
17\helpref{wxEvtHandler}{wxevthandler}\\
18\helpref{wxObject}{wxobject}
19
954b8ae6
JS
20\wxheading{Include files}
21
22<wx/docmdi.h>
23
a7af285d
VZ
24\wxheading{Library}
25
26\helpref{wxCore}{librarieslist}
27
f7bd2698
JS
28\wxheading{See also}
29
30\helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIParentFrame}{wxmdiparentframe}
31
32\latexignore{\rtfignore{\wxheading{Members}}}
33
b236c10f 34\membersection{wxDocMDIParentFrame::wxDocMDIParentFrame}\label{wxdocmdiparentframector}
f7bd2698 35
2834deba
JS
36\func{}{wxDocMDIParentFrame}{\void}
37
0f353563 38\func{}{wxDocMDIParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
82540ef2
JS
39 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
40 \param{const wxSize\&}{ size = wxDefaultSize},
41 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
f7bd2698
JS
42
43Constructor.
44
b236c10f 45\membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}}\label{wxdocmdiparentframedtor}
f7bd2698
JS
46
47\func{}{\destruct{wxDocMDIParentFrame}}{\void}
48
49Destructor.
50
2834deba
JS
51\membersection{wxDocMDIParentFrame::Create}\label{wxdocmdiparentframecreate}
52
53\func{bool}{Create}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
54 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
55 \param{const wxSize\&}{ size = wxDefaultSize},
56 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
57
58Creates the window.
59
b236c10f 60\membersection{wxDocMDIParentFrame::OnCloseWindow}\label{wxdocmdiparentframeonclosewindow}
f7bd2698 61
82540ef2 62\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
f7bd2698
JS
63
64Deletes all views and documents. If no user input cancelled the
82540ef2 65operation, the frame will be destroyed and the application will exit.
f7bd2698
JS
66
67Since understanding how document/view clean-up takes place can be difficult,
68the implementation of this function is shown below.
69
70\begin{verbatim}
82540ef2 71void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
f7bd2698 72{
82540ef2 73 if (m_docManager->Clear(!event.CanVeto()))
f7bd2698 74 {
82540ef2 75 this->Destroy();
f7bd2698 76 }
82540ef2
JS
77 else
78 event.Veto();
f7bd2698
JS
79}
80\end{verbatim}
81