]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/docmdipr.tex
added wxDEPRECATED_INLINE, use it for wxPixelData<wxBitmap>::UseAlpha() to fix Sun...
[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{wxTopLevelWindow}{wxtoplevelwindow}\\
16\helpref{wxWindow}{wxwindow}\\
17\helpref{wxEvtHandler}{wxevthandler}\\
18\helpref{wxObject}{wxobject}
19
20\wxheading{Include files}
21
22<wx/docmdi.h>
23
24\wxheading{Library}
25
26\helpref{wxCore}{librarieslist}
27
28\wxheading{See also}
29
30\helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIParentFrame}{wxmdiparentframe}
31
32\latexignore{\rtfignore{\wxheading{Members}}}
33
34\membersection{wxDocMDIParentFrame::wxDocMDIParentFrame}\label{wxdocmdiparentframector}
35
36\func{}{wxDocMDIParentFrame}{\void}
37
38\func{}{wxDocMDIParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
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"}}
42
43Constructor.
44
45\membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}}\label{wxdocmdiparentframedtor}
46
47\func{}{\destruct{wxDocMDIParentFrame}}{\void}
48
49Destructor.
50
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
60\membersection{wxDocMDIParentFrame::OnCloseWindow}\label{wxdocmdiparentframeonclosewindow}
61
62\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
63
64Deletes all views and documents. If no user input cancelled the
65operation, the frame will be destroyed and the application will exit.
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}
71void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
72{
73 if (m_docManager->Clear(!event.CanVeto()))
74 {
75 this->Destroy();
76 }
77 else
78 event.Veto();
79}
80\end{verbatim}
81