]>
Commit | Line | Data |
---|---|---|
1 | \section{\class{wxMDIChildFrame}}\label{wxmdichildframe} | |
2 | ||
3 | An MDI child frame is a frame that can only exist on a \helpref{wxMDIClientWindow}{wxmdiclientwindow}, | |
4 | which is itself a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}. | |
5 | ||
6 | \wxheading{Derived from} | |
7 | ||
8 | \helpref{wxFrame}{wxframe}\\ | |
9 | \helpref{wxWindow}{wxwindow}\\ | |
10 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
11 | \helpref{wxObject}{wxobject} | |
12 | ||
13 | \wxheading{Include files} | |
14 | ||
15 | <wx/mdi.h> | |
16 | ||
17 | \wxheading{Window styles} | |
18 | ||
19 | \twocolwidtha{5cm} | |
20 | \begin{twocollist}\itemsep=0pt | |
21 | \twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.} | |
22 | \twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.} | |
23 | \twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).} | |
24 | \twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).} | |
25 | \twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).} | |
26 | \twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.} | |
27 | \twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).} | |
28 | \twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only; | |
29 | for Windows, it is implicit in wxTHICK\_FRAME).} | |
30 | \twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).} | |
31 | \twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).} | |
32 | \twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).} | |
33 | \end{twocollist} | |
34 | ||
35 | See also \helpref{window styles overview}{windowstyles}. | |
36 | ||
37 | \wxheading{Remarks} | |
38 | ||
39 | Although internally an MDI child frame is a child of the MDI client window, in wxWidgets | |
40 | you create it as a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}. You can usually | |
41 | forget that the client window exists. | |
42 | ||
43 | MDI child frames are clipped to the area of the MDI client window, and may be iconized | |
44 | on the client window. | |
45 | ||
46 | You can associate a menubar with a child frame as usual, although an MDI child doesn't display | |
47 | its menubar under its own title bar. The MDI parent frame's menubar will be changed to | |
48 | reflect the currently active child frame. If there are currently no children, the parent | |
49 | frame's own menubar will be displayed. | |
50 | ||
51 | \wxheading{See also} | |
52 | ||
53 | \helpref{wxMDIClientWindow}{wxmdiclientwindow}, \helpref{wxMDIParentFrame}{wxmdiparentframe},\rtfsp | |
54 | \helpref{wxFrame}{wxframe} | |
55 | ||
56 | \latexignore{\rtfignore{\wxheading{Members}}} | |
57 | ||
58 | \membersection{wxMDIChildFrame::wxMDIChildFrame}\label{wxmdichildframector} | |
59 | ||
60 | \func{}{wxMDIChildFrame}{\void} | |
61 | ||
62 | Default constructor. | |
63 | ||
64 | \func{}{wxMDIChildFrame}{\param{wxMDIParentFrame* }{parent}, \param{wxWindowID }{id},\rtfsp | |
65 | \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp | |
66 | \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp | |
67 | \param{const wxString\& }{name = ``frame"}} | |
68 | ||
69 | Constructor, creating the window. | |
70 | ||
71 | \wxheading{Parameters} | |
72 | ||
73 | \docparam{parent}{The window parent. This should not be NULL.} | |
74 | ||
75 | \docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.} | |
76 | ||
77 | \docparam{title}{The caption to be displayed on the frame's title bar.} | |
78 | ||
79 | \docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by | |
80 | either the windowing system or wxWidgets, depending on platform.} | |
81 | ||
82 | \docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by | |
83 | either the windowing system or wxWidgets, depending on platform.} | |
84 | ||
85 | \docparam{style}{The window style. See \helpref{wxMDIChildFrame}{wxmdichildframe}.} | |
86 | ||
87 | \docparam{name}{The name of the window. This parameter is used to associate a name with the item, | |
88 | allowing the application user to set Motif resource values for | |
89 | individual windows.} | |
90 | ||
91 | \wxheading{Remarks} | |
92 | ||
93 | None. | |
94 | ||
95 | \wxheading{See also} | |
96 | ||
97 | \helpref{wxMDIChildFrame::Create}{wxmdichildframecreate} | |
98 | ||
99 | \membersection{wxMDIChildFrame::\destruct{wxMDIChildFrame}}\label{wxmdichildframedtor} | |
100 | ||
101 | \func{}{\destruct{wxMDIChildFrame}}{\void} | |
102 | ||
103 | Destructor. Destroys all child windows and menu bar if present. | |
104 | ||
105 | \membersection{wxMDIChildFrame::Activate}\label{wxmdichildframeactivate} | |
106 | ||
107 | \func{void}{Activate}{\void} | |
108 | ||
109 | Activates this MDI child frame. | |
110 | ||
111 | \wxheading{See also} | |
112 | ||
113 | \helpref{wxMDIChildFrame::Maximize}{wxmdichildframemaximize},\rtfsp | |
114 | \helpref{wxMDIChildFrame::Restore}{wxmdichildframerestore} | |
115 | ||
116 | \membersection{wxMDIChildFrame::Create}\label{wxmdichildframecreate} | |
117 | ||
118 | \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp | |
119 | \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp | |
120 | \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp | |
121 | \param{const wxString\& }{name = ``frame"}} | |
122 | ||
123 | Used in two-step frame construction. See \helpref{wxMDIChildFrame::wxMDIChildFrame}{wxmdichildframector}\rtfsp | |
124 | for further details. | |
125 | ||
126 | \membersection{wxMDIChildFrame::Maximize}\label{wxmdichildframemaximize} | |
127 | ||
128 | \func{void}{Maximize}{\param{bool}{maximize}} | |
129 | ||
130 | Maximizes this MDI child frame. | |
131 | ||
132 | \wxheading{See also} | |
133 | ||
134 | \helpref{wxMDIChildFrame::Activate}{wxmdichildframeactivate},\rtfsp | |
135 | \helpref{wxMDIChildFrame::Restore}{wxmdichildframerestore} | |
136 | ||
137 | \membersection{wxMDIChildFrame::Restore}\label{wxmdichildframerestore} | |
138 | ||
139 | \func{void}{Restore}{\void} | |
140 | ||
141 | Restores this MDI child frame (unmaximizes). | |
142 | ||
143 | \wxheading{See also} | |
144 | ||
145 | \helpref{wxMDIChildFrame::Activate}{wxmdichildframeactivate},\rtfsp | |
146 | \helpref{wxMDIChildFrame::Maximize}{wxmdichildframemaximize} | |
147 | ||
148 | \section{\class{wxMDIClientWindow}}\label{wxmdiclientwindow} | |
149 | ||
150 | An MDI client window is a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}, and manages zero or | |
151 | more \helpref{wxMDIChildFrame}{wxmdichildframe} objects. | |
152 | ||
153 | \wxheading{Derived from} | |
154 | ||
155 | \helpref{wxWindow}{wxwindow}\\ | |
156 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
157 | \helpref{wxObject}{wxobject} | |
158 | ||
159 | \wxheading{Include files} | |
160 | ||
161 | <wx/mdi.h> | |
162 | ||
163 | \wxheading{Remarks} | |
164 | ||
165 | The client window is the area where MDI child windows exist. It doesn't have to cover the whole | |
166 | parent frame; other windows such as toolbars and a help window might coexist with it. | |
167 | There can be scrollbars on a client window, which are controlled by the parent window style. | |
168 | ||
169 | The {\bf wxMDIClientWindow} class is usually adequate without further derivation, and it is created | |
170 | automatically when the MDI parent frame is created. If the application needs to derive a new class, | |
171 | the function \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} must be | |
172 | overridden in order to give an opportunity to use a different class of client window. | |
173 | ||
174 | Under Windows 95, the client window will automatically have a sunken border style when | |
175 | the active child is not maximized, and no border style when a child is maximized. | |
176 | ||
177 | \wxheading{See also} | |
178 | ||
179 | \helpref{wxMDIChildFrame}{wxmdichildframe}, \helpref{wxMDIParentFrame}{wxmdiparentframe},\rtfsp | |
180 | \helpref{wxFrame}{wxframe} | |
181 | ||
182 | \latexignore{\rtfignore{\wxheading{Members}}} | |
183 | ||
184 | \membersection{wxMDIClientWindow::wxMDIClientWindow}\label{wxmdiclientwindowctor} | |
185 | ||
186 | \func{}{wxMDIClientWindow}{\void} | |
187 | ||
188 | Default constructor. | |
189 | ||
190 | \func{}{wxMDIClientWindow}{\param{wxMDIParentFrame* }{parent}, \param{long}{ style = 0}} | |
191 | ||
192 | Constructor, creating the window. | |
193 | ||
194 | \wxheading{Parameters} | |
195 | ||
196 | \docparam{parent}{The window parent.} | |
197 | ||
198 | \docparam{style}{The window style. Currently unused.} | |
199 | ||
200 | \wxheading{Remarks} | |
201 | ||
202 | The second style of constructor is called within \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}. | |
203 | ||
204 | \wxheading{See also} | |
205 | ||
206 | \helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframector},\rtfsp | |
207 | \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} | |
208 | ||
209 | \membersection{wxMDIClientWindow::\destruct{wxMDIClientWindow}}\label{wxmdiclientwindowdtor} | |
210 | ||
211 | \func{}{\destruct{wxMDIClientWindow}}{\void} | |
212 | ||
213 | Destructor. | |
214 | ||
215 | \membersection{wxMDIClientWindow::CreateClient}\label{wxmdiclientwindowcreateclient} | |
216 | ||
217 | \func{bool}{CreateClient}{\param{wxMDIParentFrame* }{parent}, \param{long}{ style = 0}} | |
218 | ||
219 | Used in two-step frame construction. See \helpref{wxMDIClientWindow::wxMDIClientWindow}{wxmdiclientwindowctor}\rtfsp | |
220 | for further details. | |
221 | ||
222 | \section{\class{wxMDIParentFrame}}\label{wxmdiparentframe} | |
223 | ||
224 | An MDI (Multiple Document Interface) parent frame is a window which can contain | |
225 | MDI child frames in its own `desktop'. It is a convenient way to avoid window clutter, | |
226 | and is used in many popular Windows applications, such as Microsoft Word(TM). | |
227 | ||
228 | \wxheading{Derived from} | |
229 | ||
230 | \helpref{wxFrame}{wxframe}\\ | |
231 | \helpref{wxWindow}{wxwindow}\\ | |
232 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
233 | \helpref{wxObject}{wxobject} | |
234 | ||
235 | \wxheading{Include files} | |
236 | ||
237 | <wx/mdi.h> | |
238 | ||
239 | \wxheading{Remarks} | |
240 | ||
241 | There may be multiple MDI parent frames in a single application, but this probably only makes sense | |
242 | within programming development environments. | |
243 | ||
244 | Child frames may be of class \helpref{wxMDIChildFrame}{wxmdichildframe} (contained | |
245 | within the parent frame) or \helpref{wxFrame}{wxframe} (shown as a top-level frame). | |
246 | ||
247 | An MDI parent frame always has a \helpref{wxMDIClientWindow}{wxmdiclientwindow} associated with it, which | |
248 | is the parent for MDI client frames. | |
249 | This client window may be resized to accommodate non-MDI windows, as seen in Microsoft Visual C++ (TM) and | |
250 | Microsoft Publisher (TM), where a documentation window is placed to one side of the workspace. | |
251 | ||
252 | MDI remains popular despite dire warnings from Microsoft itself that MDI is an obsolete | |
253 | user interface style. | |
254 | ||
255 | The implementation is native in Windows, and simulated under Motif. Under Motif, | |
256 | the child window frames will often have a different appearance from other frames | |
257 | because the window decorations are simulated. | |
258 | ||
259 | \wxheading{Window styles} | |
260 | ||
261 | \twocolwidtha{5cm} | |
262 | \begin{twocollist}\itemsep=0pt | |
263 | \twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.} | |
264 | \twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.} | |
265 | \twocolitem{\windowstyle{wxHSCROLL}}{Displays a horizontal scrollbar in the {\it client window}, allowing | |
266 | the user to view child frames that are off the current view.} | |
267 | \twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).} | |
268 | \twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).} | |
269 | \twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).} | |
270 | \twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.} | |
271 | \twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).} | |
272 | \twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only; | |
273 | for Windows, it is implicit in wxTHICK\_FRAME).} | |
274 | \twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).} | |
275 | \twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).} | |
276 | \twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).} | |
277 | \twocolitem{\windowstyle{wxVSCROLL}}{Displays a vertical scrollbar in the {\it client window}, allowing | |
278 | the user to view child frames that are off the current view.} | |
279 | \twocolitem{\windowstyle{wxFRAME\_NO\_WINDOW\_MENU}}{Under Windows, removes the Window menu that is normally | |
280 | added automatically.} | |
281 | \end{twocollist} | |
282 | ||
283 | See also \helpref{window styles overview}{windowstyles}. | |
284 | ||
285 | \wxheading{See also} | |
286 | ||
287 | \helpref{wxMDIChildFrame}{wxmdichildframe}, \helpref{wxMDIClientWindow}{wxmdiclientwindow},\rtfsp | |
288 | \helpref{wxFrame}{wxframe}, \helpref{wxDialog}{wxdialog} | |
289 | ||
290 | \latexignore{\rtfignore{\wxheading{Members}}} | |
291 | ||
292 | \membersection{wxMDIParentFrame::wxMDIParentFrame}\label{wxmdiparentframector} | |
293 | ||
294 | \func{}{wxMDIParentFrame}{\void} | |
295 | ||
296 | Default constructor. | |
297 | ||
298 | \func{}{wxMDIParentFrame}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp | |
299 | \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp | |
300 | \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE \pipe wxVSCROLL \pipe wxHSCROLL},\rtfsp | |
301 | \param{const wxString\& }{name = ``frame"}} | |
302 | ||
303 | Constructor, creating the window. | |
304 | ||
305 | \wxheading{Parameters} | |
306 | ||
307 | \docparam{parent}{The window parent. This should be NULL.} | |
308 | ||
309 | \docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.} | |
310 | ||
311 | \docparam{title}{The caption to be displayed on the frame's title bar.} | |
312 | ||
313 | \docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by | |
314 | either the windowing system or wxWidgets, depending on platform.} | |
315 | ||
316 | \docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by | |
317 | either the windowing system or wxWidgets, depending on platform.} | |
318 | ||
319 | \docparam{style}{The window style. See \helpref{wxMDIParentFrame}{wxmdiparentframe}.} | |
320 | ||
321 | \docparam{name}{The name of the window. This parameter is used to associate a name with the item, | |
322 | allowing the application user to set Motif resource values for | |
323 | individual windows.} | |
324 | ||
325 | \wxheading{Remarks} | |
326 | ||
327 | During the construction of the frame, the client window will be created. To use a different class | |
328 | from \helpref{wxMDIClientWindow}{wxmdiclientwindow}, override\rtfsp | |
329 | \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}. | |
330 | ||
331 | Under Windows 95, the client window will automatically have a sunken border style when | |
332 | the active child is not maximized, and no border style when a child is maximized. | |
333 | ||
334 | \wxheading{See also} | |
335 | ||
336 | \helpref{wxMDIParentFrame::Create}{wxmdiparentframecreate},\rtfsp | |
337 | \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} | |
338 | ||
339 | \membersection{wxMDIParentFrame::\destruct{wxMDIParentFrame}}\label{wxmdiparentframedtor} | |
340 | ||
341 | \func{}{\destruct{wxMDIParentFrame}}{\void} | |
342 | ||
343 | Destructor. Destroys all child windows and menu bar if present. | |
344 | ||
345 | \membersection{wxMDIParentFrame::ActivateNext}\label{wxmdiparentframeactivatenext} | |
346 | ||
347 | \func{void}{ActivateNext}{\void} | |
348 | ||
349 | Activates the MDI child following the currently active one. | |
350 | ||
351 | \wxheading{See also} | |
352 | ||
353 | \helpref{wxMDIParentFrame::ActivatePrevious}{wxmdiparentframeactivateprevious} | |
354 | ||
355 | \membersection{wxMDIParentFrame::ActivatePrevious}\label{wxmdiparentframeactivateprevious} | |
356 | ||
357 | \func{void}{ActivatePrevious}{\void} | |
358 | ||
359 | Activates the MDI child preceding the currently active one. | |
360 | ||
361 | \wxheading{See also} | |
362 | ||
363 | \helpref{wxMDIParentFrame::ActivateNext}{wxmdiparentframeactivatenext} | |
364 | ||
365 | ||
366 | \membersection{wxMDIParentFrame::ArrangeIcons}\label{wxmdiparentframearrangeicons} | |
367 | ||
368 | \func{void}{ArrangeIcons}{\void} | |
369 | ||
370 | Arranges any iconized (minimized) MDI child windows. | |
371 | ||
372 | \wxheading{See also} | |
373 | ||
374 | \helpref{wxMDIParentFrame::Cascade}{wxmdiparentframecascade},\rtfsp | |
375 | \helpref{wxMDIParentFrame::Tile}{wxmdiparentframetile} | |
376 | ||
377 | \membersection{wxMDIParentFrame::Cascade}\label{wxmdiparentframecascade} | |
378 | ||
379 | \func{void}{Cascade}{\void} | |
380 | ||
381 | Arranges the MDI child windows in a cascade. | |
382 | ||
383 | \wxheading{See also} | |
384 | ||
385 | \helpref{wxMDIParentFrame::Tile}{wxmdiparentframetile},\rtfsp | |
386 | \helpref{wxMDIParentFrame::ArrangeIcons}{wxmdiparentframearrangeicons} | |
387 | ||
388 | \membersection{wxMDIParentFrame::Create}\label{wxmdiparentframecreate} | |
389 | ||
390 | \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp | |
391 | \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp | |
392 | \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE \pipe wxVSCROLL \pipe wxHSCROLL},\rtfsp | |
393 | \param{const wxString\& }{name = ``frame"}} | |
394 | ||
395 | Used in two-step frame construction. See \helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframector}\rtfsp | |
396 | for further details. | |
397 | ||
398 | \membersection{wxMDIParentFrame::GetClientSize}\label{wxmdiparentframegetclientsize} | |
399 | ||
400 | \constfunc{virtual void}{GetClientSize}{\param{int* }{width}, \param{int* }{height}} | |
401 | ||
402 | This gets the size of the frame `client area' in pixels. | |
403 | ||
404 | \wxheading{Parameters} | |
405 | ||
406 | \docparam{width}{Receives the client width in pixels.} | |
407 | ||
408 | \docparam{height}{Receives the client height in pixels.} | |
409 | ||
410 | \wxheading{Remarks} | |
411 | ||
412 | The client area is the area which may be drawn on by the programmer, excluding title bar, border, status bar, | |
413 | and toolbar if present. | |
414 | ||
415 | If you wish to manage your own toolbar (or perhaps you have more than one), | |
416 | provide an {\bf OnSize} event handler. Call {\bf GetClientSize} to | |
417 | find how much space there is for your windows and don't forget to set the size and position | |
418 | of the MDI client window as well as your toolbar and other windows (but not the status bar). | |
419 | ||
420 | If you have set a toolbar with \helpref{wxMDIParentFrame::SetToolbar}{wxmdiparentframesettoolbar}, | |
421 | the client size returned will have subtracted the toolbar height. However, the available positions | |
422 | for the client window and other windows of the frame do not start at zero - you must add the toolbar height. | |
423 | ||
424 | The position and size of the status bar and toolbar (if known to the frame) are always managed | |
425 | by {\bf wxMDIParentFrame}, regardless of what behaviour is defined in your {\bf OnSize} event handler. | |
426 | However, the client window position and size are always set in {\bf OnSize}, so if you override this | |
427 | event handler, make sure you deal with the client window. | |
428 | ||
429 | You do not have to manage the size and position of MDI child windows, since they are managed | |
430 | automatically by the client window. | |
431 | ||
432 | \wxheading{See also} | |
433 | ||
434 | \helpref{wxMDIParentFrame::GetToolBar}{wxmdiparentframegettoolbar},\rtfsp | |
435 | \helpref{wxMDIParentFrame::SetToolBar}{wxmdiparentframesettoolbar},\rtfsp | |
436 | \helpref{wxMDIClientWindow}{wxmdiclientwindow} | |
437 | ||
438 | ||
439 | \pythonnote{The wxPython version of this method takes no arguments and | |
440 | returns a tuple containing width and height.} | |
441 | ||
442 | \membersection{wxMDIParentFrame::GetActiveChild}\label{wxmdiparentframegetactivechild} | |
443 | ||
444 | \constfunc{wxMDIChildFrame*}{GetActiveChild}{\void} | |
445 | ||
446 | Returns a pointer to the active MDI child, if there is one. | |
447 | ||
448 | \membersection{wxMDIParentFrame::GetClientWindow}\label{wxmdiparentframegetclientwindow} | |
449 | ||
450 | \constfunc{wxMDIClientWindow*}{GetClientWindow}{\void} | |
451 | ||
452 | Returns a pointer to the client window. | |
453 | ||
454 | \wxheading{See also} | |
455 | ||
456 | \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} | |
457 | ||
458 | \membersection{wxMDIParentFrame::GetToolBar}\label{wxmdiparentframegettoolbar} | |
459 | ||
460 | \constfunc{virtual wxWindow*}{GetToolBar}{\void} | |
461 | ||
462 | Returns the window being used as the toolbar for this frame. | |
463 | ||
464 | \wxheading{See also} | |
465 | ||
466 | \helpref{wxMDIParentFrame::SetToolBar}{wxmdiparentframesettoolbar} | |
467 | ||
468 | \membersection{wxMDIParentFrame::GetWindowMenu}\label{wxmdiparentframegetwindowmenu} | |
469 | ||
470 | \constfunc{wxMenu*}{GetWindowMenu}{\void} | |
471 | ||
472 | Returns the current Window menu (added by wxWidgets to the menubar). This function | |
473 | is available under Windows only. | |
474 | ||
475 | \membersection{wxMDIParentFrame::OnCreateClient}\label{wxmdiparentframeoncreateclient} | |
476 | ||
477 | \func{virtual wxMDIClientWindow*}{OnCreateClient}{\void} | |
478 | ||
479 | Override this to return a different kind of client window. If you override this function, | |
480 | you must create your parent frame in two stages, or your function will never be called, | |
481 | due to the way C++ treats virtual functions called from constructors. For example: | |
482 | ||
483 | \begin{verbatim} | |
484 | frame = new MyParentFrame; | |
485 | frame->Create(parent, myParentFrameId, wxT("My Parent Frame")); | |
486 | \end{verbatim} | |
487 | ||
488 | \wxheading{Remarks} | |
489 | ||
490 | You might wish to derive from \helpref{wxMDIClientWindow}{wxmdiclientwindow} in order | |
491 | to implement different erase behaviour, for example, such as painting a bitmap | |
492 | on the background. | |
493 | ||
494 | Note that it is probably impossible to have a client window that scrolls as well as painting | |
495 | a bitmap or pattern, since in {\bf OnScroll}, the scrollbar positions always return zero. | |
496 | (Solutions to: {\tt julian.smart@btopenworld.com}). | |
497 | ||
498 | \wxheading{See also} | |
499 | ||
500 | \helpref{wxMDIParentFrame::GetClientWindow}{wxmdiparentframegetclientwindow},\rtfsp | |
501 | \helpref{wxMDIClientWindow}{wxmdiclientwindow} | |
502 | ||
503 | \membersection{wxMDIParentFrame::SetToolBar}\label{wxmdiparentframesettoolbar} | |
504 | ||
505 | \func{virtual void}{SetToolBar}{\param{wxWindow*}{ toolbar}} | |
506 | ||
507 | Sets the window to be used as a toolbar for this | |
508 | MDI parent window. It saves the application having to manage the positioning | |
509 | of the toolbar MDI client window. | |
510 | ||
511 | \wxheading{Parameters} | |
512 | ||
513 | \docparam{toolbar}{Toolbar to manage.} | |
514 | ||
515 | \wxheading{Remarks} | |
516 | ||
517 | When the frame is resized, the toolbar is resized to be the width of | |
518 | the frame client area, and the toolbar height is kept the same. | |
519 | ||
520 | The parent of the toolbar must be this frame. | |
521 | ||
522 | If you wish to manage your own toolbar (or perhaps you have more than one), | |
523 | don't call this function, and instead manage your subwindows and the MDI client window by | |
524 | providing an {\bf OnSize} event handler. Call \helpref{wxMDIParentFrame::GetClientSize}{wxmdiparentframegetclientsize} to | |
525 | find how much space there is for your windows. | |
526 | ||
527 | Note that SDI (normal) frames and MDI child windows must always have their | |
528 | toolbars managed by the application. | |
529 | ||
530 | \wxheading{See also} | |
531 | ||
532 | \helpref{wxMDIParentFrame::GetToolBar}{wxmdiparentframegettoolbar},\rtfsp | |
533 | \helpref{wxMDIParentFrame::GetClientSize}{wxmdiparentframegetclientsize} | |
534 | ||
535 | \membersection{wxMDIParentFrame::SetWindowMenu}\label{wxmdiparentframesetwindowmenu} | |
536 | ||
537 | \func{void}{SetWindowMenu}{\param{wxMenu*}{ menu}} | |
538 | ||
539 | Call this to change the current Window menu. Ownership of the menu object passes to | |
540 | the frame when you call this function. | |
541 | ||
542 | This call is available under Windows only. | |
543 | ||
544 | To remove the window completely, use the wxFRAME\_NO\_WINDOW\_MENU window style. | |
545 | ||
546 | \membersection{wxMDIParentFrame::Tile}\label{wxmdiparentframetile} | |
547 | ||
548 | \func{void}{Tile}{\param{wxOrientation}{ orient = wxHORIZONTAL}} | |
549 | ||
550 | Tiles the MDI child windows either horizontally or vertically depending on | |
551 | whether \arg{orient} is wxHORIZONTAL or wxVERTICAL. | |
552 | ||
553 | Currently only implemented for MSW, does nothing under the other platforms. | |
554 | ||
555 | \wxheading{See also} | |
556 | ||
557 | \helpref{wxMDIParentFrame::Cascade}{wxmdiparentframecascade},\rtfsp | |
558 | \helpref{wxMDIParentFrame::ArrangeIcons}{wxmdiparentframearrangeicons} | |
559 | ||
560 |