#include <wx/docview.h>

The wxDocParentFrame class provides a default top-level frame for applications using the document/view framework.
This class can only be used for SDI (not MDI) parent frames.
It cooperates with the wxView, wxDocument, wxDocManager and wxDocTemplate classes.
Public Member Functions | |
| wxDocParentFrame () | |
| Default constructor. | |
| wxDocParentFrame (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 | ~wxDocParentFrame () |
| Destructor. | |
| bool | Create (wxDocManager *manager, wxFrame *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=541072960, const wxString &name=wxFrameNameStr) |
| Used in two-step construction. | |
| wxDocManager * | GetDocumentManager () const |
| Returns the associated document manager object. | |
| void | OnCloseWindow (wxCloseEvent &event) |
| Deletes all views and documents. | |
| wxDocParentFrame::wxDocParentFrame | ( | ) |
Default constructor.
| wxDocParentFrame::wxDocParentFrame | ( | 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 wxDocParentFrame::~wxDocParentFrame | ( | ) | [virtual] |
Destructor.
| bool wxDocParentFrame::Create | ( | wxDocManager * | manager, | |
| wxFrame * | parent, | |||
| wxWindowID | id, | |||
| const wxString & | title, | |||
| const wxPoint & | pos = wxDefaultPosition, |
|||
| const wxSize & | size = wxDefaultSize, |
|||
| long | style = 541072960, |
|||
| const wxString & | name = wxFrameNameStr | |||
| ) |
Used in two-step construction.
| wxDocManager* wxDocParentFrame::GetDocumentManager | ( | ) | const |
Returns the associated document manager object.
| void wxDocParentFrame::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(); }
|
[ top ] |