]>
git.saurik.com Git - wxWidgets.git/blob - interface/docmdi.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxDocMDIParentFrame
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.
25 @see @ref overview_docviewoverview, wxMDIParentFrame
27 class wxDocMDIParentFrame
: public wxMDIParentFrame
34 wxDocMDIParentFrame();
35 wxDocMDIParentFrame(wxDocManager
* manager
, wxFrame
* parent
,
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");
47 ~wxDocMDIParentFrame();
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");
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.
65 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.
86 @see @ref overview_docviewoverview, wxMDIChildFrame
88 class wxDocMDIChildFrame
: public wxMDIChildFrame
94 wxDocMDIChildFrame(wxDocument
* doc
, wxView
* view
,
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");
106 ~wxDocMDIChildFrame();
109 Returns the document associated with this frame.
111 wxDocument
* GetDocument() const;
114 Returns the view associated with this frame.
116 wxView
* GetView() const;
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.
123 void OnActivate(wxActivateEvent event
);
126 Closes and deletes the current view and document.
128 void OnCloseWindow(wxCloseEvent
& event
);
131 Sets the document for this frame.
133 void SetDocument(wxDocument
* doc
);
136 Sets the view for this frame.
138 void SetView(wxView
* view
);
141 wxDocument* m_childDocument
142 The document associated with the frame.
148 The view associated with the frame.