]>
git.saurik.com Git - wxWidgets.git/blob - interface/docmdi.h
8f253a15bbf3efda1851915902acb5987803363f
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 "Document/view overview", 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.
64 Since understanding how document/view clean-up takes place can be difficult,
65 the implementation of this function is shown below.
67 void OnCloseWindow(wxCloseEvent
& event
);
72 @class wxDocMDIChildFrame
75 The wxDocMDIChildFrame class provides a default frame for displaying documents
76 on separate windows. This class can only be used for MDI child frames.
78 The class is part of the document/view framework supported by wxWidgets,
79 and cooperates with the wxView, wxDocument,
80 wxDocManager and wxDocTemplate classes.
82 See the example application in @c samples/docview.
88 @ref overview_docviewoverview "Document/view overview", wxMDIChildFrame
90 class wxDocMDIChildFrame
: public wxMDIChildFrame
96 wxDocMDIChildFrame(wxDocument
* doc
, wxView
* view
,
99 const wxString
& title
,
100 const wxPoint
& pos
= wxDefaultPosition
,
101 const wxSize
& size
= wxDefaultSize
,
102 long style
= wxDEFAULT_FRAME_STYLE
,
103 const wxString
& name
= "frame");
108 ~wxDocMDIChildFrame();
111 Returns the document associated with this frame.
113 wxDocument
* GetDocument();
116 Returns the view associated with this frame.
121 Sets the currently active view to be the frame's view. You may need
122 to override (but still call) this function in order to set the keyboard
123 focus for your subwindow.
125 void OnActivate(wxActivateEvent event
);
128 Closes and deletes the current view and document.
130 void OnCloseWindow(wxCloseEvent
& event
);
133 Sets the document for this frame.
135 void SetDocument(wxDocument
* doc
);
138 Sets the view for this frame.
140 void SetView(wxView
* view
);
143 wxDocument* m_childDocument
145 The document associated with the frame.
152 The view associated with the frame.