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