.\" This is a wxWidgets manpage page generated from the XML docs .TH wxFrame 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxFrame \- Normal frame .SH DESCRIPTION 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. 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. Default event processing wxFrame processes the following events: 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. .SH 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. .SH "PARENTS" wxTopLevelWindow wxWindow wxEvtHandler wxObject .SH "INCLUDE FILES" wx/frame.h .SH MEMBERS .SS wxFrame () Default constructor. .SS wxFrame (wxWindow* parentwxWindowID idconst wxString& titleconst wxPoint& pos = wxDefaultPositionconst wxSize& size = wxDefaultSizelong style = wxDEFAULT_FRAME_STYLEconst wxString& name = ``frame") Constructor, creating the window. .SS void ~wxFrame () Destructor. Destroys all child windows and menu bar if present. .SS void Centre (int direction = wxBOTH) Centres the frame on the display. .SS bool Create (wxWindow* parentwxWindowID idconst wxString& titleconst wxPoint& pos = wxDefaultPositionconst wxSize& size = wxDefaultSizelong style = wxDEFAULT_FRAME_STYLEconst wxString& name = ``frame") Used in two-step frame construction. See wxFrame::wxFrame for further details. .SS virtual wxStatusBar* CreateStatusBar (int number = 1long style = 0wxWindowID id = -1const wxString& name = "statusBar") Creates a status bar at the bottom of the frame. .SS virtual wxToolBar* CreateToolBar (long style = wxNO_BORDERwxWindowID id = -1const wxString& name = "toolBar") Creates a toolbar at the top or left of the frame. .SS wxPoint GetClientAreaOrigin () Returns the origin of the frame client area (in client coordinates). It may be different from (0, 0) if the frame has a toolbar. .SS wxMenuBar* GetMenuBar () .SS wxStatusBar* GetStatusBar () .SS int GetStatusBarPane () Returns the status bar pane used to display menu and toolbar help. .SS wxToolBar* GetToolBar () .SS virtual wxStatusBar* OnCreateStatusBar (int numberlong stylewxWindowID idconst wxString& name) .SS virtual wxToolBar* OnCreateToolBar (long stylewxWindowID idconst wxString& name) .SS void ProcessCommand (int id) Simulate a menu command. .SS void SendSizeEvent () This function sends a dummy size event to the frame forcing it to reevaluate its children positions. It is sometimes useful to call this function after adding or deleting a children after the frame creation or if a child size changes. Note that if the frame is using either sizers or constraints for the children layout, it is enough to call Layout() directly and this function should not be used in this case. .SS void SetMenuBar (wxMenuBar* menuBar) .SS void SetStatusBar (wxStatusBar* statusBar) .SS void SetStatusBarPane (int n) Set the status bar pane used to display menu and toolbar help. Using -1 disables help display. .SS virtual void SetStatusText (const wxString& textint number = 0) .SS virtual void SetStatusWidths (int nint *widths) Sets the widths of the fields in the status bar. .SS void SetToolBar (wxToolBar* toolBar) .SH "WINDOW STYLES" .SS wxDEFAULT_FRAME_STYLE Defined as wxMINIMIZE_BOX \pipe wxMAXIMIZE_BOX \pipe wxRESIZE_BORDER \pipe wxSYSTEM_MENU \pipe wxCAPTION \pipe wxCLOSE_BOX \pipe wxCLIP_CHILDREN . .SS wxICONIZE Display the frame iconized (minimized). Windows only. .SS wxCAPTION Puts a caption on the frame. .SS wxMINIMIZE Identical to wxICONIZE . Windows only. .SS wxMINIMIZE_BOX Displays a minimize box on the frame. .SS wxMAXIMIZE Displays the frame maximized. Windows only. .SS wxMAXIMIZE_BOX Displays a maximize box on the frame. .SS wxCLOSE_BOX Displays a close box on the frame. .SS wxSTAY_ON_TOP wxSTAY_ON_TOP .SS wxSYSTEM_MENU Displays a system menu. .SS wxRESIZE_BORDER Displays a resizeable border around the window. .SS wxFRAME_TOOL_WINDOW wxFRAME_TOOL_WINDOW .SS wxFRAME_NO_TASKBAR wxFRAME_NO_TASKBAR .SS wxFRAME_FLOAT_ON_PARENT wxFRAME_FLOAT_ON_PARENT .SS wxFRAME_EX_CONTEXTHELP wxFRAME_EX_CONTEXTHELP .SS wxFRAME_SHAPED wxFRAME_SHAPED .SS wxFRAME_EX_METAL On Mac OS X, frames with this style will be shown with a metallic look. This is an extra style. .SH "SEE ALSO" wxTopLevelWindow wxWindow wxEvtHandler wxObject wxMDIParentFrame wxMDIChildFrame , wxMiniFrame wxDialog .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.