]> git.saurik.com Git - wxWidgets.git/blame - include/wx/docmdi.h
Avoid setting attributes in GTK wxDataViewRenderer if not supported.
[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$
99d80019 8// Copyright: (c) Julian Smart
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
22/*
23 * Use this instead of wxMDIParentFrame
24 */
25
53a2db12 26class WXDLLIMPEXP_CORE wxDocMDIParentFrame: public wxMDIParentFrame
2108f33a 27{
2b5f62a0 28public:
f0003d29 29 wxDocMDIParentFrame();
2b5f62a0
VZ
30 wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
31 const wxString& title, const wxPoint& pos = wxDefaultPosition,
3366d55c 32 const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr);
2108f33a 33
f0003d29
JS
34 bool Create(wxDocManager *manager, wxFrame *parent, wxWindowID id,
35 const wxString& title, const wxPoint& pos = wxDefaultPosition,
3366d55c 36 const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr);
f0003d29 37
2b5f62a0 38 wxDocManager *GetDocumentManager(void) const { return m_docManager; }
2108f33a 39
2b5f62a0
VZ
40 void OnExit(wxCommandEvent& event);
41 void OnMRUFile(wxCommandEvent& event);
42 void OnCloseWindow(wxCloseEvent& event);
2108f33a 43
2b5f62a0 44protected:
f0003d29 45 void Init();
bba5e72a 46
8cc208e3 47 virtual bool TryBefore(wxEvent& event);
bba5e72a 48
2b5f62a0 49 wxDocManager *m_docManager;
2108f33a 50
2b5f62a0
VZ
51private:
52 DECLARE_CLASS(wxDocMDIParentFrame)
53 DECLARE_EVENT_TABLE()
c0c133e1 54 wxDECLARE_NO_COPY_CLASS(wxDocMDIParentFrame);
2108f33a
JS
55};
56
a9e2e6e5
VZ
57// ----------------------------------------------------------------------------
58// An MDI document child frame: we need to define it as a class just for wxRTTI,
59// otherwise we could simply typedef it
60// ----------------------------------------------------------------------------
2108f33a 61
27d77a59
VZ
62#ifdef __VISUALC6__
63 // "non dll-interface class 'wxDocChildFrameAny<>' used as base interface
64 // for dll-interface class 'wxDocMDIChildFrame'" -- this is bogus as the
65 // template will be DLL-exported but only once it is used as base class
66 // here!
fb330c2e 67 #pragma warning (push)
27d77a59
VZ
68 #pragma warning (disable:4275)
69#endif
70
a9e2e6e5
VZ
71typedef
72 wxDocChildFrameAny<wxMDIChildFrame, wxMDIParentFrame> wxDocMDIChildFrameBase;
73
74class WXDLLIMPEXP_CORE wxDocMDIChildFrame : public wxDocMDIChildFrameBase
2108f33a 75{
2b5f62a0 76public:
a9e2e6e5
VZ
77 wxDocMDIChildFrame(wxDocument *doc,
78 wxView *view,
79 wxMDIParentFrame *parent,
80 wxWindowID id,
81 const wxString& title,
82 const wxPoint& pos = wxDefaultPosition,
83 const wxSize& size = wxDefaultSize,
84 long style = wxDEFAULT_FRAME_STYLE,
85 const wxString& name = wxFrameNameStr)
86 : wxDocMDIChildFrameBase(doc, view,
87 parent, id, title, pos, size, style, name)
88 {
89 }
2b5f62a0
VZ
90
91private:
2b5f62a0 92 DECLARE_CLASS(wxDocMDIChildFrame)
c0c133e1 93 wxDECLARE_NO_COPY_CLASS(wxDocMDIChildFrame);
2108f33a
JS
94};
95
27d77a59 96#ifdef __VISUALC6__
fb330c2e 97 #pragma warning (pop)
27d77a59 98#endif
a9e2e6e5
VZ
99
100#endif // wxUSE_MDI_ARCHITECTURE
76784eec 101
a9e2e6e5 102#endif // _WX_DOCMDI_H_