1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Frame classes for MDI document/view applications
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
17 #if wxUSE_MDI_ARCHITECTURE
19 #include "wx/docview.h"
23 * Use this instead of wxMDIParentFrame
26 class WXDLLIMPEXP_CORE wxDocMDIParentFrame
: public wxMDIParentFrame
29 wxDocMDIParentFrame();
30 wxDocMDIParentFrame(wxDocManager
*manager
, wxFrame
*parent
, wxWindowID id
,
31 const wxString
& title
, const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
, long style
= wxDEFAULT_FRAME_STYLE
, const wxString
& name
= wxFrameNameStr
);
34 bool Create(wxDocManager
*manager
, wxFrame
*parent
, wxWindowID id
,
35 const wxString
& title
, const wxPoint
& pos
= wxDefaultPosition
,
36 const wxSize
& size
= wxDefaultSize
, long style
= wxDEFAULT_FRAME_STYLE
, const wxString
& name
= wxFrameNameStr
);
38 wxDocManager
*GetDocumentManager(void) const { return m_docManager
; }
40 void OnExit(wxCommandEvent
& event
);
41 void OnMRUFile(wxCommandEvent
& event
);
42 void OnCloseWindow(wxCloseEvent
& event
);
47 virtual bool TryBefore(wxEvent
& event
);
49 wxDocManager
*m_docManager
;
52 DECLARE_CLASS(wxDocMDIParentFrame
)
54 wxDECLARE_NO_COPY_CLASS(wxDocMDIParentFrame
);
57 // ----------------------------------------------------------------------------
58 // An MDI document child frame: we need to define it as a class just for wxRTTI,
59 // otherwise we could simply typedef it
60 // ----------------------------------------------------------------------------
63 // "non dll-interface class 'wxDocChildFrameAny<>' used as base interface
64 // for dll-interface class 'wxDocMDIChildFrame'" -- this is bogus as the
65 // template will be DLL-exported but only once it is used as base class
67 #pragma warning (disable:4275)
71 wxDocChildFrameAny
<wxMDIChildFrame
, wxMDIParentFrame
> wxDocMDIChildFrameBase
;
73 class WXDLLIMPEXP_CORE wxDocMDIChildFrame
: public wxDocMDIChildFrameBase
76 wxDocMDIChildFrame(wxDocument
*doc
,
78 wxMDIParentFrame
*parent
,
80 const wxString
& title
,
81 const wxPoint
& pos
= wxDefaultPosition
,
82 const wxSize
& size
= wxDefaultSize
,
83 long style
= wxDEFAULT_FRAME_STYLE
,
84 const wxString
& name
= wxFrameNameStr
)
85 : wxDocMDIChildFrameBase(doc
, view
,
86 parent
, id
, title
, pos
, size
, style
, name
)
91 DECLARE_CLASS(wxDocMDIChildFrame
)
92 wxDECLARE_NO_COPY_CLASS(wxDocMDIChildFrame
);
96 #pragma warning (default:4275)
99 #endif // wxUSE_MDI_ARCHITECTURE
101 #endif // _WX_DOCMDI_H_