a9e2e6e52b
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
93 lines
2.9 KiB
C++
93 lines
2.9 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: docmdi.h
|
|
// Purpose: Frame classes for MDI document/view applications
|
|
// Author: Julian Smart
|
|
// Modified by:
|
|
// Created: 01/02/97
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) Julian Smart
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_DOCMDI_H_
|
|
#define _WX_DOCMDI_H_
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#if wxUSE_MDI_ARCHITECTURE
|
|
|
|
#include "wx/docview.h"
|
|
#include "wx/mdi.h"
|
|
|
|
/*
|
|
* Use this instead of wxMDIParentFrame
|
|
*/
|
|
|
|
class WXDLLIMPEXP_CORE wxDocMDIParentFrame: public wxMDIParentFrame
|
|
{
|
|
public:
|
|
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);
|
|
|
|
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);
|
|
|
|
wxDocManager *GetDocumentManager(void) const { return m_docManager; }
|
|
|
|
void OnExit(wxCommandEvent& event);
|
|
void OnMRUFile(wxCommandEvent& event);
|
|
void OnCloseWindow(wxCloseEvent& event);
|
|
|
|
protected:
|
|
void Init();
|
|
|
|
virtual bool TryBefore(wxEvent& event);
|
|
|
|
wxDocManager *m_docManager;
|
|
|
|
private:
|
|
DECLARE_CLASS(wxDocMDIParentFrame)
|
|
DECLARE_EVENT_TABLE()
|
|
wxDECLARE_NO_COPY_CLASS(wxDocMDIParentFrame);
|
|
};
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// An MDI document child frame: we need to define it as a class just for wxRTTI,
|
|
// otherwise we could simply typedef it
|
|
// ----------------------------------------------------------------------------
|
|
|
|
typedef
|
|
wxDocChildFrameAny<wxMDIChildFrame, wxMDIParentFrame> wxDocMDIChildFrameBase;
|
|
|
|
class WXDLLIMPEXP_CORE wxDocMDIChildFrame : public wxDocMDIChildFrameBase
|
|
{
|
|
public:
|
|
wxDocMDIChildFrame(wxDocument *doc,
|
|
wxView *view,
|
|
wxMDIParentFrame *parent,
|
|
wxWindowID id,
|
|
const wxString& title,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
const wxString& name = wxFrameNameStr)
|
|
: wxDocMDIChildFrameBase(doc, view,
|
|
parent, id, title, pos, size, style, name)
|
|
{
|
|
}
|
|
|
|
private:
|
|
DECLARE_CLASS(wxDocMDIChildFrame)
|
|
wxDECLARE_NO_COPY_CLASS(wxDocMDIChildFrame);
|
|
};
|
|
|
|
WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxDocMDIChildFrameBase )
|
|
|
|
|
|
#endif // wxUSE_MDI_ARCHITECTURE
|
|
|
|
#endif // _WX_DOCMDI_H_
|