]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/docprfrm.tex
Reverted renderer changes and just use window variant within renderer functions
[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
b236c10f 28\membersection{wxDocParentFrame::wxDocParentFrame}\label{wxdocparentframector}
a660d684 29
0c246b3c
PC
30\func{}{wxDocParentFrame}{\void}
31
32Default constructor.
33
82540ef2
JS
34\func{}{wxDocParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
35 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
36 \param{const wxSize\&}{ size = wxDefaultSize},
37 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
a660d684
KB
38
39Constructor.
40
b236c10f 41\membersection{wxDocParentFrame::\destruct{wxDocParentFrame}}\label{wxdocparentframedtor}
a660d684
KB
42
43\func{}{\destruct{wxDocParentFrame}}{\void}
44
45Destructor.
46
0c246b3c
PC
47\membersection{wxDocParentFrame::Create}\label{wxdocparentframecreate}
48
49\func{bool}{Create}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
50 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
51 \param{const wxSize\&}{ size = wxDefaultSize},
52 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
53
54Used in two-step construction.
55
b1c08dbd
VZ
56\membersection{wxDocParentFrame::GetDocumentManager}\label{wxdocparentframegetdocumentmanager}
57
58\constfunc{wxDocManager *}{GetDocumentManager}{\void}
59
60Returns the associated \helpref{document manager object}{wxdocmanager}.
61
62
63
b236c10f 64\membersection{wxDocParentFrame::OnCloseWindow}\label{wxdocparentframeonclosewindow}
a660d684 65
82540ef2 66\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
a660d684
KB
67
68Deletes all views and documents. If no user input cancelled the
82540ef2 69operation, the frame will be destroyed and the application will exit.
a660d684
KB
70
71Since understanding how document/view clean-up takes place can be difficult,
72the implementation of this function is shown below.
73
74\begin{verbatim}
82540ef2 75void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
a660d684 76{
82540ef2 77 if (m_docManager->Clear(!event.CanVeto()))
a660d684 78 {
82540ef2 79 this->Destroy();
a660d684 80 }
82540ef2
JS
81 else
82 event.Veto();
a660d684
KB
83}
84\end{verbatim}
85