]>
git.saurik.com Git - wxWidgets.git/blob - interface/mdi.h
67002953874c7fc7b812e4aaba24b9c3f4649aaa
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxMDIClientWindow class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxMDIClientWindow
13 An MDI client window is a child of wxMDIParentFrame, and manages zero or
14 more wxMDIChildFrame objects.
20 wxMDIChildFrame, wxMDIParentFrame, wxFrame
22 class wxMDIClientWindow
: public wxWindow
27 Constructor, creating the window.
32 The window style. Currently unused.
34 @remarks The second style of constructor is called within
35 wxMDIParentFrame::OnCreateClient.
37 @see wxMDIParentFrame::wxMDIParentFrame, wxMDIParentFrame::OnCreateClient
40 wxMDIClientWindow(wxMDIParentFrame
* parent
, long style
= 0);
49 Used in two-step frame construction. See wxMDIClientWindow()
52 bool CreateClient(wxMDIParentFrame
* parent
, long style
= 0);
57 @class wxMDIParentFrame
60 An MDI (Multiple Document Interface) parent frame is a window which can contain
61 MDI child frames in its own 'desktop'. It is a convenient way to avoid window
63 and is used in many popular Windows applications, such as Microsoft Word(TM).
67 Puts a caption on the frame.
68 @style{wxDEFAULT_FRAME_STYLE}:
69 Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME |
70 wxSYSTEM_MENU | wxCAPTION.
72 Displays a horizontal scrollbar in the client window, allowing the
73 user to view child frames that are off the current view.
75 Display the frame iconized (minimized) (Windows only).
77 Displays the frame maximized (Windows only).
78 @style{wxMAXIMIZE_BOX}:
79 Displays a maximize box on the frame (Windows and Motif only).
81 Identical to wxICONIZE.
82 @style{wxMINIMIZE_BOX}:
83 Displays a minimize box on the frame (Windows and Motif only).
84 @style{wxRESIZE_BORDER}:
85 Displays a resizeable border around the window (Motif only; for
86 Windows, it is implicit in wxTHICK_FRAME).
87 @style{wxSTAY_ON_TOP}:
88 Stay on top of other windows (Windows only).
89 @style{wxSYSTEM_MENU}:
90 Displays a system menu (Windows and Motif only).
91 @style{wxTHICK_FRAME}:
92 Displays a thick frame around the window (Windows and Motif only).
94 Displays a vertical scrollbar in the client window, allowing the
95 user to view child frames that are off the current view.
96 @style{wxFRAME_NO_WINDOW_MENU}:
97 Under Windows, removes the Window menu that is normally added
102 @category{managedwnd}
105 wxMDIChildFrame, wxMDIClientWindow, wxFrame, wxDialog
107 class wxMDIParentFrame
: public wxFrame
112 Constructor, creating the window.
115 The window parent. This should be @NULL.
117 The window identifier. It may take a value of -1 to indicate a default
120 The caption to be displayed on the frame's title bar.
122 The window position. The value wxDefaultPosition indicates a default position,
124 either the windowing system or wxWidgets, depending on platform.
126 The window size. The value wxDefaultSize indicates a default size, chosen by
127 either the windowing system or wxWidgets, depending on platform.
129 The window style. See wxMDIParentFrame.
131 The name of the window. This parameter is used to associate a name with the
133 allowing the application user to set Motif resource values for
136 @remarks During the construction of the frame, the client window will be
137 created. To use a different class from
138 wxMDIClientWindow, override
141 @see Create(), OnCreateClient()
144 wxMDIParentFrame(wxWindow
* parent
, wxWindowID id
,
145 const wxString
& title
,
146 const wxPoint
& pos
= wxDefaultPosition
,
147 const wxSize
& size
= wxDefaultSize
,
148 long style
= wxDEFAULT_FRAME_STYLE
| wxVSCROLL
| wxHSCROLL
,
149 const wxString
& name
= "frame");
153 Destructor. Destroys all child windows and menu bar if present.
158 Activates the MDI child following the currently active one.
160 @see ActivatePrevious()
165 Activates the MDI child preceding the currently active one.
169 void ActivatePrevious();
172 Arranges any iconized (minimized) MDI child windows.
174 @see Cascade(), Tile()
179 Arranges the MDI child windows in a cascade.
181 @see Tile(), ArrangeIcons()
186 Used in two-step frame construction. See wxMDIParentFrame()
189 bool Create(wxWindow
* parent
, wxWindowID id
,
190 const wxString
& title
,
191 const wxPoint
& pos
= wxDefaultPosition
,
192 const wxSize
& size
= wxDefaultSize
,
193 long style
= wxDEFAULT_FRAME_STYLE
| wxVSCROLL
| wxHSCROLL
,
194 const wxString
& name
= "frame");
197 Returns a pointer to the active MDI child, if there is one.
199 wxMDIChildFrame
* GetActiveChild() const;
202 This gets the size of the frame 'client area' in pixels.
205 Receives the client width in pixels.
207 Receives the client height in pixels.
209 @remarks The client area is the area which may be drawn on by the
210 programmer, excluding title bar, border, status bar,
211 and toolbar if present.
213 @see GetToolBar(), SetToolBar(),
216 virtual void GetClientSize(int* width
, int* height
) const;
219 Returns a pointer to the client window.
221 @see OnCreateClient()
223 wxMDIClientWindow
* GetClientWindow() const;
226 Returns the window being used as the toolbar for this frame.
230 virtual wxWindow
* GetToolBar() const;
233 Returns the current Window menu (added by wxWidgets to the menubar). This
235 is available under Windows only.
237 wxMenu
* GetWindowMenu() const;
240 Override this to return a different kind of client window. If you override this
242 you must create your parent frame in two stages, or your function will never be
244 due to the way C++ treats virtual functions called from constructors. For
247 @remarks You might wish to derive from wxMDIClientWindow in order to
248 implement different erase behaviour, for example, such
249 as painting a bitmap on the background.
251 @see GetClientWindow(), wxMDIClientWindow
253 virtual wxMDIClientWindow
* OnCreateClient();
256 Sets the window to be used as a toolbar for this
257 MDI parent window. It saves the application having to manage the positioning
258 of the toolbar MDI client window.
263 @remarks When the frame is resized, the toolbar is resized to be the
264 width of the frame client area, and the toolbar height
267 @see GetToolBar(), GetClientSize()
269 virtual void SetToolBar(wxWindow
* toolbar
);
272 Call this to change the current Window menu. Ownership of the menu object
274 the frame when you call this function.
275 This call is available under Windows only.
276 To remove the window completely, use the wxFRAME_NO_WINDOW_MENU window style.
278 void SetWindowMenu(wxMenu
* menu
);
281 Tiles the MDI child windows either horizontally or vertically depending on
282 whether @a orient is wxHORIZONTAL or wxVERTICAL.
283 Currently only implemented for MSW, does nothing under the other platforms.
285 void Tile(wxOrientation orient
= wxHORIZONTAL
);
290 @class wxMDIChildFrame
293 An MDI child frame is a frame that can only exist on a wxMDIClientWindow,
294 which is itself a child of wxMDIParentFrame.
298 Puts a caption on the frame.
299 @style{wxDEFAULT_FRAME_STYLE}:
300 Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME |
301 wxSYSTEM_MENU | wxCAPTION.
303 Display the frame iconized (minimized) (Windows only).
305 Displays the frame maximized (Windows only).
306 @style{wxMAXIMIZE_BOX}:
307 Displays a maximize box on the frame (Windows and Motif only).
309 Identical to wxICONIZE.
310 @style{wxMINIMIZE_BOX}:
311 Displays a minimize box on the frame (Windows and Motif only).
312 @style{wxRESIZE_BORDER}:
313 Displays a resizeable border around the window (Motif only; for
314 Windows, it is implicit in wxTHICK_FRAME).
315 @style{wxSTAY_ON_TOP}:
316 Stay on top of other windows (Windows only).
317 @style{wxSYSTEM_MENU}:
318 Displays a system menu (Windows and Motif only).
319 @style{wxTHICK_FRAME}:
320 Displays a thick frame around the window (Windows and Motif only).
324 @category{managedwnd}
327 wxMDIClientWindow, wxMDIParentFrame, wxFrame
329 class wxMDIChildFrame
: public wxFrame
334 Constructor, creating the window.
337 The window parent. This should not be @NULL.
339 The window identifier. It may take a value of -1 to indicate a default
342 The caption to be displayed on the frame's title bar.
344 The window position. The value wxDefaultPosition indicates a default position,
346 either the windowing system or wxWidgets, depending on platform.
348 The window size. The value wxDefaultSize indicates a default size, chosen by
349 either the windowing system or wxWidgets, depending on platform.
351 The window style. See wxMDIChildFrame.
353 The name of the window. This parameter is used to associate a name with the
355 allowing the application user to set Motif resource values for
363 wxMDIChildFrame(wxMDIParentFrame
* parent
, wxWindowID id
,
364 const wxString
& title
,
365 const wxPoint
& pos
= wxDefaultPosition
,
366 const wxSize
& size
= wxDefaultSize
,
367 long style
= wxDEFAULT_FRAME_STYLE
,
368 const wxString
& name
= "frame");
372 Destructor. Destroys all child windows and menu bar if present.
377 Activates this MDI child frame.
379 @see Maximize(), Restore()
384 Used in two-step frame construction. See wxMDIChildFrame()
387 bool Create(wxWindow
* parent
, wxWindowID id
,
388 const wxString
& title
,
389 const wxPoint
& pos
= wxDefaultPosition
,
390 const wxSize
& size
= wxDefaultSize
,
391 long style
= wxDEFAULT_FRAME_STYLE
,
392 const wxString
& name
= "frame");
395 Maximizes this MDI child frame.
397 @see Activate(), Restore()
399 void Maximize(bool maximize
);
402 Restores this MDI child frame (unmaximizes).