]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/docmdi.h
Use an enum for the colour/string conversion flags
[wxWidgets.git] / include / wx / docmdi.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/docmdi.h
3// Purpose: Frame classes for MDI document/view applications
4// Author: Julian Smart
5// Created: 01/02/97
6// RCS-ID: $Id$
7// Copyright: (c) 1997 Julian Smart
8// (c) 2010 Vadim Zeitlin
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DOCMDI_H_
13#define _WX_DOCMDI_H_
14
15#include "wx/defs.h"
16
17#if wxUSE_MDI_ARCHITECTURE
18
19#include "wx/docview.h"
20#include "wx/mdi.h"
21
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
29
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.
33
34// ----------------------------------------------------------------------------
35// An MDI document parent frame
36// ----------------------------------------------------------------------------
37
38typedef
39 wxDocParentFrameAny<wxMDIParentFrame> wxDocMDIParentFrameBase;
40
41class WXDLLIMPEXP_CORE wxDocMDIParentFrame : public wxDocMDIParentFrameBase
42{
43public:
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 }
58
59private:
60 DECLARE_CLASS(wxDocMDIParentFrame)
61 wxDECLARE_NO_COPY_CLASS(wxDocMDIParentFrame);
62};
63
64// ----------------------------------------------------------------------------
65// An MDI document child frame
66// ----------------------------------------------------------------------------
67
68typedef
69 wxDocChildFrameAny<wxMDIChildFrame, wxMDIParentFrame> wxDocMDIChildFrameBase;
70
71class WXDLLIMPEXP_CORE wxDocMDIChildFrame : public wxDocMDIChildFrameBase
72{
73public:
74 wxDocMDIChildFrame() { }
75
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 }
89
90private:
91 DECLARE_CLASS(wxDocMDIChildFrame)
92 wxDECLARE_NO_COPY_CLASS(wxDocMDIChildFrame);
93};
94
95#ifdef __VISUALC6__
96 #pragma warning (pop)
97#endif
98
99#endif // wxUSE_MDI_ARCHITECTURE
100
101#endif // _WX_DOCMDI_H_