]> git.saurik.com Git - wxWidgets.git/blob - interface/docmdi.h
remove wxTextAttr::CreateFont(); return wxNullFont from GetFont() if we have no font...
[wxWidgets.git] / interface / docmdi.h
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}
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 @seealso
26 @ref overview_docviewoverview, wxMDIParentFrame
27 */
28 class wxDocMDIParentFrame : public wxMDIParentFrame
29 {
30 public:
31 //@{
32 /**
33 Constructor.
34 */
35 wxDocMDIParentFrame();
36 wxDocMDIParentFrame(wxDocManager* manager, wxFrame* parent,
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");
43 //@}
44
45 /**
46 Destructor.
47 */
48 ~wxDocMDIParentFrame();
49
50 /**
51 Creates the window.
52 */
53 bool Create(wxDocManager* manager, wxFrame* parent,
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.
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}
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 @seealso
87 @ref overview_docviewoverview, wxMDIChildFrame
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 */
134 void SetDocument(wxDocument* doc);
135
136 /**
137 Sets the view for this frame.
138 */
139 void SetView(wxView* view);
140
141 /**
142 wxDocument* m_childDocument
143 The document associated with the frame.
144 */
145
146
147 /**
148 wxView* m_childView
149 The view associated with the frame.
150 */
151 };