]> git.saurik.com Git - wxWidgets.git/blame - include/wx/docmdi.h
added the static function GetLabelText() to wxStaticText which was mentioned in the...
[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
b597caac 26class WXDLLEXPORT 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,
32 const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
2108f33a 33
f0003d29
JS
34 bool Create(wxDocManager *manager, wxFrame *parent, wxWindowID id,
35 const wxString& title, const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
37
2b5f62a0
VZ
38 // Extend event processing to search the document manager's event table
39 virtual bool ProcessEvent(wxEvent& event);
2108f33a 40
2b5f62a0 41 wxDocManager *GetDocumentManager(void) const { return m_docManager; }
2108f33a 42
2b5f62a0
VZ
43 void OnExit(wxCommandEvent& event);
44 void OnMRUFile(wxCommandEvent& event);
45 void OnCloseWindow(wxCloseEvent& event);
2108f33a 46
2b5f62a0 47protected:
f0003d29 48 void Init();
2b5f62a0 49 wxDocManager *m_docManager;
2108f33a 50
2b5f62a0
VZ
51private:
52 DECLARE_CLASS(wxDocMDIParentFrame)
53 DECLARE_EVENT_TABLE()
22f3361e 54 DECLARE_NO_COPY_CLASS(wxDocMDIParentFrame)
2108f33a
JS
55};
56
57/*
58 * Use this instead of wxMDIChildFrame
59 */
60
61class WXDLLEXPORT wxDocMDIChildFrame: public wxMDIChildFrame
62{
2b5f62a0 63public:
75799719 64 wxDocMDIChildFrame();
2b5f62a0
VZ
65 wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id,
66 const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
67 long type = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
d3c7fc99 68 virtual ~wxDocMDIChildFrame();
2b5f62a0 69
75799719
VZ
70 bool Create(wxDocument *doc,
71 wxView *view,
72 wxMDIParentFrame *frame,
73 wxWindowID id,
74 const wxString& title,
75 const wxPoint& pos = wxDefaultPosition,
76 const wxSize& size = wxDefaultSize,
77 long type = wxDEFAULT_FRAME_STYLE,
78 const wxString& name = wxFrameNameStr);
79
2b5f62a0
VZ
80 // Extend event processing to search the view's event table
81 virtual bool ProcessEvent(wxEvent& event);
82
83 void OnActivate(wxActivateEvent& event);
84 void OnCloseWindow(wxCloseEvent& event);
85
86 inline wxDocument *GetDocument() const { return m_childDocument; }
87 inline wxView *GetView(void) const { return m_childView; }
88 inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
89 inline void SetView(wxView *view) { m_childView = view; }
90 bool Destroy() { m_childView = (wxView *)NULL; return wxMDIChildFrame::Destroy(); }
68379eaf 91
2b5f62a0 92protected:
75799719 93 void Init();
2b5f62a0
VZ
94 wxDocument* m_childDocument;
95 wxView* m_childView;
96
97private:
98 DECLARE_EVENT_TABLE()
99 DECLARE_CLASS(wxDocMDIChildFrame)
22f3361e 100 DECLARE_NO_COPY_CLASS(wxDocMDIChildFrame)
2108f33a
JS
101};
102
2df7be7f
RR
103#endif
104 // wxUSE_MDI_ARCHITECTURE
76784eec 105
2108f33a
JS
106#endif
107 // _WX_DOCMDI_H_