]> git.saurik.com Git - wxWidgets.git/blame - interface/docmdi.h
remove unused wxAppTraits-related files
[wxWidgets.git] / interface / docmdi.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: docmdi.h
e54c96f1 3// Purpose: interface of wxDocMDIParentFrame
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxDocMDIParentFrame
11 @wxheader{docmdi.h}
7c913512 12
23324ae1
FM
13 The wxDocMDIParentFrame class provides a default top-level frame for
14 applications using the document/view framework. This class can only be used for
15 MDI parent frames.
7c913512 16
23324ae1 17 It cooperates with the wxView, wxDocument,
e54c96f1 18 wxDocManager and wxDocTemplates() classes.
7c913512 19
23324ae1 20 See the example application in @c samples/docview.
7c913512 21
23324ae1
FM
22 @library{wxcore}
23 @category{FIXME}
7c913512 24
e54c96f1 25 @see @ref overview_docviewoverview, wxMDIParentFrame
23324ae1
FM
26*/
27class wxDocMDIParentFrame : public wxMDIParentFrame
28{
29public:
30 //@{
31 /**
32 Constructor.
33 */
34 wxDocMDIParentFrame();
4cc4bfaf 35 wxDocMDIParentFrame(wxDocManager* manager, wxFrame* parent,
7c913512
FM
36 wxWindowID id,
37 const wxString& title,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = wxDEFAULT_FRAME_STYLE,
41 const wxString& name = "frame");
23324ae1
FM
42 //@}
43
44 /**
45 Destructor.
46 */
47 ~wxDocMDIParentFrame();
48
49 /**
50 Creates the window.
51 */
4cc4bfaf 52 bool Create(wxDocManager* manager, wxFrame* parent,
23324ae1
FM
53 wxWindowID id, const wxString& title,
54 const wxPoint& pos = wxDefaultPosition,
55 const wxSize& size = wxDefaultSize,
56 long style = wxDEFAULT_FRAME_STYLE,
57 const wxString& name = "frame");
58
59 /**
60 Deletes all views and documents. If no user input cancelled the
61 operation, the frame will be destroyed and the application will exit.
23324ae1
FM
62 Since understanding how document/view clean-up takes place can be difficult,
63 the implementation of this function is shown below.
64 */
65 void OnCloseWindow(wxCloseEvent& event);
66};
67
68
e54c96f1 69
23324ae1
FM
70/**
71 @class wxDocMDIChildFrame
72 @wxheader{docmdi.h}
7c913512 73
23324ae1
FM
74 The wxDocMDIChildFrame class provides a default frame for displaying documents
75 on separate windows. This class can only be used for MDI child frames.
7c913512 76
23324ae1
FM
77 The class is part of the document/view framework supported by wxWidgets,
78 and cooperates with the wxView, wxDocument,
79 wxDocManager and wxDocTemplate classes.
7c913512 80
23324ae1 81 See the example application in @c samples/docview.
7c913512 82
23324ae1
FM
83 @library{wxcore}
84 @category{FIXME}
7c913512 85
e54c96f1 86 @see @ref overview_docviewoverview, wxMDIChildFrame
23324ae1
FM
87*/
88class wxDocMDIChildFrame : public wxMDIChildFrame
89{
90public:
91 /**
92 Constructor.
93 */
94 wxDocMDIChildFrame(wxDocument* doc, wxView* view,
95 wxFrame* parent,
96 wxWindowID id,
97 const wxString& title,
98 const wxPoint& pos = wxDefaultPosition,
99 const wxSize& size = wxDefaultSize,
100 long style = wxDEFAULT_FRAME_STYLE,
101 const wxString& name = "frame");
102
103 /**
104 Destructor.
105 */
106 ~wxDocMDIChildFrame();
107
108 /**
109 Returns the document associated with this frame.
110 */
328f5751 111 wxDocument* GetDocument() const;
23324ae1
FM
112
113 /**
114 Returns the view associated with this frame.
115 */
328f5751 116 wxView* GetView() const;
23324ae1
FM
117
118 /**
119 Sets the currently active view to be the frame's view. You may need
120 to override (but still call) this function in order to set the keyboard
121 focus for your subwindow.
122 */
123 void OnActivate(wxActivateEvent event);
124
125 /**
126 Closes and deletes the current view and document.
127 */
128 void OnCloseWindow(wxCloseEvent& event);
129
130 /**
131 Sets the document for this frame.
132 */
4cc4bfaf 133 void SetDocument(wxDocument* doc);
23324ae1
FM
134
135 /**
136 Sets the view for this frame.
137 */
4cc4bfaf 138 void SetView(wxView* view);
23324ae1
FM
139
140 /**
141 wxDocument* m_childDocument
23324ae1
FM
142 The document associated with the frame.
143 */
144
145
146 /**
147 wxView* m_childView
23324ae1
FM
148 The view associated with the frame.
149 */
150};
e54c96f1 151