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