<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\section{\class{wxDocMDIParentFrame}}\label{wxdocmdiparentframe}

The wxDocMDIParentFrame class provides a default top-level frame for
applications using the document/view framework. This class can only be used for MDI parent frames.

It cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument},
\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplates}{wxdoctemplate} classes.

See the example application in {\tt samples/docview}.

\wxheading{Derived from}

\helpref{wxMDIParentFrame}{wxmdiparentframe}\\
\helpref{wxFrame}{wxframe}\\
\helpref{wxTopLevelWindow}{wxtoplevelwindow}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}

\wxheading{Include files}

&lt;wx/docmdi.h&gt;

\wxheading{Library}

\helpref{wxCore}{librarieslist}

\wxheading{See also}

\helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIParentFrame}{wxmdiparentframe}

\latexignore{\rtfignore{\wxheading{Members}}}

\membersection{wxDocMDIParentFrame::wxDocMDIParentFrame}\label{wxdocmdiparentframector}

\func{}{wxDocMDIParentFrame}{\void}

\func{}{wxDocMDIParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
 \param{const wxString\&amp; }{title}, \param{const wxPoint\&amp;}{ pos = wxDefaultPosition},
 \param{const wxSize\&amp;}{ size = wxDefaultSize},
 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\&amp; }{name = "frame"}}

Constructor.

\membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}}\label{wxdocmdiparentframedtor}

\func{}{\destruct{wxDocMDIParentFrame}}{\void}

Destructor.

\membersection{wxDocMDIParentFrame::Create}\label{wxdocmdiparentframecreate}

\func{bool}{Create}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
 \param{const wxString\&amp; }{title}, \param{const wxPoint\&amp;}{ pos = wxDefaultPosition},
 \param{const wxSize\&amp;}{ size = wxDefaultSize},
 \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\&amp; }{name = "frame"}}

Creates the window.

\membersection{wxDocMDIParentFrame::OnCloseWindow}\label{wxdocmdiparentframeonclosewindow}

\func{void}{OnCloseWindow}{\param{wxCloseEvent\&amp;}{ event}}

Deletes all views and documents. If no user input cancelled the
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}
void wxDocParentFrame::OnCloseWindow(wxCloseEvent&amp; event)
{
  if (m_docManager-&gt;Clear(!event.CanVeto()))
  {
    this-&gt;Destroy();
  }
  else
    event.Veto();
}
\end{verbatim}

</pre></body></html>