]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/docprfrm.tex
Updated border style names
[wxWidgets.git] / docs / latex / wx / docprfrm.tex
1 \section{\class{wxDocParentFrame}}\label{wxdocparentframe}
2
3 The wxDocParentFrame class provides a default top-level frame for
4 applications using the document/view framework. This class can only be used for SDI (not 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{wxFrame}{wxframe}\\
14 \helpref{wxWindow}{wxwindow}\\
15 \helpref{wxEvtHandler}{wxevthandler}\\
16 \helpref{wxObject}{wxobject}
17
18 \wxheading{Include files}
19
20 <wx/docview.h>
21
22 \wxheading{Library}
23
24 \helpref{wxCore}{librarieslist}
25
26 \wxheading{See also}
27
28 \helpref{Document/view overview}{docviewoverview}, \helpref{wxFrame}{wxframe}
29
30 \latexignore{\rtfignore{\wxheading{Members}}}
31
32 \membersection{wxDocParentFrame::wxDocParentFrame}\label{wxdocparentframector}
33
34 \func{}{wxDocParentFrame}{\void}
35
36 Default constructor.
37
38 \func{}{wxDocParentFrame}{\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
43 Constructor.
44
45 \membersection{wxDocParentFrame::\destruct{wxDocParentFrame}}\label{wxdocparentframedtor}
46
47 \func{}{\destruct{wxDocParentFrame}}{\void}
48
49 Destructor.
50
51 \membersection{wxDocParentFrame::Create}\label{wxdocparentframecreate}
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
58 Used in two-step construction.
59
60 \membersection{wxDocParentFrame::GetDocumentManager}\label{wxdocparentframegetdocumentmanager}
61
62 \constfunc{wxDocManager *}{GetDocumentManager}{\void}
63
64 Returns the associated \helpref{document manager object}{wxdocmanager}.
65
66
67
68 \membersection{wxDocParentFrame::OnCloseWindow}\label{wxdocparentframeonclosewindow}
69
70 \func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
71
72 Deletes all views and documents. If no user input cancelled the
73 operation, the frame will be destroyed and the application will exit.
74
75 Since understanding how document/view clean-up takes place can be difficult,
76 the implementation of this function is shown below.
77
78 \begin{verbatim}
79 void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
80 {
81 if (m_docManager->Clear(!event.CanVeto()))
82 {
83 this->Destroy();
84 }
85 else
86 event.Veto();
87 }
88 \end{verbatim}
89