]> git.saurik.com Git - wxWidgets.git/blame - include/wx/docmdi.h
Small cursor improvements
[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$
8// Copyright: (c)
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DOCMDI_H_
13#define _WX_DOCMDI_H_
14
15#ifdef __GNUG__
16#pragma interface "docmdi.h"
17#endif
18
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
JS
27{
28 DECLARE_CLASS(wxDocMDIParentFrame)
29 public:
f449ef69
JS
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 = "frame");
2108f33a 33
2108f33a
JS
34 // Extend event processing to search the document manager's event table
35 virtual bool ProcessEvent(wxEvent& event);
36
37 wxDocManager *GetDocumentManager(void) const { return m_docManager; }
38
39 void OnExit(wxCommandEvent& event);
40 void OnMRUFile(wxCommandEvent& event);
387a3b02 41 void OnCloseWindow(wxCloseEvent& event);
2108f33a
JS
42
43 protected:
44 wxDocManager *m_docManager;
45
46
47DECLARE_EVENT_TABLE()
48};
49
50/*
51 * Use this instead of wxMDIChildFrame
52 */
53
54class WXDLLEXPORT wxDocMDIChildFrame: public wxMDIChildFrame
55{
56 DECLARE_CLASS(wxDocMDIChildFrame)
57
58 public:
f449ef69
JS
59 wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id,
60 const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
2108f33a
JS
61 long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
62 ~wxDocMDIChildFrame(void);
63
2108f33a
JS
64 // Extend event processing to search the view's event table
65 virtual bool ProcessEvent(wxEvent& event);
66
67 void OnActivate(wxActivateEvent& event);
387a3b02 68 void OnCloseWindow(wxCloseEvent& event);
2108f33a
JS
69
70 inline wxDocument *GetDocument(void) const { return m_childDocument; }
71 inline wxView *GetView(void) const { return m_childView; }
72 inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
73 inline void SetView(wxView *view) { m_childView = view; }
74 protected:
75 wxDocument* m_childDocument;
76 wxView* m_childView;
77
78DECLARE_EVENT_TABLE()
79
80};
81
82#endif
83 // _WX_DOCMDI_H_