1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxFrame}}\label{wxframe}
|
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
A frame is a window whose size and position can (usually) be changed by the
|
|
|
|
user. It usually has thick borders and a title bar, and can optionally contain
|
|
|
|
a menu bar, toolbar and status bar. A frame can contain any window that is not
|
|
|
|
a frame or dialog.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
A frame that has a status bar and toolbar created via the
|
|
|
|
CreateStatusBar/CreateToolBar functions manages these windows, and adjusts the
|
|
|
|
value returned by GetClientSize to reflect the remaining size available to
|
|
|
|
application windows.
|
1998-07-27 05:47:57 -04:00
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/frame.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Window styles}
|
|
|
|
|
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
1999-05-27 09:14:45 -04:00
|
|
|
\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized). Windows only. }
|
1998-05-20 10:25:30 -04:00
|
|
|
\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.}
|
|
|
|
\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.}
|
1999-05-27 09:14:45 -04:00
|
|
|
\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}. Windows only. }
|
|
|
|
\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame. }
|
|
|
|
\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized. Windows only. }
|
|
|
|
\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame. }
|
|
|
|
\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows. Windows only. }
|
|
|
|
\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu. }
|
|
|
|
\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window. Windows and Motif only.}
|
|
|
|
\twocolitem{\windowstyle{wxSIMPLE\_BORDER}}{Displays no border or decorations. GTK and Windows only (?). }
|
|
|
|
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Unix only).}
|
|
|
|
\twocolitem{\windowstyle{wxFRAME\_FLOAT\_ON\_PARENT}}{Causes the frame to be above the parent window in the
|
1999-05-05 04:57:41 -04:00
|
|
|
z-order and not shown in the taskbar. Without this style, frames are created as top-level windows that may be obscured by
|
2000-03-16 15:41:27 -05:00
|
|
|
the parent window, and frame titles are shown in the taskbar. Windows and GTK. }
|
1999-12-01 10:23:56 -05:00
|
|
|
\twocolitem{\windowstyle{wxFRAME\_TOOL\_WINDOW}}{Causes a frame with a small titlebar to be created;
|
1999-05-27 09:14:45 -04:00
|
|
|
the frame title does not appear in the taskbar. Windows only. }
|
1998-05-20 10:25:30 -04:00
|
|
|
\end{twocollist}
|
|
|
|
|
1999-05-27 09:14:45 -04:00
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
An application should normally define an \helpref{OnCloseWindow}{wxwindowonclosewindow} handler for the
|
|
|
|
frame to respond to system close events, for example so that related data and subwindows can be cleaned up.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxMDIParentFrame}{wxmdiparentframe}, \helpref{wxMDIChildFrame}{wxmdichildframe},\rtfsp
|
|
|
|
\helpref{wxMiniFrame}{wxminiframe}, \helpref{wxDialog}{wxdialog}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxFrame::wxFrame}\label{wxframeconstr}
|
|
|
|
|
|
|
|
\func{}{wxFrame}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{}{wxFrame}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
|
|
|
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
|
|
|
|
\param{const wxString\& }{name = ``frame"}}
|
|
|
|
|
|
|
|
Constructor, creating the window.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{The window parent. This may be NULL. If it is non-NULL, the frame will
|
|
|
|
always be displayed on top of the parent window on Windows.}
|
|
|
|
|
|
|
|
\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.}
|
|
|
|
|
|
|
|
\docparam{title}{The caption to be displayed on the frame's title bar.}
|
|
|
|
|
|
|
|
\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by
|
|
|
|
either the windowing system or wxWindows, depending on platform.}
|
|
|
|
|
|
|
|
\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by
|
|
|
|
either the windowing system or wxWindows, depending on platform.}
|
|
|
|
|
|
|
|
\docparam{style}{The window style. See \helpref{wxFrame}{wxframe}.}
|
|
|
|
|
|
|
|
\docparam{name}{The name of the window. This parameter is used to associate a name with the item,
|
|
|
|
allowing the application user to set Motif resource values for
|
|
|
|
individual windows.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
For Motif, MWM (the Motif Window Manager) should be running for any window styles to work
|
|
|
|
(otherwise all styles take effect).
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::Create}{wxframecreate}
|
|
|
|
|
|
|
|
\membersection{wxFrame::\destruct{wxFrame}}
|
|
|
|
|
|
|
|
\func{void}{\destruct{wxFrame}}{\void}
|
|
|
|
|
|
|
|
Destructor. Destroys all child windows and menu bar if present.
|
|
|
|
|
|
|
|
\membersection{wxFrame::Centre}\label{wxframecentre}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{void}{Centre}{\param{int}{ direction = wxBOTH}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Centres the frame on the display.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{direction}{The parameter may be {\tt wxHORIZONTAL}, {\tt wxVERTICAL} or {\tt wxBOTH}.}
|
|
|
|
|
|
|
|
\membersection{wxFrame::Command}\label{wxframecommand}
|
|
|
|
|
|
|
|
\func{void}{Command}{\param{int }{id}}
|
|
|
|
|
|
|
|
Simulate a menu command.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{id}{The identifier for a menu item.}
|
|
|
|
|
|
|
|
\membersection{wxFrame::Create}\label{wxframecreate}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
|
|
|
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
|
|
|
|
\param{const wxString\& }{name = ``frame"}}
|
|
|
|
|
|
|
|
Used in two-step frame construction. See \helpref{wxFrame::wxFrame}{wxframeconstr}\rtfsp
|
|
|
|
for further details.
|
|
|
|
|
|
|
|
\membersection{wxFrame::CreateStatusBar}\label{wxframecreatestatusbar}
|
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
\func{virtual wxStatusBar*}{CreateStatusBar}{\param{int}{ number = 1},
|
|
|
|
\param{long}{ style = 0},
|
|
|
|
\param{wxWindowID}{ id = -1}, \param{const wxString\&}{ name = "statusBar"}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Creates a status bar at the bottom of the frame.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{number}{The number of fields to create. Specify a
|
|
|
|
value greater than 1 to create a multi-field status bar.}
|
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
\docparam{style}{The status bar style. See \helpref{wxStatusBar}{wxstatusbar} for a list
|
|
|
|
of valid styles.}
|
|
|
|
|
|
|
|
\docparam{id}{The status bar window identifier. If -1, an identifier will be chosen by
|
|
|
|
wxWindows.}
|
|
|
|
|
|
|
|
\docparam{name}{The status bar window name.}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Return value}
|
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
A pointer to the the status bar if it was created successfully, NULL otherwise.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
The width of the status bar is the whole width of the frame (adjusted automatically when
|
|
|
|
resizing), and the height and text size are chosen by the host windowing system.
|
|
|
|
|
|
|
|
By default, the status bar is an instance of wxStatusBar. To use a different class,
|
|
|
|
override \helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar}.
|
|
|
|
|
|
|
|
Note that you can put controls and other windows on the status bar if you wish.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::SetStatusText}{wxframesetstatustext},\rtfsp
|
|
|
|
\helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar},\rtfsp
|
|
|
|
\helpref{wxFrame::GetStatusBar}{wxframegetstatusbar}
|
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
\membersection{wxFrame::CreateToolBar}\label{wxframecreatetoolbar}
|
|
|
|
|
|
|
|
\func{virtual wxToolBar*}{CreateToolBar}{\param{long}{ style = wxNO\_BORDER \pipe wxTB\_HORIZONTAL},
|
|
|
|
\param{wxWindowID}{ id = -1}, \param{const wxString\&}{ name = "toolBar"}}
|
|
|
|
|
|
|
|
Creates a toolbar at the top or left of the frame.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{style}{The toolbar style. See \helpref{wxToolBar}{wxtoolbar} for a list
|
|
|
|
of valid styles.}
|
|
|
|
|
|
|
|
\docparam{id}{The toolbar window identifier. If -1, an identifier will be chosen by
|
|
|
|
wxWindows.}
|
|
|
|
|
|
|
|
\docparam{name}{The toolbar window name.}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
A pointer to the the toolbar if it was created successfully, NULL otherwise.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
By default, the toolbar is an instance of wxToolBar (which is defined to be
|
|
|
|
a suitable toolbar class on each platform, such as wxToolBar95). To use a different class,
|
|
|
|
override \helpref{wxFrame::OnCreateToolBar}{wxframeoncreatetoolbar}.
|
|
|
|
|
|
|
|
When a toolbar has been created with this function, or made known to the frame
|
|
|
|
with \helpref{wxFrame::SetToolBar}{wxframesettoolbar}, the frame will manage the toolbar
|
|
|
|
position and adjust the return value from \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize} to
|
|
|
|
reflect the available space for application windows.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar},\rtfsp
|
|
|
|
\helpref{wxFrame::OnCreateToolBar}{wxframeoncreatetoolbar},\rtfsp
|
|
|
|
\helpref{wxFrame::SetToolBar}{wxframesettoolbar},\rtfsp
|
|
|
|
\helpref{wxFrame::GetToolBar}{wxframegettoolbar}
|
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
\membersection{wxFrame::GetClientAreaOrigin}\label{wxframegetclientareaorigin}
|
|
|
|
|
|
|
|
\constfunc{wxPoint}{GetClientAreaOrigin}{\void}
|
|
|
|
|
|
|
|
Returns the origin of the frame client area (in client coordinates). It may be
|
|
|
|
different from (0, 0) if the frame has a toolbar.
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxFrame::GetMenuBar}\label{wxframegetmenubar}
|
|
|
|
|
|
|
|
\constfunc{wxMenuBar*}{GetMenuBar}{\void}
|
|
|
|
|
|
|
|
Returns a pointer to the menubar currently associated with the frame (if any).
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::SetMenuBar}{wxframesetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}
|
|
|
|
|
|
|
|
\membersection{wxFrame::GetStatusBar}\label{wxframegetstatusbar}
|
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
\constfunc{wxStatusBar*}{GetStatusBar}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Returns a pointer to the status bar currently associated with the frame (if any).
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}
|
|
|
|
|
|
|
|
\membersection{wxFrame::GetTitle}\label{wxframegettitle}
|
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
\constfunc{wxString}{GetTitle}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
Gets a string containing the frame title. See \helpref{wxFrame::SetTitle}{wxframesettitle}.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
\membersection{wxFrame::GetToolBar}\label{wxframegettoolbar}
|
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
\constfunc{wxToolBar*}{GetToolBar}{\void}
|
1998-07-27 05:47:57 -04:00
|
|
|
|
|
|
|
Returns a pointer to the toolbar currently associated with the frame (if any).
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar},\rtfsp
|
|
|
|
\helpref{wxFrame::SetToolBar}{wxframesettoolbar}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxFrame::Iconize}\label{wxframeiconize}
|
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
\func{void}{Iconize}{\param{bool}{ iconize}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-05-27 09:14:45 -04:00
|
|
|
Iconizes or restores the frame. Windows only.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{izonize}{If TRUE, iconizes the frame; if FALSE, shows and restores it.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::IsIconized}{wxframeisiconized}, \helpref{wxFrame::Maximize}{wxframemaximize}.
|
|
|
|
|
|
|
|
\membersection{wxFrame::IsIconized}\label{wxframeisiconized}
|
|
|
|
|
1998-12-18 09:40:38 -05:00
|
|
|
\constfunc{bool}{IsIconized}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-05-27 09:14:45 -04:00
|
|
|
Returns TRUE if the frame is iconized. Windows only.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-12-18 09:40:38 -05:00
|
|
|
\membersection{wxFrame::IsMaximized}\label{wxframeismaximized}
|
|
|
|
|
|
|
|
\constfunc{bool}{IsMaximized}{\void}
|
|
|
|
|
|
|
|
Returns TRUE if the frame is maximized.
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxFrame::Maximize}\label{wxframemaximize}
|
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
\func{void}{Maximize}{\param{bool }{maximize}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Maximizes or restores the frame.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
\docparam{maximize}{If TRUE, maximizes the frame, otherwise it restores it.}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
This function only works under Windows.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::Iconize}{wxframeiconize}
|
|
|
|
|
|
|
|
\membersection{wxFrame::OnActivate}
|
|
|
|
|
1999-01-26 09:18:32 -05:00
|
|
|
\func{void}{OnActivate}{\param{wxActivateEvent\&}{ event}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Called when a window is activated or deactivated (MS Windows
|
1999-01-26 09:18:32 -05:00
|
|
|
only). See also \helpref{wxActivateEvent}{wxactivateevent}.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxFrame::OnCreateStatusBar}\label{wxframeoncreatestatusbar}
|
|
|
|
|
1999-02-16 15:17:02 -05:00
|
|
|
\func{virtual wxStatusBar*}{OnCreateStatusBar}{\param{int }{number},
|
1998-07-27 05:47:57 -04:00
|
|
|
\param{long}{ style},
|
|
|
|
\param{wxWindowID}{ id}, \param{const wxString\&}{ name}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Virtual function called when a status bar is requested by \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{number}{The number of fields to create.}
|
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
\docparam{style}{The window style. See \helpref{wxStatusBar}{wxstatusbar} for a list
|
|
|
|
of valid styles.}
|
|
|
|
|
|
|
|
\docparam{id}{The window identifier. If -1, an identifier will be chosen by
|
|
|
|
wxWindows.}
|
|
|
|
|
|
|
|
\docparam{name}{The window name.}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
A status bar object.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
An application can override this function to return a different kind of status bar. The default
|
|
|
|
implementation returns an instance of \helpref{wxStatusBar}{wxstatusbar}.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}.
|
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
\membersection{wxFrame::OnCreateToolBar}\label{wxframeoncreatetoolbar}
|
|
|
|
|
|
|
|
\func{virtual wxToolBar*}{OnCreateToolBar}{\param{long}{ style},
|
|
|
|
\param{wxWindowID}{ id}, \param{const wxString\&}{ name}}
|
|
|
|
|
|
|
|
Virtual function called when a toolbar is requested by \helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{style}{The toolbar style. See \helpref{wxToolBar}{wxtoolbar} for a list
|
|
|
|
of valid styles.}
|
|
|
|
|
|
|
|
\docparam{id}{The toolbar window identifier. If -1, an identifier will be chosen by
|
|
|
|
wxWindows.}
|
|
|
|
|
|
|
|
\docparam{name}{The toolbar window name.}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
A toolbar object.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
An application can override this function to return a different kind of toolbar. The default
|
|
|
|
implementation returns an instance of \helpref{wxToolBar}{wxtoolbar}.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar}.
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxFrame::OnMenuCommand}\label{wxframeonmenucommand}
|
|
|
|
|
|
|
|
\func{void}{OnMenuCommand}{\param{wxCommandEvent\&}{ event}}
|
|
|
|
|
|
|
|
See \helpref{wxWindow::OnMenuCommand}{wxwindowonmenucommand}.
|
|
|
|
|
|
|
|
\membersection{wxFrame::OnMenuHighlight}\label{wxframeonmenuhighlight}
|
|
|
|
|
|
|
|
\func{void}{OnMenuHighlight}{\param{wxMenuEvent\&}{ event}}
|
|
|
|
|
|
|
|
See \helpref{wxWindow::OnMenuHighlight}{wxwindowonmenuhighlight}.
|
|
|
|
|
|
|
|
\membersection{wxFrame::OnSize}\label{wxframeonsize}
|
|
|
|
|
|
|
|
\func{void}{OnSize}{\param{wxSizeEvent\& }{event}}
|
|
|
|
|
|
|
|
See \helpref{wxWindow::OnSize}{wxwindowonsize}.
|
|
|
|
|
|
|
|
The default {\bf wxFrame::OnSize} implementation looks for a single subwindow,
|
|
|
|
and if one is found, resizes it to fit
|
|
|
|
inside the frame. Override this member if more complex behaviour
|
|
|
|
is required (for example, if there are several subwindows).
|
|
|
|
|
|
|
|
\membersection{wxFrame::SetIcon}\label{wxframeseticon}
|
|
|
|
|
|
|
|
\func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
|
|
|
|
|
|
|
|
Sets the icon for this frame.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{icon}{The icon to associate with this frame.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
The frame takes a `copy' of {\it icon}, but since it uses reference
|
|
|
|
counting, the copy is very quick. It is safe to delete {\it icon} after
|
|
|
|
calling this function.
|
|
|
|
|
|
|
|
Under Windows, instead of using {\bf SetIcon}, you can add the
|
|
|
|
following lines to your MS Windows resource file:
|
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
wxSTD_MDIPARENTFRAME ICON icon1.ico
|
|
|
|
wxSTD_MDICHILDFRAME ICON icon2.ico
|
|
|
|
wxSTD_FRAME ICON icon3.ico
|
|
|
|
\end{verbatim}
|
|
|
|
|
|
|
|
where icon1.ico will be used for the MDI parent frame, icon2.ico
|
|
|
|
will be used for MDI child frames, and icon3.ico will be used for
|
|
|
|
non-MDI frames.
|
|
|
|
|
|
|
|
If these icons are not supplied, and {\bf SetIcon} is not called either,
|
|
|
|
then the following defaults apply if you have included wx.rc.
|
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
wxDEFAULT_FRAME ICON std.ico
|
|
|
|
wxDEFAULT_MDIPARENTFRAME ICON mdi.ico
|
|
|
|
wxDEFAULT_MDICHILDFRAME ICON child.ico
|
|
|
|
\end{verbatim}
|
|
|
|
|
|
|
|
You can replace std.ico, mdi.ico and child.ico with your own defaults
|
|
|
|
for all your wxWindows application. Currently they show the same icon.
|
|
|
|
|
|
|
|
{\it Note:} a wxWindows application linked with subsystem equal to 4.0
|
|
|
|
(i.e. marked as a Windows 95 application) doesn't respond properly
|
|
|
|
to wxFrame::SetIcon. To work around this until a solution is found,
|
|
|
|
mark your program as a 3.5 application. This will also ensure
|
|
|
|
that Windows provides small icons for the application automatically.
|
|
|
|
|
|
|
|
See also \helpref{wxIcon}{wxicon}.
|
|
|
|
|
|
|
|
\membersection{wxFrame::SetMenuBar}\label{wxframesetmenubar}
|
|
|
|
|
|
|
|
\func{void}{SetMenuBar}{\param{wxMenuBar* }{menuBar}}
|
|
|
|
|
|
|
|
Tells the frame to show the given menu bar.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{menuBar}{The menu bar to associate with the frame.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
If the frame is destroyed, the
|
|
|
|
menu bar and its menus will be destroyed also, so do not delete the menu
|
|
|
|
bar explicitly (except by resetting the frame's menu bar to another
|
|
|
|
frame or NULL).
|
|
|
|
|
|
|
|
Under Windows, a call to \helpref{wxFrame::OnSize}{wxframeonsize} is generated, so be sure to initialize
|
|
|
|
data members properly before calling {\bf SetMenuBar}.
|
|
|
|
|
|
|
|
Note that it is not possible to call this function twice for the same frame object.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::GetMenuBar}{wxframegetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}.
|
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
\membersection{wxFrame::SetStatusBar}\label{wxframesetstatusbar}
|
|
|
|
|
|
|
|
\func{void}{SetStatusBar}{\param{wxStatusBar*}{ statusBar}}
|
|
|
|
|
|
|
|
Associates a status bar with the frame.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar},\rtfsp
|
|
|
|
\helpref{wxFrame::GetStatusBar}{wxframegetstatusbar}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxFrame::SetStatusText}\label{wxframesetstatustext}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{virtual void}{SetStatusText}{\param{const wxString\& }{ text}, \param{int}{ number = 0}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Sets the status bar text and redraws the status bar.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{text}{The text for the status field.}
|
|
|
|
|
|
|
|
\docparam{number}{The status field (starting from zero).}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Use an empty string to clear the status bar.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}
|
|
|
|
|
|
|
|
\membersection{wxFrame::SetStatusWidths}\label{wxframesetstatuswidths}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{virtual void}{SetStatusWidths}{\param{int}{ n}, \param{int *}{widths}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Sets the widths of the fields in the status bar.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\wxheading{n}{The number of fields in the status bar. It must be the
|
|
|
|
same used in \helpref{CreateStatusBar}{wxframecreatestatusbar}.}
|
|
|
|
|
|
|
|
\docparam{widths}{Must contain an array of {\it n} integers, each of which is a status field width
|
|
|
|
in pixels. A value of -1 indicates that the field is variable width; at least one
|
|
|
|
field must be -1. You should delete this array after calling {\bf SetStatusWidths}.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
The widths of the variable fields are calculated from the total width of all fields,
|
1999-11-13 03:15:30 -05:00
|
|
|
minus the sum of widths of the non-variable fields, divided by the number of
|
1998-05-20 10:25:30 -04:00
|
|
|
variable fields.
|
|
|
|
|
1999-11-13 03:15:30 -05:00
|
|
|
\pythonnote{Only a single parameter is required, a Python list of
|
|
|
|
integers.}
|
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
\membersection{wxFrame::SetToolBar}\label{wxframesettoolbar}
|
|
|
|
|
|
|
|
\func{void}{SetToolBar}{\param{wxToolBar*}{ toolBar}}
|
|
|
|
|
|
|
|
Associates a toolbar with the frame.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar},\rtfsp
|
|
|
|
\helpref{wxFrame::GetToolBar}{wxframegettoolbar}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxFrame::SetTitle}\label{wxframesettitle}
|
|
|
|
|
|
|
|
\func{virtual void}{SetTitle}{\param{const wxString\& }{ title}}
|
|
|
|
|
|
|
|
Sets the frame title.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{title}{The frame title.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame::GetTitle}{wxframegettitle}
|
|
|
|
|
2000-02-08 14:25:48 -05:00
|
|
|
\membersection{wxFrame::ShowFullScreen}\label{wxframeshowfullscreen}
|
|
|
|
|
|
|
|
\func{bool}{ShowFullScreen}{\param{bool}{ show}, \param{long}{ style = wxFULLSCREEN\_ALL}}
|
|
|
|
|
|
|
|
Passing TRUE to {\it shows} shows the frame full-screen, and passing FALSE restores the frame
|
|
|
|
again. {\it style} is a bit list containing some or all of the following values, which
|
|
|
|
indicate what elements of the frame to hide in full-screen mode:
|
|
|
|
|
|
|
|
\begin{itemize}\itemsep=0pt
|
|
|
|
\item wxFULLSCREEN\_NOMENUBAR
|
|
|
|
\item wxFULLSCREEN\_NOTOOLBAR
|
|
|
|
\item wxFULLSCREEN\_NOSTATUSBAR
|
|
|
|
\item wxFULLSCREEN\_NOBORDER
|
|
|
|
\item wxFULLSCREEN\_NOCAPTION
|
|
|
|
\item wxFULLSCREEN\_ALL (all of the above)
|
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
This function only works on Windows and has not been tested with MDI frames.
|
|
|
|
|