wxDocMDIParentFrame Class Reference
[Document/View Framework]

#include <wx/docmdi.h>

Inheritance diagram for wxDocMDIParentFrame:
Inheritance graph
[legend]

Detailed Description

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 wxView, wxDocument, wxDocManager and wxDocTemplate classes.

Library:  wxCore
Category:  Document/View Framework
See also:
Document/View Framework, Document/View Sample, wxMDIParentFrame

Public Member Functions

virtual ~wxDocMDIParentFrame ()
 Destructor.
bool 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=wxFrameNameStr)
 Creates the window.
void OnCloseWindow (wxCloseEvent &event)
 Deletes all views and documents.



 wxDocMDIParentFrame ()
 Constructor.
 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=wxFrameNameStr)
 Constructor.

List of all members.


Constructor & Destructor Documentation

wxDocMDIParentFrame::wxDocMDIParentFrame (  ) 

Constructor.

wxDocMDIParentFrame::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 = wxFrameNameStr 
)

Constructor.

virtual wxDocMDIParentFrame::~wxDocMDIParentFrame (  )  [virtual]

Destructor.


Member Function Documentation

bool wxDocMDIParentFrame::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 = wxFrameNameStr 
)

Creates the window.

void wxDocMDIParentFrame::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();
        }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



wxWidgets logo

[ top ]