]> git.saurik.com Git - wxWidgets.git/blob - interface/docmdi.h
Added the function and macro group pages for Doxygen.
[wxWidgets.git] / interface / docmdi.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: docmdi.h
3 // Purpose: interface of wxDocMDIParentFrame
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxDocMDIParentFrame
11 @wxheader{docmdi.h}
12
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.
16
17 It cooperates with the wxView, wxDocument,
18 wxDocManager and wxDocTemplates() classes.
19
20 See the example application in @c samples/docview.
21
22 @library{wxcore}
23 @category{FIXME}
24
25 @see @ref overview_docviewoverview, wxMDIParentFrame
26 */
27 class wxDocMDIParentFrame : public wxMDIParentFrame
28 {
29 public:
30 //@{
31 /**
32 Constructor.
33 */
34 wxDocMDIParentFrame();
35 wxDocMDIParentFrame(wxDocManager* manager, wxFrame* parent,
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");
42 //@}
43
44 /**
45 Destructor.
46 */
47 ~wxDocMDIParentFrame();
48
49 /**
50 Creates the window.
51 */
52 bool Create(wxDocManager* manager, wxFrame* parent,
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.
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
69
70 /**
71 @class wxDocMDIChildFrame
72 @wxheader{docmdi.h}
73
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.
76
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.
80
81 See the example application in @c samples/docview.
82
83 @library{wxcore}
84 @category{FIXME}
85
86 @see @ref overview_docviewoverview, wxMDIChildFrame
87 */
88 class wxDocMDIChildFrame : public wxMDIChildFrame
89 {
90 public:
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 */
111 wxDocument* GetDocument() const;
112
113 /**
114 Returns the view associated with this frame.
115 */
116 wxView* GetView() const;
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 */
133 void SetDocument(wxDocument* doc);
134
135 /**
136 Sets the view for this frame.
137 */
138 void SetView(wxView* view);
139
140 /**
141 wxDocument* m_childDocument
142 The document associated with the frame.
143 */
144
145
146 /**
147 wxView* m_childView
148 The view associated with the frame.
149 */
150 };
151