]>
Commit | Line | Data |
---|---|---|
2108f33a | 1 | ///////////////////////////////////////////////////////////////////////////// |
c48bdb0c | 2 | // Name: wx/docmdi.h |
2108f33a JS |
3 | // Purpose: Frame classes for MDI document/view applications |
4 | // Author: Julian Smart | |
2108f33a JS |
5 | // Created: 01/02/97 |
6 | // RCS-ID: $Id$ | |
c48bdb0c VZ |
7 | // Copyright: (c) 1997 Julian Smart |
8 | // (c) 2010 Vadim Zeitlin | |
68379eaf | 9 | // Licence: wxWindows licence |
2108f33a JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_DOCMDI_H_ | |
13 | #define _WX_DOCMDI_H_ | |
14 | ||
2df7be7f RR |
15 | #include "wx/defs.h" |
16 | ||
e30285ab | 17 | #if wxUSE_MDI_ARCHITECTURE |
2df7be7f | 18 | |
2108f33a JS |
19 | #include "wx/docview.h" |
20 | #include "wx/mdi.h" | |
21 | ||
c48bdb0c VZ |
22 | #ifdef __VISUALC6__ |
23 | // "non dll-interface class 'wxDocXXXFrameAny<>' used as base interface for | |
24 | // dll-interface class 'wxDocMDIXXXFrame'" -- this is bogus as the template | |
25 | // will be DLL-exported but only once it is used as base class here! | |
26 | #pragma warning (push) | |
27 | #pragma warning (disable:4275) | |
28 | #endif | |
2108f33a | 29 | |
c48bdb0c VZ |
30 | // Define MDI versions of the doc-view frame classes. Note that we need to |
31 | // define them as classes for wxRTTI, otherwise we could simply define them as | |
32 | // typedefs. | |
2108f33a | 33 | |
c48bdb0c VZ |
34 | // ---------------------------------------------------------------------------- |
35 | // An MDI document parent frame | |
36 | // ---------------------------------------------------------------------------- | |
bba5e72a | 37 | |
c48bdb0c VZ |
38 | typedef |
39 | wxDocParentFrameAny<wxMDIParentFrame> wxDocMDIParentFrameBase; | |
bba5e72a | 40 | |
c48bdb0c VZ |
41 | class WXDLLIMPEXP_CORE wxDocMDIParentFrame : public wxDocMDIParentFrameBase |
42 | { | |
43 | public: | |
44 | wxDocMDIParentFrame() : wxDocMDIParentFrameBase() { } | |
45 | ||
46 | wxDocMDIParentFrame(wxDocManager *manager, | |
47 | wxFrame *parent, | |
48 | wxWindowID id, | |
49 | const wxString& title, | |
50 | const wxPoint& pos = wxDefaultPosition, | |
51 | const wxSize& size = wxDefaultSize, | |
52 | long style = wxDEFAULT_FRAME_STYLE, | |
53 | const wxString& name = wxFrameNameStr) | |
54 | : wxDocMDIParentFrameBase(manager, | |
55 | parent, id, title, pos, size, style, name) | |
56 | { | |
57 | } | |
2108f33a | 58 | |
2b5f62a0 VZ |
59 | private: |
60 | DECLARE_CLASS(wxDocMDIParentFrame) | |
c0c133e1 | 61 | wxDECLARE_NO_COPY_CLASS(wxDocMDIParentFrame); |
2108f33a JS |
62 | }; |
63 | ||
a9e2e6e5 | 64 | // ---------------------------------------------------------------------------- |
c48bdb0c | 65 | // An MDI document child frame |
a9e2e6e5 | 66 | // ---------------------------------------------------------------------------- |
2108f33a | 67 | |
a9e2e6e5 VZ |
68 | typedef |
69 | wxDocChildFrameAny<wxMDIChildFrame, wxMDIParentFrame> wxDocMDIChildFrameBase; | |
70 | ||
71 | class WXDLLIMPEXP_CORE wxDocMDIChildFrame : public wxDocMDIChildFrameBase | |
2108f33a | 72 | { |
2b5f62a0 | 73 | public: |
c48bdb0c VZ |
74 | wxDocMDIChildFrame() { } |
75 | ||
a9e2e6e5 VZ |
76 | wxDocMDIChildFrame(wxDocument *doc, |
77 | wxView *view, | |
78 | wxMDIParentFrame *parent, | |
79 | wxWindowID id, | |
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) | |
87 | { | |
88 | } | |
2b5f62a0 VZ |
89 | |
90 | private: | |
2b5f62a0 | 91 | DECLARE_CLASS(wxDocMDIChildFrame) |
c0c133e1 | 92 | wxDECLARE_NO_COPY_CLASS(wxDocMDIChildFrame); |
2108f33a JS |
93 | }; |
94 | ||
27d77a59 | 95 | #ifdef __VISUALC6__ |
fb330c2e | 96 | #pragma warning (pop) |
27d77a59 | 97 | #endif |
a9e2e6e5 VZ |
98 | |
99 | #endif // wxUSE_MDI_ARCHITECTURE | |
76784eec | 100 | |
a9e2e6e5 | 101 | #endif // _WX_DOCMDI_H_ |