]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/frame.tex
added links to the event docs from the default event processing section
[wxWidgets.git] / docs / latex / wx / frame.tex
1 \section{\class{wxFrame}}\label{wxframe}
2
3 A frame is a window whose size and position can (usually) be changed by the
4 user. It usually has thick borders and a title bar, and can optionally contain
5 a menu bar, toolbar and status bar. A frame can contain any window that is not
6 a frame or dialog.
7
8 A frame that has a status bar and toolbar created via the
9 CreateStatusBar/CreateToolBar functions manages these windows, and adjusts the
10 value returned by GetClientSize to reflect the remaining size available to
11 application windows.
12
13 \wxheading{Derived from}
14
15 \helpref{wxWindow}{wxwindow}\\
16 \helpref{wxEvtHandler}{wxevthandler}\\
17 \helpref{wxObject}{wxobject}
18
19 \wxheading{Include files}
20
21 <wx/frame.h>
22
23 \wxheading{Window styles}
24
25 \twocolwidtha{5cm}
26 \begin{twocollist}\itemsep=0pt
27 \twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxRESIZE\_BORDER \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.}
28 \twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized). Windows only. }
29 \twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.}
30 \twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}. Windows only.}
31 \twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame.}
32 \twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized. Windows only.}
33 \twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame.}
34 \twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of all other windows,
35 see also wxFRAME\_FLOAT\_ON\_PARENT. Windows only.}
36 \twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu.}
37 \twocolitem{\windowstyle{wxSIMPLE\_BORDER}}{Displays no border or decorations. GTK and Windows only.}
38 \twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window.}
39 \twocolitem{\windowstyle{wxFRAME\_TOOL\_WINDOW}}{Causes a frame with a small
40 titlebar to be created; the frame does not appear in the taskbar under Windows.}
41 \twocolitem{\windowstyle{wxFRAME\_NO\_TASKBAR}}{Creates an otherwise normal
42 frame but it does not appear in the taskbar under Windows (note that it will
43 minimize to the desktop window which may seem strange to the users and thus it
44 might be better to use this style only without wxMINIMIZE\_BOX style).
45 Has no effect under other platforms.}
46 \twocolitem{\windowstyle{wxFRAME\_FLOAT\_ON\_PARENT}}{The frame will always be
47 on top of its parent (unlike wxSTAY\_ON\_TOP). A frame created with this style
48 must have a non-NULL parent.}
49 \twocolitem{\windowstyle{wxFRAME\_EX\_CONTEXTHELP}}{Under Windows, puts a query button on the
50 caption. When pressed, Windows will go into a context-sensitive help mode and wxWindows will send
51 a wxEVT\_HELP event if the user clicked on an application window. {\it Note} that this is an extended
52 style and must be set by calling \helpref{SetExtraStyle}{wxwindowsetextrastyle} before Create is called (two-step construction).
53 You cannot use this style together with wxMAXIMIZE\_BOX or wxMINIMIZE\_BOX, so
54 you should use
55 {\tt wxDEFAULT\_FRAME\_STYLE \& (wxMINIMIZE\_BOX | wxMAXIMIZE\_BOX)} for the
56 frames having this style (the dialogs don't have minimize nor maximize box by
57 default)}
58 \end{twocollist}
59
60 The default frame style is for normal, resizeable frames. To create a frame
61 which can not be resized by user, you may use the following combination of
62 styles: {\tt wxDEFAULT\_FRAME\_STYLE \& (wxRESIZE\_BORDER \pipe wxRESIZE\_BOX \pipe wxMAXIMIZE\_BOX)}.
63 % Note: the space after the tilde is necessary or Tex2RTF complains.
64
65 See also \helpref{window styles overview}{windowstyles}.
66
67 \wxheading{Default event processing}
68
69 wxFrame processes the following events:
70
71 \begin{twocollist}\itemsep=0pt
72 \twocolitem{\helpref{wxEVT\_SIZE}{wxsizeevent}}{If the frame has exactly one
73 child window, not counting the status and toolbar, this child is resized to
74 take the entire frame client area. If two or more windows are present, they
75 should be laid out explicitly either by manually handling wxEVT\_SIZE or using
76 \helpref{sizers}{sizeroverview}}
77
78 \twocolitem{\helpref{wxEVT\_MENU\_HIGHLIGHT}{wxmenuevent}}{The default
79 implementation displays the \helpref{help string}{wxmenuitemgethelp} associated
80 with the selected item in the first pane of the status bar, if there is one.}
81 \end{twocollist}
82
83 \wxheading{Remarks}
84
85 An application should normally define an \helpref{wxCloseEvent}{wxcloseevent} handler for the
86 frame to respond to system close events, for example so that related data and subwindows can be cleaned up.
87
88 \wxheading{See also}
89
90 \helpref{wxMDIParentFrame}{wxmdiparentframe}, \helpref{wxMDIChildFrame}{wxmdichildframe},\rtfsp
91 \helpref{wxMiniFrame}{wxminiframe}, \helpref{wxDialog}{wxdialog}
92
93 \latexignore{\rtfignore{\wxheading{Members}}}
94
95 \membersection{wxFrame::wxFrame}\label{wxframeconstr}
96
97 \func{}{wxFrame}{\void}
98
99 Default constructor.
100
101 \func{}{wxFrame}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
102 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
103 \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
104 \param{const wxString\& }{name = ``frame"}}
105
106 Constructor, creating the window.
107
108 \wxheading{Parameters}
109
110 \docparam{parent}{The window parent. This may be NULL. If it is non-NULL, the frame will
111 always be displayed on top of the parent window on Windows.}
112
113 \docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.}
114
115 \docparam{title}{The caption to be displayed on the frame's title bar.}
116
117 \docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by
118 either the windowing system or wxWindows, depending on platform.}
119
120 \docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by
121 either the windowing system or wxWindows, depending on platform.}
122
123 \docparam{style}{The window style. See \helpref{wxFrame}{wxframe}.}
124
125 \docparam{name}{The name of the window. This parameter is used to associate a name with the item,
126 allowing the application user to set Motif resource values for
127 individual windows.}
128
129 \wxheading{Remarks}
130
131 For Motif, MWM (the Motif Window Manager) should be running for any window styles to work
132 (otherwise all styles take effect).
133
134 \wxheading{See also}
135
136 \helpref{wxFrame::Create}{wxframecreate}
137
138 \membersection{wxFrame::\destruct{wxFrame}}
139
140 \func{void}{\destruct{wxFrame}}{\void}
141
142 Destructor. Destroys all child windows and menu bar if present.
143
144 \membersection{wxFrame::Centre}\label{wxframecentre}
145
146 \func{void}{Centre}{\param{int}{ direction = wxBOTH}}
147
148 Centres the frame on the display.
149
150 \wxheading{Parameters}
151
152 \docparam{direction}{The parameter may be {\tt wxHORIZONTAL}, {\tt wxVERTICAL} or {\tt wxBOTH}.}
153
154 \membersection{wxFrame::Command}\label{wxframecommand}
155
156 \func{void}{Command}{\param{int }{id}}
157
158 Simulate a menu command.
159
160 \wxheading{Parameters}
161
162 \docparam{id}{The identifier for a menu item.}
163
164 \membersection{wxFrame::Create}\label{wxframecreate}
165
166 \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
167 \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
168 \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
169 \param{const wxString\& }{name = ``frame"}}
170
171 Used in two-step frame construction. See \helpref{wxFrame::wxFrame}{wxframeconstr}\rtfsp
172 for further details.
173
174 \membersection{wxFrame::CreateStatusBar}\label{wxframecreatestatusbar}
175
176 \func{virtual wxStatusBar*}{CreateStatusBar}{\param{int}{ number = 1},
177 \param{long}{ style = 0},
178 \param{wxWindowID}{ id = -1}, \param{const wxString\&}{ name = "statusBar"}}
179
180 Creates a status bar at the bottom of the frame.
181
182 \wxheading{Parameters}
183
184 \docparam{number}{The number of fields to create. Specify a
185 value greater than 1 to create a multi-field status bar.}
186
187 \docparam{style}{The status bar style. See \helpref{wxStatusBar}{wxstatusbar} for a list
188 of valid styles.}
189
190 \docparam{id}{The status bar window identifier. If -1, an identifier will be chosen by
191 wxWindows.}
192
193 \docparam{name}{The status bar window name.}
194
195 \wxheading{Return value}
196
197 A pointer to the the status bar if it was created successfully, NULL otherwise.
198
199 \wxheading{Remarks}
200
201 The width of the status bar is the whole width of the frame (adjusted automatically when
202 resizing), and the height and text size are chosen by the host windowing system.
203
204 By default, the status bar is an instance of wxStatusBar. To use a different class,
205 override \helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar}.
206
207 Note that you can put controls and other windows on the status bar if you wish.
208
209 \wxheading{See also}
210
211 \helpref{wxFrame::SetStatusText}{wxframesetstatustext},\rtfsp
212 \helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar},\rtfsp
213 \helpref{wxFrame::GetStatusBar}{wxframegetstatusbar}
214
215 \membersection{wxFrame::CreateToolBar}\label{wxframecreatetoolbar}
216
217 \func{virtual wxToolBar*}{CreateToolBar}{\param{long}{ style = wxNO\_BORDER \pipe wxTB\_HORIZONTAL},
218 \param{wxWindowID}{ id = -1}, \param{const wxString\&}{ name = "toolBar"}}
219
220 Creates a toolbar at the top or left of the frame.
221
222 \wxheading{Parameters}
223
224 \docparam{style}{The toolbar style. See \helpref{wxToolBar}{wxtoolbar} for a list
225 of valid styles.}
226
227 \docparam{id}{The toolbar window identifier. If -1, an identifier will be chosen by
228 wxWindows.}
229
230 \docparam{name}{The toolbar window name.}
231
232 \wxheading{Return value}
233
234 A pointer to the the toolbar if it was created successfully, NULL otherwise.
235
236 \wxheading{Remarks}
237
238 By default, the toolbar is an instance of wxToolBar (which is defined to be
239 a suitable toolbar class on each platform, such as wxToolBar95). To use a different class,
240 override \helpref{wxFrame::OnCreateToolBar}{wxframeoncreatetoolbar}.
241
242 When a toolbar has been created with this function, or made known to the frame
243 with \helpref{wxFrame::SetToolBar}{wxframesettoolbar}, the frame will manage the toolbar
244 position and adjust the return value from \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize} to
245 reflect the available space for application windows.
246
247 \wxheading{See also}
248
249 \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar},\rtfsp
250 \helpref{wxFrame::OnCreateToolBar}{wxframeoncreatetoolbar},\rtfsp
251 \helpref{wxFrame::SetToolBar}{wxframesettoolbar},\rtfsp
252 \helpref{wxFrame::GetToolBar}{wxframegettoolbar}
253
254 \membersection{wxFrame::GetClientAreaOrigin}\label{wxframegetclientareaorigin}
255
256 \constfunc{wxPoint}{GetClientAreaOrigin}{\void}
257
258 Returns the origin of the frame client area (in client coordinates). It may be
259 different from (0, 0) if the frame has a toolbar.
260
261 \membersection{wxFrame::GetMenuBar}\label{wxframegetmenubar}
262
263 \constfunc{wxMenuBar*}{GetMenuBar}{\void}
264
265 Returns a pointer to the menubar currently associated with the frame (if any).
266
267 \wxheading{See also}
268
269 \helpref{wxFrame::SetMenuBar}{wxframesetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}
270
271 \membersection{wxFrame::GetStatusBar}\label{wxframegetstatusbar}
272
273 \constfunc{wxStatusBar*}{GetStatusBar}{\void}
274
275 Returns a pointer to the status bar currently associated with the frame (if any).
276
277 \wxheading{See also}
278
279 \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}
280
281 \membersection{wxFrame::GetStatusBarPane}\label{wxframegetstatusbarpane}
282
283 \func{int}{GetStatusBarPane}{\void}
284
285 Returns the status bar pane used to display menu and toolbar help.
286
287 \wxheading{See also}
288
289 \helpref{wxFrame::SetStatusBarPane}{wxframesetstatusbarpane}
290
291 \membersection{wxFrame::GetTitle}\label{wxframegettitle}
292
293 \constfunc{wxString}{GetTitle}{\void}
294
295 Gets a string containing the frame title. See \helpref{wxFrame::SetTitle}{wxframesettitle}.
296
297 \membersection{wxFrame::GetToolBar}\label{wxframegettoolbar}
298
299 \constfunc{wxToolBar*}{GetToolBar}{\void}
300
301 Returns a pointer to the toolbar currently associated with the frame (if any).
302
303 \wxheading{See also}
304
305 \helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar},\rtfsp
306 \helpref{wxFrame::SetToolBar}{wxframesettoolbar}
307
308 \membersection{wxFrame::Iconize}\label{wxframeiconize}
309
310 \func{void}{Iconize}{\param{bool}{ iconize}}
311
312 Iconizes or restores the frame.
313
314 \wxheading{Parameters}
315
316 \docparam{iconize}{If TRUE, iconizes the frame; if FALSE, shows and restores it.}
317
318 \wxheading{See also}
319
320 \helpref{wxFrame::IsIconized}{wxframeisiconized}, \helpref{wxFrame::Maximize}{wxframemaximize}.
321
322 \membersection{wxFrame::IsFullScreen}\label{wxframeisfullscreen}
323
324 \func{bool}{IsFullScreen}{\void}
325
326 Returns TRUE if the frame is in fullscreen mode.
327
328 \wxheading{See also}
329
330 \helpref{wxFrame::ShowFullScreen}{wxframeshowfullscreen}
331
332 \membersection{wxFrame::IsIconized}\label{wxframeisiconized}
333
334 \constfunc{bool}{IsIconized}{\void}
335
336 Returns TRUE if the frame is iconized.
337
338 \membersection{wxFrame::IsMaximized}\label{wxframeismaximized}
339
340 \constfunc{bool}{IsMaximized}{\void}
341
342 Returns TRUE if the frame is maximized.
343
344 \membersection{wxFrame::Maximize}\label{wxframemaximize}
345
346 \func{void}{Maximize}{\param{bool }{maximize}}
347
348 Maximizes or restores the frame.
349
350 \wxheading{Parameters}
351
352 \docparam{maximize}{If TRUE, maximizes the frame, otherwise it restores it.}
353
354 \wxheading{Remarks}
355
356 This function only works under Windows.
357
358 \wxheading{See also}
359
360 \helpref{wxFrame::Iconize}{wxframeiconize}
361
362 \membersection{wxFrame::OnCreateStatusBar}\label{wxframeoncreatestatusbar}
363
364 \func{virtual wxStatusBar*}{OnCreateStatusBar}{\param{int }{number},
365 \param{long}{ style},
366 \param{wxWindowID}{ id}, \param{const wxString\&}{ name}}
367
368 Virtual function called when a status bar is requested by \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}.
369
370 \wxheading{Parameters}
371
372 \docparam{number}{The number of fields to create.}
373
374 \docparam{style}{The window style. See \helpref{wxStatusBar}{wxstatusbar} for a list
375 of valid styles.}
376
377 \docparam{id}{The window identifier. If -1, an identifier will be chosen by
378 wxWindows.}
379
380 \docparam{name}{The window name.}
381
382 \wxheading{Return value}
383
384 A status bar object.
385
386 \wxheading{Remarks}
387
388 An application can override this function to return a different kind of status bar. The default
389 implementation returns an instance of \helpref{wxStatusBar}{wxstatusbar}.
390
391 \wxheading{See also}
392
393 \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}.
394
395 \membersection{wxFrame::OnCreateToolBar}\label{wxframeoncreatetoolbar}
396
397 \func{virtual wxToolBar*}{OnCreateToolBar}{\param{long}{ style},
398 \param{wxWindowID}{ id}, \param{const wxString\&}{ name}}
399
400 Virtual function called when a toolbar is requested by \helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}.
401
402 \wxheading{Parameters}
403
404 \docparam{style}{The toolbar style. See \helpref{wxToolBar}{wxtoolbar} for a list
405 of valid styles.}
406
407 \docparam{id}{The toolbar window identifier. If -1, an identifier will be chosen by
408 wxWindows.}
409
410 \docparam{name}{The toolbar window name.}
411
412 \wxheading{Return value}
413
414 A toolbar object.
415
416 \wxheading{Remarks}
417
418 An application can override this function to return a different kind of toolbar. The default
419 implementation returns an instance of \helpref{wxToolBar}{wxtoolbar}.
420
421 \wxheading{See also}
422
423 \helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar}.
424
425 \membersection{wxFrame::SendSizeEvent}\label{wxframesendsizeevent}
426
427 \func{void}{SendSizeEvent}{\void}
428
429 This function sends a dummy \helpref{size event}{wxsizeevent} to the frame
430 forcing it to reevaluate its children positions. It is sometimes useful to call
431 this function after adding or deleting a children after the frame creation or
432 if a child size changes.
433
434 Note that if the frame is using either sizers or constraints for the children
435 layout, it is enough to call \helpref{Layout()}{wxwindowlayout} directly and
436 this function should not be used in this case.
437
438 \membersection{wxFrame::SetIcon}\label{wxframeseticon}
439
440 \func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
441
442 Sets the icon for this frame.
443
444 \wxheading{Parameters}
445
446 \docparam{icon}{The icon to associate with this frame.}
447
448 \wxheading{Remarks}
449
450 The frame takes a `copy' of {\it icon}, but since it uses reference
451 counting, the copy is very quick. It is safe to delete {\it icon} after
452 calling this function.
453
454 See also \helpref{wxIcon}{wxicon}.
455
456 \membersection{wxFrame::SetIcons}\label{wxframeseticons}
457
458 \func{void}{SetIcons}{\param{const wxIconBundle\& }{icons}}
459
460 Sets the icons for this frame.
461
462 \wxheading{Parameters}
463
464 \docparam{icons}{The icons to associate with this frame.}
465
466 See also \helpref{wxIconBundle}{wxiconbundle}.
467
468 % VZ: we don't have all this any more (18.08.00)
469 %
470 %Under Windows, instead of using {\bf SetIcon}, you can add the
471 %following lines to your MS Windows resource file:
472 %
473 %\begin{verbatim}
474 %wxSTD_MDIPARENTFRAME ICON icon1.ico
475 %wxSTD_MDICHILDFRAME ICON icon2.ico
476 %wxSTD_FRAME ICON icon3.ico
477 %\end{verbatim}
478 %
479 %where icon1.ico will be used for the MDI parent frame, icon2.ico
480 %will be used for MDI child frames, and icon3.ico will be used for
481 %non-MDI frames.
482 %
483 %If these icons are not supplied, and {\bf SetIcon} is not called either,
484 %then the following defaults apply if you have included wx.rc.
485 %
486 %\begin{verbatim}
487 %wxDEFAULT_FRAME ICON std.ico
488 %wxDEFAULT_MDIPARENTFRAME ICON mdi.ico
489 %wxDEFAULT_MDICHILDFRAME ICON child.ico
490 %\end{verbatim}
491 %
492 %You can replace std.ico, mdi.ico and child.ico with your own defaults
493 %for all your wxWindows application. Currently they show the same icon.
494
495 \membersection{wxFrame::SetMenuBar}\label{wxframesetmenubar}
496
497 \func{void}{SetMenuBar}{\param{wxMenuBar* }{menuBar}}
498
499 Tells the frame to show the given menu bar.
500
501 \wxheading{Parameters}
502
503 \docparam{menuBar}{The menu bar to associate with the frame.}
504
505 \wxheading{Remarks}
506
507 If the frame is destroyed, the
508 menu bar and its menus will be destroyed also, so do not delete the menu
509 bar explicitly (except by resetting the frame's menu bar to another
510 frame or NULL).
511
512 Under Windows, a call to \helpref{wxFrame::OnSize}{wxframeonsize} is generated, so be sure to initialize
513 data members properly before calling {\bf SetMenuBar}.
514
515 Note that it is not possible to call this function twice for the same frame object.
516
517 \wxheading{See also}
518
519 \helpref{wxFrame::GetMenuBar}{wxframegetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}.
520
521 \membersection{wxFrame::SetStatusBar}\label{wxframesetstatusbar}
522
523 \func{void}{SetStatusBar}{\param{wxStatusBar*}{ statusBar}}
524
525 Associates a status bar with the frame.
526
527 \wxheading{See also}
528
529 \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar},\rtfsp
530 \helpref{wxFrame::GetStatusBar}{wxframegetstatusbar}
531
532 \membersection{wxFrame::SetStatusBarPane}\label{wxframesetstatusbarpane}
533
534 \func{void}{SetStatusBarPane}{\param{int}{ n}}
535
536 Set the status bar pane used to display menu and toolbar help.
537 Using -1 disables help display.
538
539 \membersection{wxFrame::SetStatusText}\label{wxframesetstatustext}
540
541 \func{virtual void}{SetStatusText}{\param{const wxString\& }{ text}, \param{int}{ number = 0}}
542
543 Sets the status bar text and redraws the status bar.
544
545 \wxheading{Parameters}
546
547 \docparam{text}{The text for the status field.}
548
549 \docparam{number}{The status field (starting from zero).}
550
551 \wxheading{Remarks}
552
553 Use an empty string to clear the status bar.
554
555 \wxheading{See also}
556
557 \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}
558
559 \membersection{wxFrame::SetStatusWidths}\label{wxframesetstatuswidths}
560
561 \func{virtual void}{SetStatusWidths}{\param{int}{ n}, \param{int *}{widths}}
562
563 Sets the widths of the fields in the status bar.
564
565 \wxheading{Parameters}
566
567 \wxheading{n}{The number of fields in the status bar. It must be the
568 same used in \helpref{CreateStatusBar}{wxframecreatestatusbar}.}
569
570 \docparam{widths}{Must contain an array of {\it n} integers, each of which is a status field width
571 in pixels. A value of -1 indicates that the field is variable width; at least one
572 field must be -1. You should delete this array after calling {\bf SetStatusWidths}.}
573
574 \wxheading{Remarks}
575
576 The widths of the variable fields are calculated from the total width of all fields,
577 minus the sum of widths of the non-variable fields, divided by the number of
578 variable fields.
579
580 \pythonnote{Only a single parameter is required, a Python list of
581 integers.}
582
583 \perlnote{In wxPerl this method takes the field widths as parameters.}
584
585 \membersection{wxFrame::SetToolBar}\label{wxframesettoolbar}
586
587 \func{void}{SetToolBar}{\param{wxToolBar*}{ toolBar}}
588
589 Associates a toolbar with the frame.
590
591 \wxheading{See also}
592
593 \helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar},\rtfsp
594 \helpref{wxFrame::GetToolBar}{wxframegettoolbar}
595
596 \membersection{wxFrame::SetTitle}\label{wxframesettitle}
597
598 \func{virtual void}{SetTitle}{\param{const wxString\& }{ title}}
599
600 Sets the frame title.
601
602 \wxheading{Parameters}
603
604 \docparam{title}{The frame title.}
605
606 \wxheading{See also}
607
608 \helpref{wxFrame::GetTitle}{wxframegettitle}
609
610 \membersection{wxFrame::ShowFullScreen}\label{wxframeshowfullscreen}
611
612 \func{bool}{ShowFullScreen}{\param{bool}{ show}, \param{long}{ style = wxFULLSCREEN\_ALL}}
613
614 Passing TRUE to {\it shows} shows the frame full-screen, and passing FALSE restores the frame
615 again. {\it style} is a bit list containing some or all of the following values, which
616 indicate what elements of the frame to hide in full-screen mode:
617
618 \begin{itemize}\itemsep=0pt
619 \item wxFULLSCREEN\_NOMENUBAR
620 \item wxFULLSCREEN\_NOTOOLBAR
621 \item wxFULLSCREEN\_NOSTATUSBAR
622 \item wxFULLSCREEN\_NOBORDER
623 \item wxFULLSCREEN\_NOCAPTION
624 \item wxFULLSCREEN\_ALL (all of the above)
625 \end{itemize}
626
627 This function has not been tested with MDI frames.
628
629 \wxheading{See also}
630
631 \helpref{wxFrame::IsFullScreen}{wxframeisfullscreen}
632