X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f7bd26981f1c8d46d3909e3de90df081de4df33b..13b555259270512e01b20631c60468327fd08ba7:/docs/latex/wx/docmdipr.tex

diff --git a/docs/latex/wx/docmdipr.tex b/docs/latex/wx/docmdipr.tex
index 5bb084dcfe..6e5b639432 100644
--- a/docs/latex/wx/docmdipr.tex
+++ b/docs/latex/wx/docmdipr.tex
@@ -16,64 +16,61 @@ See the example application in {\tt samples/docview}.
 \helpref{wxEvtHandler}{wxevthandler}\\
 \helpref{wxObject}{wxobject}
 
+\wxheading{Include files}
+
+<wx/docmdi.h>
+
 \wxheading{See also}
 
 \helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIParentFrame}{wxmdiparentframe}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
-\membersection{wxDocMDIParentFrame::wxDocMDIParentFrame}
+\membersection{wxDocMDIParentFrame::wxDocMDIParentFrame}\label{wxdocmdiparentframector}
+
+\func{}{wxDocMDIParentFrame}{\void}
 
-\func{}{wxDocMDIParentFrame}{\param{wxFrame *}{parent}, \param{wxWindowID}{ id},
- \param{const wxString\& }{title}, \param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height},
- \param{long}{ style}, \param{const wxString\& }{name}}
+\func{}{wxDocMDIParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
+ \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
+ \param{const wxSize\&}{ size = wxDefaultSize},
+ \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
 
 Constructor.
 
-\membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}}
+\membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}}\label{wxdocmdiparentframedtor}
 
 \func{}{\destruct{wxDocMDIParentFrame}}{\void}
 
 Destructor.
 
-\membersection{wxDocMDIParentFrame::OnClose}
+\membersection{wxDocMDIParentFrame::Create}\label{wxdocmdiparentframecreate}
+
+\func{bool}{Create}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
+ \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
+ \param{const wxSize\&}{ size = wxDefaultSize},
+ \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
+
+Creates the window.
+
+\membersection{wxDocMDIParentFrame::OnCloseWindow}\label{wxdocmdiparentframeonclosewindow}
 
-\func{bool}{OnClose}{\void}
+\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
 
 Deletes all views and documents. If no user input cancelled the
-operation, the function returns TRUE and the application will exit.
+operation, the frame will be destroyed and the application will exit.
 
 Since understanding how document/view clean-up takes place can be difficult,
 the implementation of this function is shown below.
 
 \begin{verbatim}
-bool wxDocMDIParentFrame::OnClose(void)
+void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
 {
-  // Delete all views and documents
-  wxNode *node = docManager->GetDocuments().First();
-  while (node)
+  if (m_docManager->Clear(!event.CanVeto()))
   {
-    wxDocument *doc = (wxDocument *)node->Data();
-    wxNode *next = node->Next();
-
-    if (!doc->Close())
-      return FALSE;
-
-    // Implicitly deletes the document when the last
-    // view is removed (deleted)
-    doc->DeleteAllViews();
-
-    // Check document is deleted
-    if (docManager->GetDocuments().Member(doc))
-      delete doc;
-
-    // This assumes that documents are not connected in
-    // any way, i.e. deleting one document does NOT
-    // delete another.
-    node = next;
+    this->Destroy();
   }
-  return TRUE;
+  else
+    event.Veto();
 }
 \end{verbatim}
 
-
