1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Frame classes for MDI document/view applications
4 // Author: Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "docmdi.h"
19 #include "wx/docview.h"
23 * Use this instead of wxMDIParentFrame
26 class wxDocMDIParentFrame
: public wxMDIParentFrame
28 DECLARE_CLASS(wxDocMDIParentFrame
)
30 wxDocMDIParentFrame(wxDocManager
*manager
, wxFrame
*frame
, wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
,
31 long style
, const wxString
& name
);
34 // Extend event processing to search the document manager's event table
35 virtual bool ProcessEvent(wxEvent
& event
);
37 wxDocManager
*GetDocumentManager(void) const { return m_docManager
; }
39 void OnExit(wxCommandEvent
& event
);
40 void OnMRUFile(wxCommandEvent
& event
);
43 wxDocManager
*m_docManager
;
50 * Use this instead of wxMDIChildFrame
53 class WXDLLEXPORT wxDocMDIChildFrame
: public wxMDIChildFrame
55 DECLARE_CLASS(wxDocMDIChildFrame
)
58 wxDocMDIChildFrame(wxDocument
*doc
, wxView
*view
, wxMDIParentFrame
*frame
, wxWindowID id
, const wxString
& title
,
59 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
60 long type
= wxDEFAULT_FRAME_STYLE
, const wxString
& name
= "frame");
61 ~wxDocMDIChildFrame(void);
64 // Extend event processing to search the view's event table
65 virtual bool ProcessEvent(wxEvent
& event
);
67 void OnActivate(wxActivateEvent
& event
);
69 inline wxDocument
*GetDocument(void) const { return m_childDocument
; }
70 inline wxView
*GetView(void) const { return m_childView
; }
71 inline void SetDocument(wxDocument
*doc
) { m_childDocument
= doc
; }
72 inline void SetView(wxView
*view
) { m_childView
= view
; }
74 wxDocument
* m_childDocument
;