1 \section{\class{wxDocParentFrame
}}\label{wxdocparentframe
}
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.
6 It cooperates with the
\helpref{wxView
}{wxview
},
\helpref{wxDocument
}{wxdocument
},
7 \rtfsp\helpref{wxDocManager
}{wxdocmanager
} and
\helpref{wxDocTemplates
}{wxdoctemplate
} classes.
9 See the example application in
{\tt samples/docview
}.
11 \wxheading{Derived from
}
13 \helpref{wxFrame
}{wxframe
}\\
14 \helpref{wxWindow
}{wxwindow
}\\
15 \helpref{wxEvtHandler
}{wxevthandler
}\\
16 \helpref{wxObject
}{wxobject
}
18 \wxheading{Include files
}
24 \helpref{wxCore
}{librarieslist
}
28 \helpref{Document/view overview
}{docviewoverview
},
\helpref{wxFrame
}{wxframe
}
30 \latexignore{\rtfignore{\wxheading{Members
}}}
32 \membersection{wxDocParentFrame::wxDocParentFrame
}\label{wxdocparentframector
}
34 \func{}{wxDocParentFrame
}{\void}
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"
}}
45 \membersection{wxDocParentFrame::
\destruct{wxDocParentFrame
}}\label{wxdocparentframedtor
}
47 \func{}{\destruct{wxDocParentFrame
}}{\void}
51 \membersection{wxDocParentFrame::Create
}\label{wxdocparentframecreate
}
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"
}}
58 Used in two-step construction.
60 \membersection{wxDocParentFrame::GetDocumentManager
}\label{wxdocparentframegetdocumentmanager
}
62 \constfunc{wxDocManager *
}{GetDocumentManager
}{\void}
64 Returns the associated
\helpref{document manager object
}{wxdocmanager
}.
68 \membersection{wxDocParentFrame::OnCloseWindow
}\label{wxdocparentframeonclosewindow
}
70 \func{void
}{OnCloseWindow
}{\param{wxCloseEvent\&
}{ event
}}
72 Deletes all views and documents. If no user input cancelled the
73 operation, the frame will be destroyed and the application will exit.
75 Since understanding how
document/view clean-up takes place can be difficult,
76 the implementation of this function is shown below.
79 void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
81 if (m_docManager->Clear(!event.CanVeto()))