1998-07-28 09:33:23 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: docmdi.h
|
|
|
|
// Purpose: Frame classes for MDI document/view applications
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
2005-05-04 14:57:50 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-09-10 08:56:07 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-07-28 09:33:23 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DOCMDI_H_
|
|
|
|
#define _WX_DOCMDI_H_
|
|
|
|
|
1999-06-22 04:36:29 -04:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2003-01-12 17:20:46 -05:00
|
|
|
#if wxUSE_MDI_ARCHITECTURE
|
1999-06-22 04:36:29 -04:00
|
|
|
|
1998-07-28 09:33:23 -04:00
|
|
|
#include "wx/docview.h"
|
|
|
|
#include "wx/mdi.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Use this instead of wxMDIParentFrame
|
|
|
|
*/
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxDocMDIParentFrame: public wxMDIParentFrame
|
1998-07-28 09:33:23 -04:00
|
|
|
{
|
2002-12-04 09:11:26 -05:00
|
|
|
public:
|
2004-05-11 10:35:51 -04:00
|
|
|
wxDocMDIParentFrame();
|
2002-12-04 09:11:26 -05:00
|
|
|
wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
|
|
|
|
const wxString& title, const wxPoint& pos = wxDefaultPosition,
|
2008-11-08 10:01:00 -05:00
|
|
|
const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr);
|
1998-07-28 09:33:23 -04:00
|
|
|
|
2004-05-11 10:35:51 -04:00
|
|
|
bool Create(wxDocManager *manager, wxFrame *parent, wxWindowID id,
|
|
|
|
const wxString& title, const wxPoint& pos = wxDefaultPosition,
|
2008-11-08 10:01:00 -05:00
|
|
|
const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr);
|
2004-05-11 10:35:51 -04:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
wxDocManager *GetDocumentManager(void) const { return m_docManager; }
|
1998-07-28 09:33:23 -04:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
void OnExit(wxCommandEvent& event);
|
|
|
|
void OnMRUFile(wxCommandEvent& event);
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
1998-07-28 09:33:23 -04:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
protected:
|
2004-05-11 10:35:51 -04:00
|
|
|
void Init();
|
2008-09-21 20:33:11 -04:00
|
|
|
|
2009-02-26 11:16:31 -05:00
|
|
|
virtual bool TryBefore(wxEvent& event);
|
2008-09-21 20:33:11 -04:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
wxDocManager *m_docManager;
|
1998-07-28 09:33:23 -04:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
private:
|
|
|
|
DECLARE_CLASS(wxDocMDIParentFrame)
|
|
|
|
DECLARE_EVENT_TABLE()
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxDocMDIParentFrame);
|
1998-07-28 09:33:23 -04:00
|
|
|
};
|
|
|
|
|
2009-02-27 07:24:03 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// An MDI document child frame: we need to define it as a class just for wxRTTI,
|
|
|
|
// otherwise we could simply typedef it
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-07-28 09:33:23 -04:00
|
|
|
|
2009-02-27 08:12:25 -05:00
|
|
|
#ifdef __VISUALC6__
|
|
|
|
// "non dll-interface class 'wxDocChildFrameAny<>' used as base interface
|
|
|
|
// for dll-interface class 'wxDocMDIChildFrame'" -- this is bogus as the
|
|
|
|
// template will be DLL-exported but only once it is used as base class
|
|
|
|
// here!
|
|
|
|
#pragma warning (disable:4275)
|
|
|
|
#endif
|
|
|
|
|
2009-02-27 07:24:03 -05:00
|
|
|
typedef
|
|
|
|
wxDocChildFrameAny<wxMDIChildFrame, wxMDIParentFrame> wxDocMDIChildFrameBase;
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxDocMDIChildFrame : public wxDocMDIChildFrameBase
|
1998-07-28 09:33:23 -04:00
|
|
|
{
|
2002-12-04 09:11:26 -05:00
|
|
|
public:
|
2009-02-27 07:24:03 -05:00
|
|
|
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)
|
|
|
|
{
|
|
|
|
}
|
2002-12-04 09:11:26 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_CLASS(wxDocMDIChildFrame)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxDocMDIChildFrame);
|
1998-07-28 09:33:23 -04:00
|
|
|
};
|
|
|
|
|
2009-02-27 08:12:25 -05:00
|
|
|
#ifdef __VISUALC6__
|
|
|
|
#pragma warning (default:4275)
|
|
|
|
#endif
|
2009-02-27 07:24:03 -05:00
|
|
|
|
|
|
|
#endif // wxUSE_MDI_ARCHITECTURE
|
1999-06-22 13:39:02 -04:00
|
|
|
|
2009-02-27 07:24:03 -05:00
|
|
|
#endif // _WX_DOCMDI_H_
|