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