]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: docmdi.h | |
3 | // Purpose: documentation for wxDocMDIParentFrame class | |
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 FM |
17 | It cooperates with the wxView, wxDocument, |
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 | |
23324ae1 | 25 | @seealso |
4cc4bfaf | 26 | @ref overview_docviewoverview, wxMDIParentFrame |
23324ae1 FM |
27 | */ |
28 | class wxDocMDIParentFrame : public wxMDIParentFrame | |
29 | { | |
30 | public: | |
31 | //@{ | |
32 | /** | |
33 | Constructor. | |
34 | */ | |
35 | wxDocMDIParentFrame(); | |
4cc4bfaf | 36 | wxDocMDIParentFrame(wxDocManager* manager, wxFrame* parent, |
7c913512 FM |
37 | wxWindowID id, |
38 | const wxString& title, | |
39 | const wxPoint& pos = wxDefaultPosition, | |
40 | const wxSize& size = wxDefaultSize, | |
41 | long style = wxDEFAULT_FRAME_STYLE, | |
42 | const wxString& name = "frame"); | |
23324ae1 FM |
43 | //@} |
44 | ||
45 | /** | |
46 | Destructor. | |
47 | */ | |
48 | ~wxDocMDIParentFrame(); | |
49 | ||
50 | /** | |
51 | Creates the window. | |
52 | */ | |
4cc4bfaf | 53 | bool Create(wxDocManager* manager, wxFrame* parent, |
23324ae1 FM |
54 | wxWindowID id, const wxString& title, |
55 | const wxPoint& pos = wxDefaultPosition, | |
56 | const wxSize& size = wxDefaultSize, | |
57 | long style = wxDEFAULT_FRAME_STYLE, | |
58 | const wxString& name = "frame"); | |
59 | ||
60 | /** | |
61 | Deletes all views and documents. If no user input cancelled the | |
62 | operation, the frame will be destroyed and the application will exit. | |
23324ae1 FM |
63 | Since understanding how document/view clean-up takes place can be difficult, |
64 | the implementation of this function is shown below. | |
65 | */ | |
66 | void OnCloseWindow(wxCloseEvent& event); | |
67 | }; | |
68 | ||
69 | ||
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 | |
23324ae1 | 86 | @seealso |
4cc4bfaf | 87 | @ref overview_docviewoverview, wxMDIChildFrame |
23324ae1 FM |
88 | */ |
89 | class wxDocMDIChildFrame : public wxMDIChildFrame | |
90 | { | |
91 | public: | |
92 | /** | |
93 | Constructor. | |
94 | */ | |
95 | wxDocMDIChildFrame(wxDocument* doc, wxView* view, | |
96 | wxFrame* parent, | |
97 | wxWindowID id, | |
98 | const wxString& title, | |
99 | const wxPoint& pos = wxDefaultPosition, | |
100 | const wxSize& size = wxDefaultSize, | |
101 | long style = wxDEFAULT_FRAME_STYLE, | |
102 | const wxString& name = "frame"); | |
103 | ||
104 | /** | |
105 | Destructor. | |
106 | */ | |
107 | ~wxDocMDIChildFrame(); | |
108 | ||
109 | /** | |
110 | Returns the document associated with this frame. | |
111 | */ | |
112 | wxDocument* GetDocument(); | |
113 | ||
114 | /** | |
115 | Returns the view associated with this frame. | |
116 | */ | |
117 | wxView* GetView(); | |
118 | ||
119 | /** | |
120 | Sets the currently active view to be the frame's view. You may need | |
121 | to override (but still call) this function in order to set the keyboard | |
122 | focus for your subwindow. | |
123 | */ | |
124 | void OnActivate(wxActivateEvent event); | |
125 | ||
126 | /** | |
127 | Closes and deletes the current view and document. | |
128 | */ | |
129 | void OnCloseWindow(wxCloseEvent& event); | |
130 | ||
131 | /** | |
132 | Sets the document for this frame. | |
133 | */ | |
4cc4bfaf | 134 | void SetDocument(wxDocument* doc); |
23324ae1 FM |
135 | |
136 | /** | |
137 | Sets the view for this frame. | |
138 | */ | |
4cc4bfaf | 139 | void SetView(wxView* view); |
23324ae1 FM |
140 | |
141 | /** | |
142 | wxDocument* m_childDocument | |
23324ae1 FM |
143 | The document associated with the frame. |
144 | */ | |
145 | ||
146 | ||
147 | /** | |
148 | wxView* m_childView | |
23324ae1 FM |
149 | The view associated with the frame. |
150 | */ | |
151 | }; |