]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/docmdipr.tex
add events API to wxHtmlWindow (patch #1504493 by Francesco Montorsi)
[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{Include files}
20
21<wx/docmdi.h>
22
23\wxheading{See also}
24
25\helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIParentFrame}{wxmdiparentframe}
26
27\latexignore{\rtfignore{\wxheading{Members}}}
28
29\membersection{wxDocMDIParentFrame::wxDocMDIParentFrame}\label{wxdocmdiparentframector}
30
31\func{}{wxDocMDIParentFrame}{\void}
32
33\func{}{wxDocMDIParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
34 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
35 \param{const wxSize\&}{ size = wxDefaultSize},
36 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
37
38Constructor.
39
40\membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}}\label{wxdocmdiparentframedtor}
41
42\func{}{\destruct{wxDocMDIParentFrame}}{\void}
43
44Destructor.
45
46\membersection{wxDocMDIParentFrame::Create}\label{wxdocmdiparentframecreate}
47
48\func{bool}{Create}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
49 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
50 \param{const wxSize\&}{ size = wxDefaultSize},
51 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
52
53Creates the window.
54
55\membersection{wxDocMDIParentFrame::OnCloseWindow}\label{wxdocmdiparentframeonclosewindow}
56
57\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
58
59Deletes all views and documents. If no user input cancelled the
60operation, the frame will be destroyed and the application will exit.
61
62Since understanding how document/view clean-up takes place can be difficult,
63the implementation of this function is shown below.
64
65\begin{verbatim}
66void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
67{
68 if (m_docManager->Clear(!event.CanVeto()))
69 {
70 this->Destroy();
71 }
72 else
73 event.Veto();
74}
75\end{verbatim}
76