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