]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/docmdipr.tex
added the mention of library in which each class is defined to the documentation...
[wxWidgets.git] / docs / latex / wx / docmdipr.tex
1 \section{\class{wxDocMDIParentFrame}}\label{wxdocmdiparentframe}
2
3 The wxDocMDIParentFrame class provides a default top-level frame for
4 applications using the document/view framework. This class can only be used for MDI parent frames.
5
6 It cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument},
7 \rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplates}{wxdoctemplate} classes.
8
9 See 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{Include files}
20
21 <wx/docmdi.h>
22
23 \wxheading{Library}
24
25 \helpref{wxCore}{librarieslist}
26
27 \wxheading{See also}
28
29 \helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIParentFrame}{wxmdiparentframe}
30
31 \latexignore{\rtfignore{\wxheading{Members}}}
32
33 \membersection{wxDocMDIParentFrame::wxDocMDIParentFrame}\label{wxdocmdiparentframector}
34
35 \func{}{wxDocMDIParentFrame}{\void}
36
37 \func{}{wxDocMDIParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
38 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
39 \param{const wxSize\&}{ size = wxDefaultSize},
40 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
41
42 Constructor.
43
44 \membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}}\label{wxdocmdiparentframedtor}
45
46 \func{}{\destruct{wxDocMDIParentFrame}}{\void}
47
48 Destructor.
49
50 \membersection{wxDocMDIParentFrame::Create}\label{wxdocmdiparentframecreate}
51
52 \func{bool}{Create}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
53 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
54 \param{const wxSize\&}{ size = wxDefaultSize},
55 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
56
57 Creates the window.
58
59 \membersection{wxDocMDIParentFrame::OnCloseWindow}\label{wxdocmdiparentframeonclosewindow}
60
61 \func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
62
63 Deletes all views and documents. If no user input cancelled the
64 operation, the frame will be destroyed and the application will exit.
65
66 Since understanding how document/view clean-up takes place can be difficult,
67 the implementation of this function is shown below.
68
69 \begin{verbatim}
70 void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
71 {
72 if (m_docManager->Clear(!event.CanVeto()))
73 {
74 this->Destroy();
75 }
76 else
77 event.Veto();
78 }
79 \end{verbatim}
80