wxdocmdiparentframethe 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 wxview, wxdocument, wxdocmanager and wxdoctemplates classes. see the example application in samples/docview. derived from
wxmdiparentframe include files <wx/docmdi.h> see also document/view overview, wxmdiparentframe members
wxdocmdiparentframe::wxdocmdiparentframe
wxdocmdiparentframe::wxdocmdiparentframewxdocmdiparentframe() wxdocmdiparentframe(wxdocmanager* manager, wxframe *parent, wxwindowid id, const wxstring& title, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxdefault_frame_style, const wxstring& name = "frame") constructor.
wxdocmdiparentframe::~wxdocmdiparentframe~wxdocmdiparentframe() destructor.
wxdocmdiparentframe::createbool create(wxdocmanager* manager, wxframe *parent, wxwindowid id, const wxstring& title, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxdefault_frame_style, const wxstring& name = "frame") creates the window.
wxdocmdiparentframe::onclosewindowvoid onclosewindow(wxcloseevent& 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.
void wxdocparentframe::onclosewindow(wxcloseevent& event) { if (m_docmanager->clear(!event.canveto())) { this->destroy(); } else event.veto(); } |