2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: frame.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxFrame
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxFrame
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-05-10 05:44:43 -04: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
|
2008-03-08 08:52:38 -05:00
|
|
|
a frame or dialog.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-05-10 05:44:43 -04:00
|
|
|
A frame that has a status bar and toolbar, created via the CreateStatusBar() and
|
|
|
|
CreateToolBar() functions, manages these windows and adjusts the value returned
|
|
|
|
by GetClientSize() to reflect the remaining size available to application windows.
|
|
|
|
|
|
|
|
@remarks An application should normally define an wxCloseEvent handler for the
|
|
|
|
frame to respond to system close events, for example so that related
|
|
|
|
data and subwindows can be cleaned up.
|
|
|
|
|
|
|
|
|
2008-09-25 16:00:31 -04:00
|
|
|
@section frame_defaultevent Default event processing
|
2008-05-10 05:44:43 -04:00
|
|
|
|
|
|
|
wxFrame processes the following events:
|
|
|
|
|
|
|
|
@li @c wxEVT_SIZE: if the frame has exactly one child window, not counting the
|
|
|
|
status and toolbar, this child is resized to take the entire frame client area.
|
|
|
|
If two or more windows are present, they should be laid out explicitly either
|
|
|
|
by manually handling wxEVT_SIZE or using sizers;
|
|
|
|
@li @c wxEVT_MENU_HIGHLIGHT: the default implementation displays the help string
|
|
|
|
associated with the selected item in the first pane of the status bar, if there is one.
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-09-25 16:00:31 -04:00
|
|
|
@section frame_styles
|
|
|
|
|
|
|
|
wxFrame supports the following styles:
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@beginStyleTable
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxDEFAULT_FRAME_STYLE}
|
2008-03-08 09:43:31 -05:00
|
|
|
Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER |
|
2008-03-08 08:52:38 -05:00
|
|
|
wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxICONIZE}
|
2008-03-08 08:52:38 -05:00
|
|
|
Display the frame iconized (minimized). Windows only.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxCAPTION}
|
2008-03-08 08:52:38 -05:00
|
|
|
Puts a caption on the frame.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxMINIMIZE}
|
2008-03-08 08:52:38 -05:00
|
|
|
Identical to wxICONIZE. Windows only.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxMINIMIZE_BOX}
|
2008-03-08 08:52:38 -05:00
|
|
|
Displays a minimize box on the frame.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxMAXIMIZE}
|
2008-03-08 08:52:38 -05:00
|
|
|
Displays the frame maximized. Windows only.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxMAXIMIZE_BOX}
|
2008-03-08 08:52:38 -05:00
|
|
|
Displays a maximize box on the frame.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxCLOSE_BOX}
|
2008-03-08 08:52:38 -05:00
|
|
|
Displays a close box on the frame.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxSTAY_ON_TOP}
|
2008-03-08 08:52:38 -05:00
|
|
|
Stay on top of all other windows, see also wxFRAME_FLOAT_ON_PARENT.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxSYSTEM_MENU}
|
2008-03-08 08:52:38 -05:00
|
|
|
Displays a system menu.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxRESIZE_BORDER}
|
2008-03-08 08:52:38 -05:00
|
|
|
Displays a resizeable border around the window.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxFRAME_TOOL_WINDOW}
|
2008-03-08 08:52:38 -05:00
|
|
|
Causes a frame with a small titlebar to be created; the frame does
|
|
|
|
not appear in the taskbar under Windows or GTK+.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxFRAME_NO_TASKBAR}
|
2008-03-08 08:52:38 -05:00
|
|
|
Creates an otherwise normal frame but it does not appear in the
|
|
|
|
taskbar under Windows or GTK+ (note that it will minimize to the
|
|
|
|
desktop window under Windows which may seem strange to the users
|
|
|
|
and thus it might be better to use this style only without
|
|
|
|
wxMINIMIZE_BOX style). In wxGTK, the flag is respected only if GTK+
|
2008-03-08 09:43:31 -05:00
|
|
|
is at least version 2.2 and the window manager supports
|
2008-05-10 05:44:43 -04:00
|
|
|
_NET_WM_STATE_SKIP_TASKBAR hint. Has no effect under other platforms.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxFRAME_FLOAT_ON_PARENT}
|
2008-05-10 05:44:43 -04:00
|
|
|
The frame will always be on top of its parent (unlike wxSTAY_ON_TOP).
|
|
|
|
A frame created with this style must have a non-@NULL parent.
|
|
|
|
@style{wxFRAME_SHAPED}
|
|
|
|
Windows with this style are allowed to have their shape changed
|
|
|
|
with the SetShape() method.
|
|
|
|
@endStyleTable
|
|
|
|
|
|
|
|
The default frame style is for normal, resizeable frames.
|
|
|
|
To create a frame which can not be resized by user, you may use the following
|
|
|
|
combination of styles:
|
|
|
|
|
|
|
|
@code
|
2008-07-15 09:50:37 -04:00
|
|
|
wxDEFAULT_FRAME_STYLE & ~(wxRESIZE_BORDER | wxMAXIMIZE_BOX)
|
2008-05-10 05:44:43 -04:00
|
|
|
@endcode
|
|
|
|
|
|
|
|
See also the @ref overview_windowstyles.
|
|
|
|
|
|
|
|
@beginExtraStyleTable
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxFRAME_EX_CONTEXTHELP}
|
2008-03-08 08:52:38 -05:00
|
|
|
Under Windows, puts a query button on the caption. When pressed,
|
|
|
|
Windows will go into a context-sensitive help mode and wxWidgets
|
|
|
|
will send a wxEVT_HELP event if the user clicked on an application
|
|
|
|
window. Note that this is an extended style and must be set by
|
|
|
|
calling SetExtraStyle before Create is called (two-step
|
|
|
|
construction). You cannot use this style together with
|
|
|
|
wxMAXIMIZE_BOX or wxMINIMIZE_BOX, so you should use
|
|
|
|
wxDEFAULT_FRAME_STYLE ~ (wxMINIMIZE_BOX | wxMAXIMIZE_BOX) for the
|
|
|
|
frames having this style (the dialogs don't have a minimize or a
|
|
|
|
maximize box by default)
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxFRAME_EX_METAL}
|
2008-03-08 08:52:38 -05:00
|
|
|
On Mac OS X, frames with this style will be shown with a metallic
|
|
|
|
look. This is an extra style.
|
2008-05-10 05:44:43 -04:00
|
|
|
@endExtraStyleTable
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{managedwnd}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
@see wxMDIParentFrame, wxMDIChildFrame, wxMiniFrame, wxDialog
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxFrame : public wxTopLevelWindow
|
|
|
|
{
|
|
|
|
public:
|
2008-09-25 16:00:31 -04:00
|
|
|
/**
|
|
|
|
Default constructor.
|
|
|
|
*/
|
|
|
|
wxFrame();
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Constructor, creating the window.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param parent
|
2008-03-09 08:33:59 -04:00
|
|
|
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.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param id
|
2008-09-25 16:00:31 -04:00
|
|
|
The window identifier. It may take a value of -1 to indicate a default value.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param title
|
2008-03-09 08:33:59 -04:00
|
|
|
The caption to be displayed on the frame's title bar.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param pos
|
2008-03-09 08:33:59 -04:00
|
|
|
The window position. The value wxDefaultPosition indicates a default position,
|
2008-09-25 16:00:31 -04:00
|
|
|
chosen by either the windowing system or wxWidgets, depending on platform.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param size
|
2008-03-09 08:33:59 -04:00
|
|
|
The window size. The value wxDefaultSize indicates a default size, chosen by
|
|
|
|
either the windowing system or wxWidgets, depending on platform.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-09-25 16:00:31 -04:00
|
|
|
The window style. See wxFrame class description.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param name
|
2008-09-25 16:00:31 -04:00
|
|
|
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
|
2008-03-09 08:33:59 -04:00
|
|
|
individual windows.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks For Motif, MWM (the Motif Window Manager) should be running for
|
2008-09-25 16:00:31 -04:00
|
|
|
any window styles to work (otherwise all styles take effect).
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see Create()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
wxFrame(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
2008-11-08 10:17:16 -05:00
|
|
|
const wxString& name = wxFrameNameStr);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor. Destroys all child windows and menu bar if present.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual ~wxFrame();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Centres the frame on the display.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param direction
|
2008-03-09 08:33:59 -04:00
|
|
|
The parameter may be wxHORIZONTAL, wxVERTICAL or wxBOTH.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void Centre(int direction = wxBOTH);
|
|
|
|
|
|
|
|
/**
|
2008-09-25 16:00:31 -04:00
|
|
|
Used in two-step frame construction.
|
|
|
|
See wxFrame() for further details.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-28 11:36:26 -04:00
|
|
|
bool Create(wxWindow* parent, wxWindowID id, const wxString& title,
|
2008-03-08 08:52:38 -05:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
2008-10-28 11:36:26 -04:00
|
|
|
const wxString& name = wxFrameNameStr);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Creates a status bar at the bottom of the frame.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param number
|
2008-03-09 08:33:59 -04:00
|
|
|
The number of fields to create. Specify a
|
|
|
|
value greater than 1 to create a multi-field status bar.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-09-25 16:00:31 -04:00
|
|
|
The status bar style. See wxStatusBar for a list of valid styles.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param id
|
2008-09-25 16:00:31 -04:00
|
|
|
The status bar window identifier. If -1, an identifier will be chosen
|
|
|
|
by wxWidgets.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param name
|
2008-03-09 08:33:59 -04:00
|
|
|
The status bar window name.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return A pointer to the status bar if it was created successfully, @NULL
|
2008-09-25 16:00:31 -04:00
|
|
|
otherwise.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks The width of the status bar is the whole width of the frame
|
2008-03-09 08:33:59 -04:00
|
|
|
(adjusted automatically when resizing), and the height
|
|
|
|
and text size are chosen by the host windowing system.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SetStatusText(), OnCreateStatusBar(), GetStatusBar()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-28 11:36:26 -04:00
|
|
|
virtual wxStatusBar* CreateStatusBar(int number = 1, long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
|
|
|
|
wxWindowID id = 0,
|
|
|
|
const wxString& name = wxStatusLineNameStr);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Creates a toolbar at the top or left of the frame.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-09-25 16:00:31 -04:00
|
|
|
The toolbar style. See wxToolBar for a list of valid styles.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param id
|
2008-09-25 16:00:31 -04:00
|
|
|
The toolbar window identifier. If -1, an identifier will be chosen
|
|
|
|
by wxWidgets.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param name
|
2008-03-09 08:33:59 -04:00
|
|
|
The toolbar window name.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return A pointer to the toolbar if it was created successfully, @NULL
|
2008-09-25 16:00:31 -04:00
|
|
|
otherwise.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks By default, the toolbar is an instance of wxToolBar (which is
|
2008-03-09 08:33:59 -04:00
|
|
|
defined to be a suitable toolbar class on each
|
|
|
|
platform, such as wxToolBar95). To use a different
|
|
|
|
class, override OnCreateToolBar().
|
2008-09-25 16:00:31 -04:00
|
|
|
When a toolbar has been created with this function, or made
|
|
|
|
known to the frame with wxFrame::SetToolBar, the frame will
|
|
|
|
manage the toolbar position and adjust the return value from
|
|
|
|
wxWindow::GetClientSize to reflect the available space for
|
|
|
|
application windows.
|
|
|
|
Under Pocket PC, you should always use this function for creating
|
|
|
|
the toolbar to be managed by the frame, so that wxWidgets can
|
|
|
|
use a combined menubar and toolbar.
|
|
|
|
Where you manage your own toolbars, create a wxToolBar as usual.
|
|
|
|
|
|
|
|
@see CreateStatusBar(), OnCreateToolBar(), SetToolBar(), GetToolBar()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
virtual wxToolBar* CreateToolBar(long style = wxBORDER_NONE | wxTB_HORIZONTAL,
|
2008-10-28 11:36:26 -04:00
|
|
|
wxWindowID id = wxID_ANY,
|
|
|
|
const wxString& name = wxToolBarNameStr);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-09-25 16:00:31 -04:00
|
|
|
Returns the origin of the frame client area (in client coordinates).
|
|
|
|
It may be different from (0, 0) if the frame has a toolbar.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual wxPoint GetClientAreaOrigin() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns a pointer to the menubar currently associated with the frame (if any).
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SetMenuBar(), wxMenuBar, wxMenu
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual wxMenuBar* GetMenuBar() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-09-25 16:00:31 -04:00
|
|
|
Returns a pointer to the status bar currently associated with the frame
|
|
|
|
(if any).
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see CreateStatusBar(), wxStatusBar
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual wxStatusBar* GetStatusBar() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the status bar pane used to display menu and toolbar help.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SetStatusBarPane()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
int GetStatusBarPane() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns a pointer to the toolbar currently associated with the frame (if any).
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see CreateToolBar(), wxToolBar, SetToolBar()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual wxToolBar* GetToolBar() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Virtual function called when a status bar is requested by CreateStatusBar().
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param number
|
2008-03-09 08:33:59 -04:00
|
|
|
The number of fields to create.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-03-09 08:33:59 -04:00
|
|
|
The window style. See wxStatusBar for a list
|
|
|
|
of valid styles.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param id
|
2008-03-09 08:33:59 -04:00
|
|
|
The window identifier. If -1, an identifier will be chosen by
|
|
|
|
wxWidgets.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param name
|
2008-03-09 08:33:59 -04:00
|
|
|
The window name.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return A status bar object.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks An application can override this function to return a different
|
2008-03-09 08:33:59 -04:00
|
|
|
kind of status bar. The default implementation returns
|
|
|
|
an instance of wxStatusBar.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see CreateStatusBar(), wxStatusBar.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual wxStatusBar* OnCreateStatusBar(int number, long style,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& name);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Virtual function called when a toolbar is requested by CreateToolBar().
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-03-09 08:33:59 -04:00
|
|
|
The toolbar style. See wxToolBar for a list
|
|
|
|
of valid styles.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param id
|
2008-03-09 08:33:59 -04:00
|
|
|
The toolbar window identifier. If -1, an identifier will be chosen by
|
|
|
|
wxWidgets.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param name
|
2008-03-09 08:33:59 -04:00
|
|
|
The toolbar window name.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return A toolbar object.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks An application can override this function to return a different
|
2008-03-09 08:33:59 -04:00
|
|
|
kind of toolbar. The default implementation returns an
|
|
|
|
instance of wxToolBar.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see CreateToolBar(), wxToolBar.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual wxToolBar* OnCreateToolBar(long style, wxWindowID id,
|
|
|
|
const wxString& name);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Simulate a menu command.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param id
|
2008-03-09 08:33:59 -04:00
|
|
|
The identifier for a menu item.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-11-09 11:46:52 -05:00
|
|
|
bool ProcessCommand(int id);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Tells the frame to show the given menu bar.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param menuBar
|
2008-03-09 08:33:59 -04:00
|
|
|
The menu bar to associate with the frame.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks If the frame is destroyed, the menu bar and its menus will be
|
2008-03-09 08:33:59 -04:00
|
|
|
destroyed also, so do not delete the menu bar
|
|
|
|
explicitly (except by resetting the frame's menu bar to
|
|
|
|
another frame or @NULL).
|
2008-09-25 16:00:31 -04:00
|
|
|
Under Windows, a size event is generated, so be sure to
|
|
|
|
initialize data members properly before calling SetMenuBar().
|
|
|
|
Note that on some platforms, it is not possible to call this
|
|
|
|
function twice for the same frame object.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see GetMenuBar(), wxMenuBar, wxMenu.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual void SetMenuBar(wxMenuBar* menuBar);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Associates a status bar with the frame.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see CreateStatusBar(), wxStatusBar, GetStatusBar()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual void SetStatusBar(wxStatusBar* statusBar);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Set the status bar pane used to display menu and toolbar help.
|
|
|
|
Using -1 disables help display.
|
|
|
|
*/
|
|
|
|
void SetStatusBarPane(int n);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the status bar text and redraws the status bar.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param text
|
2008-03-09 08:33:59 -04:00
|
|
|
The text for the status field.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param number
|
2008-03-09 08:33:59 -04:00
|
|
|
The status field (starting from zero).
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks Use an empty string to clear the status bar.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see CreateStatusBar(), wxStatusBar
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual void SetStatusText(const wxString& text, int number = 0);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the widths of the fields in the status bar.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param n
|
2008-03-09 08:33:59 -04:00
|
|
|
The number of fields in the status bar. It must be the
|
|
|
|
same used in CreateStatusBar.
|
2008-11-03 06:57:07 -05:00
|
|
|
@param widths_field
|
2008-03-09 08:33:59 -04:00
|
|
|
Must contain an array of n integers, each of which is a status field width
|
|
|
|
in pixels. A value of -1 indicates that the field is variable width; at
|
2008-09-25 16:00:31 -04:00
|
|
|
least one field must be -1. You should delete this array after calling
|
|
|
|
SetStatusWidths().
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks The widths of the variable fields are calculated from the total
|
2008-03-09 08:33:59 -04:00
|
|
|
width of all fields, minus the sum of widths of the
|
2008-09-25 16:00:31 -04:00
|
|
|
non-variable fields, divided by the number of variable fields.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-28 11:36:26 -04:00
|
|
|
virtual void SetStatusWidths(int n, const int* widths_field);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Associates a toolbar with the frame.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual void SetToolBar(wxToolBar* toolBar);
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|