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