X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/674d80a76ff5db54cfb03de20853fba6d739832a..c86b476dd540ac302ad023dc864c7c7d4f9ed823:/interface/wx/frame.h diff --git a/interface/wx/frame.h b/interface/wx/frame.h index cf016028d8..92a9479fc4 100644 --- a/interface/wx/frame.h +++ b/interface/wx/frame.h @@ -156,12 +156,12 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = "frame"); + const wxString& name = wxFrameNameStr); /** Destructor. Destroys all child windows and menu bar if present. */ - ~wxFrame(); + virtual ~wxFrame(); /** Centres the frame on the display. @@ -175,12 +175,11 @@ public: Used in two-step frame construction. See wxFrame() for further details. */ - bool Create(wxWindow* parent, wxWindowID id, - const wxString& title, + 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"); + const wxString& name = wxFrameNameStr); /** Creates a status bar at the bottom of the frame. @@ -205,10 +204,9 @@ public: @see SetStatusText(), OnCreateStatusBar(), GetStatusBar() */ - virtual wxStatusBar* CreateStatusBar(int number = 1, - long style = 0, - wxWindowID id = -1, - const wxString& name = "statusBar"); + virtual wxStatusBar* CreateStatusBar(int number = 1, long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE, + wxWindowID id = 0, + const wxString& name = wxStatusLineNameStr); /** Creates a toolbar at the top or left of the frame. @@ -224,38 +222,37 @@ public: @return A pointer to the toolbar if it was created successfully, @NULL otherwise. - @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 OnCreateToolBar(). - 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. + @remarks + By default, the toolbar is an instance of wxToolBar. + To use a different class, override OnCreateToolBar(). + 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() */ virtual wxToolBar* CreateToolBar(long style = wxBORDER_NONE | wxTB_HORIZONTAL, - wxWindowID id = -1, - const wxString& name = "toolBar"); + wxWindowID id = wxID_ANY, + const wxString& name = wxToolBarNameStr); /** Returns the origin of the frame client area (in client coordinates). It may be different from (0, 0) if the frame has a toolbar. */ - wxPoint GetClientAreaOrigin() const; + virtual wxPoint GetClientAreaOrigin() const; /** Returns a pointer to the menubar currently associated with the frame (if any). @see SetMenuBar(), wxMenuBar, wxMenu */ - wxMenuBar* GetMenuBar() const; + virtual wxMenuBar* GetMenuBar() const; /** Returns a pointer to the status bar currently associated with the frame @@ -263,21 +260,21 @@ public: @see CreateStatusBar(), wxStatusBar */ - wxStatusBar* GetStatusBar() const; + virtual wxStatusBar* GetStatusBar() const; /** Returns the status bar pane used to display menu and toolbar help. @see SetStatusBarPane() */ - int GetStatusBarPane(); + int GetStatusBarPane() const; /** Returns a pointer to the toolbar currently associated with the frame (if any). @see CreateToolBar(), wxToolBar, SetToolBar() */ - wxToolBar* GetToolBar() const; + virtual wxToolBar* GetToolBar() const; /** Virtual function called when a status bar is requested by CreateStatusBar(). @@ -334,7 +331,7 @@ public: @param id The identifier for a menu item. */ - void ProcessCommand(int id); + bool ProcessCommand(int id); /** Tells the frame to show the given menu bar. @@ -353,14 +350,14 @@ public: @see GetMenuBar(), wxMenuBar, wxMenu. */ - void SetMenuBar(wxMenuBar* menuBar); + virtual void SetMenuBar(wxMenuBar* menuBar); /** Associates a status bar with the frame. @see CreateStatusBar(), wxStatusBar, GetStatusBar() */ - void SetStatusBar(wxStatusBar* statusBar); + virtual void SetStatusBar(wxStatusBar* statusBar); /** Set the status bar pane used to display menu and toolbar help. @@ -388,7 +385,7 @@ public: @param n The number of fields in the status bar. It must be the same used in CreateStatusBar. - @param widths + @param widths_field 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 @@ -398,11 +395,11 @@ public: width of all fields, minus the sum of widths of the non-variable fields, divided by the number of variable fields. */ - virtual void SetStatusWidths(int n, int* widths); + virtual void SetStatusWidths(int n, const int* widths_field); /** Associates a toolbar with the frame. */ - void SetToolBar(wxToolBar* toolBar); + virtual void SetToolBar(wxToolBar* toolBar); };