]> git.saurik.com Git - wxWidgets.git/blame - include/wx/docmdi.h
xti streaming
[wxWidgets.git] / include / wx / docmdi.h
CommitLineData
2108f33a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: docmdi.h
3// Purpose: Frame classes for MDI document/view applications
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c)
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DOCMDI_H_
13#define _WX_DOCMDI_H_
14
af49c4b8 15#if defined(__GNUG__) && !defined(__APPLE__)
2108f33a
JS
16#pragma interface "docmdi.h"
17#endif
18
2df7be7f
RR
19#include "wx/defs.h"
20
e30285ab 21#if wxUSE_MDI_ARCHITECTURE
2df7be7f 22
2108f33a
JS
23#include "wx/docview.h"
24#include "wx/mdi.h"
25
26/*
27 * Use this instead of wxMDIParentFrame
28 */
29
b597caac 30class WXDLLEXPORT wxDocMDIParentFrame: public wxMDIParentFrame
2108f33a 31{
2b5f62a0
VZ
32public:
33 wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
34 const wxString& title, const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
2108f33a 36
2b5f62a0
VZ
37 // Extend event processing to search the document manager's event table
38 virtual bool ProcessEvent(wxEvent& event);
2108f33a 39
2b5f62a0 40 wxDocManager *GetDocumentManager(void) const { return m_docManager; }
2108f33a 41
2b5f62a0
VZ
42 void OnExit(wxCommandEvent& event);
43 void OnMRUFile(wxCommandEvent& event);
44 void OnCloseWindow(wxCloseEvent& event);
2108f33a 45
2b5f62a0
VZ
46protected:
47 wxDocManager *m_docManager;
2108f33a 48
2b5f62a0
VZ
49private:
50 DECLARE_CLASS(wxDocMDIParentFrame)
51 DECLARE_EVENT_TABLE()
22f3361e 52 DECLARE_NO_COPY_CLASS(wxDocMDIParentFrame)
2108f33a
JS
53};
54
55/*
56 * Use this instead of wxMDIChildFrame
57 */
58
59class WXDLLEXPORT wxDocMDIChildFrame: public wxMDIChildFrame
60{
2b5f62a0 61public:
75799719 62 wxDocMDIChildFrame();
2b5f62a0
VZ
63 wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id,
64 const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
65 long type = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
66 ~wxDocMDIChildFrame();
67
75799719
VZ
68 bool Create(wxDocument *doc,
69 wxView *view,
70 wxMDIParentFrame *frame,
71 wxWindowID id,
72 const wxString& title,
73 const wxPoint& pos = wxDefaultPosition,
74 const wxSize& size = wxDefaultSize,
75 long type = wxDEFAULT_FRAME_STYLE,
76 const wxString& name = wxFrameNameStr);
77
2b5f62a0
VZ
78 // Extend event processing to search the view's event table
79 virtual bool ProcessEvent(wxEvent& event);
80
81 void OnActivate(wxActivateEvent& event);
82 void OnCloseWindow(wxCloseEvent& event);
83
84 inline wxDocument *GetDocument() const { return m_childDocument; }
85 inline wxView *GetView(void) const { return m_childView; }
86 inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
87 inline void SetView(wxView *view) { m_childView = view; }
88 bool Destroy() { m_childView = (wxView *)NULL; return wxMDIChildFrame::Destroy(); }
89
90protected:
75799719 91 void Init();
2b5f62a0
VZ
92 wxDocument* m_childDocument;
93 wxView* m_childView;
94
95private:
96 DECLARE_EVENT_TABLE()
97 DECLARE_CLASS(wxDocMDIChildFrame)
22f3361e 98 DECLARE_NO_COPY_CLASS(wxDocMDIChildFrame)
2108f33a
JS
99};
100
2df7be7f
RR
101#endif
102 // wxUSE_MDI_ARCHITECTURE
76784eec 103
2108f33a
JS
104#endif
105 // _WX_DOCMDI_H_