#include <wx/frame.h>

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.
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.
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; 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.Styles:
wxDEFAULT_FRAME_STYLE & ~(wxRESIZE_BORDER | wxMAXIMIZE_BOX)
See also the Window Styles.
Extra styles:
Public Member Functions | |
| wxFrame () | |
| wxFrame (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name="frame") | |
| virtual | ~wxFrame () |
| void | Centre (int direction=wxBOTH) |
| bool | Create (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name="frame") |
| virtual wxStatusBar * | CreateStatusBar (int number=1, long style=0, wxWindowID id=-1, const wxString &name="statusBar") |
| virtual wxToolBar * | CreateToolBar (long style=wxBORDER_NONE|wxTB_HORIZONTAL, wxWindowID id=-1, const wxString &name="toolBar") |
| virtual wxPoint | GetClientAreaOrigin () const |
| virtual wxMenuBar * | GetMenuBar () const |
| virtual wxStatusBar * | GetStatusBar () const |
| int | GetStatusBarPane () const |
| virtual wxToolBar * | GetToolBar () const |
| virtual wxStatusBar * | OnCreateStatusBar (int number, long style, wxWindowID id, const wxString &name) |
| virtual wxToolBar * | OnCreateToolBar (long style, wxWindowID id, const wxString &name) |
| void | ProcessCommand (int id) |
| virtual void | SetMenuBar (wxMenuBar *menuBar) |
| virtual void | SetStatusBar (wxStatusBar *statusBar) |
| void | SetStatusBarPane (int n) |
| virtual void | SetStatusText (const wxString &text, int number=0) |
| virtual void | SetStatusWidths (int n, int *widths) |
| virtual void | SetToolBar (wxToolBar *toolBar) |
| wxFrame::wxFrame | ( | ) |
Default constructor.
| wxFrame::wxFrame | ( | wxWindow * | parent, | |
| wxWindowID | id, | |||
| const wxString & | title, | |||
| const wxPoint & | pos = wxDefaultPosition, |
|||
| const wxSize & | size = wxDefaultSize, |
|||
| long | style = wxDEFAULT_FRAME_STYLE, |
|||
| const wxString & | name = "frame" | |||
| ) |
Constructor, creating the window.
| 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. | |
| id | The window identifier. It may take a value of -1 to indicate a default value. | |
| title | The caption to be displayed on the frame's title bar. | |
| pos | The window position. The value wxDefaultPosition indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform. | |
| size | The window size. The value wxDefaultSize indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform. | |
| style | The window style. See wxFrame class description. | |
| 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. |
| virtual wxFrame::~wxFrame | ( | ) | [virtual] |
Destructor. Destroys all child windows and menu bar if present.
| void wxFrame::Centre | ( | int | direction = wxBOTH |
) |
Centres the frame on the display.
| direction | The parameter may be wxHORIZONTAL, wxVERTICAL or wxBOTH. |
Reimplemented from wxWindow.
| bool wxFrame::Create | ( | wxWindow * | parent, | |
| wxWindowID | id, | |||
| const wxString & | title, | |||
| const wxPoint & | pos = wxDefaultPosition, |
|||
| const wxSize & | size = wxDefaultSize, |
|||
| long | style = wxDEFAULT_FRAME_STYLE, |
|||
| const wxString & | name = "frame" | |||
| ) |
Used in two-step frame construction. See wxFrame() for further details.
Reimplemented in wxMDIParentFrame, wxMDIChildFrame, and wxMiniFrame.
| virtual wxStatusBar* wxFrame::CreateStatusBar | ( | int | number = 1, |
|
| long | style = 0, |
|||
| wxWindowID | id = -1, |
|||
| const wxString & | name = "statusBar" | |||
| ) | [virtual] |
Creates a status bar at the bottom of the frame.
| number | The number of fields to create. Specify a value greater than 1 to create a multi-field status bar. | |
| style | The status bar style. See wxStatusBar for a list of valid styles. | |
| id | The status bar window identifier. If -1, an identifier will be chosen by wxWidgets. | |
| name | The status bar window name. |
| virtual wxToolBar* wxFrame::CreateToolBar | ( | long | style = wxBORDER_NONE|wxTB_HORIZONTAL, |
|
| wxWindowID | id = -1, |
|||
| const wxString & | name = "toolBar" | |||
| ) | [virtual] |
Creates a toolbar at the top or left of the frame.
| style | The toolbar style. See wxToolBar for a list of valid styles. | |
| id | The toolbar window identifier. If -1, an identifier will be chosen by wxWidgets. | |
| name | The toolbar window name. |
| virtual wxPoint wxFrame::GetClientAreaOrigin | ( | ) | const [virtual] |
Returns the origin of the frame client area (in client coordinates). It may be different from (0, 0) if the frame has a toolbar.
| virtual wxMenuBar* wxFrame::GetMenuBar | ( | ) | const [virtual] |
Returns a pointer to the menubar currently associated with the frame (if any).
| virtual wxStatusBar* wxFrame::GetStatusBar | ( | ) | const [virtual] |
Returns a pointer to the status bar currently associated with the frame (if any).
| int wxFrame::GetStatusBarPane | ( | ) | const |
| virtual wxToolBar* wxFrame::GetToolBar | ( | ) | const [virtual] |
Returns a pointer to the toolbar currently associated with the frame (if any).
Reimplemented in wxMDIParentFrame.
| virtual wxStatusBar* wxFrame::OnCreateStatusBar | ( | int | number, | |
| long | style, | |||
| wxWindowID | id, | |||
| const wxString & | name | |||
| ) | [virtual] |
Virtual function called when a status bar is requested by CreateStatusBar().
| number | The number of fields to create. | |
| style | The window style. See wxStatusBar for a list of valid styles. | |
| id | The window identifier. If -1, an identifier will be chosen by wxWidgets. | |
| name | The window name. |
| virtual wxToolBar* wxFrame::OnCreateToolBar | ( | long | style, | |
| wxWindowID | id, | |||
| const wxString & | name | |||
| ) | [virtual] |
Virtual function called when a toolbar is requested by CreateToolBar().
| style | The toolbar style. See wxToolBar for a list of valid styles. | |
| id | The toolbar window identifier. If -1, an identifier will be chosen by wxWidgets. | |
| name | The toolbar window name. |
| void wxFrame::ProcessCommand | ( | int | id | ) |
Simulate a menu command.
| id | The identifier for a menu item. |
| virtual void wxFrame::SetMenuBar | ( | wxMenuBar * | menuBar | ) | [virtual] |
Tells the frame to show the given menu bar.
| menuBar | The menu bar to associate with the frame. |
| virtual void wxFrame::SetStatusBar | ( | wxStatusBar * | statusBar | ) | [virtual] |
| void wxFrame::SetStatusBarPane | ( | int | n | ) |
Set the status bar pane used to display menu and toolbar help. Using -1 disables help display.
| virtual void wxFrame::SetStatusText | ( | const wxString & | text, | |
| int | number = 0 | |||
| ) | [virtual] |
Sets the status bar text and redraws the status bar.
| text | The text for the status field. | |
| number | The status field (starting from zero). |
| virtual void wxFrame::SetStatusWidths | ( | int | n, | |
| int * | widths | |||
| ) | [virtual] |
Sets the widths of the fields in the status bar.
| n | The number of fields in the status bar. It must be the same used in CreateStatusBar. | |
| widths | 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 least one field must be -1. You should delete this array after calling SetStatusWidths(). |
| virtual void wxFrame::SetToolBar | ( | wxToolBar * | toolBar | ) | [virtual] |
Associates a toolbar with the frame.
|
[ top ] |