]>
git.saurik.com Git - wxWidgets.git/blob - interface/docmdi.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxDocMDIParentFrame class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxDocMDIParentFrame
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
17 It cooperates with the wxView, wxDocument,
18 wxDocManager and wxDocTemplates classes.
20 See the example application in @c samples/docview.
26 @ref overview_docviewoverview, wxMDIParentFrame
28 class wxDocMDIParentFrame
: public wxMDIParentFrame
35 wxDocMDIParentFrame();
36 wxDocMDIParentFrame(wxDocManager
* manager
, wxFrame
* parent
,
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");
48 ~wxDocMDIParentFrame();
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");
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.
66 void OnCloseWindow(wxCloseEvent
& event
);
71 @class wxDocMDIChildFrame
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.
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.
81 See the example application in @c samples/docview.
87 @ref overview_docviewoverview, wxMDIChildFrame
89 class wxDocMDIChildFrame
: public wxMDIChildFrame
95 wxDocMDIChildFrame(wxDocument
* doc
, wxView
* view
,
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");
107 ~wxDocMDIChildFrame();
110 Returns the document associated with this frame.
112 wxDocument
* GetDocument();
115 Returns the view associated with this frame.
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.
124 void OnActivate(wxActivateEvent event
);
127 Closes and deletes the current view and document.
129 void OnCloseWindow(wxCloseEvent
& event
);
132 Sets the document for this frame.
134 void SetDocument(wxDocument
* doc
);
137 Sets the view for this frame.
139 void SetView(wxView
* view
);
142 wxDocument* m_childDocument
143 The document associated with the frame.
149 The view associated with the frame.