X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/71e030352d74e4e6aed28cfcb0ea6edf3d17af6e..e143fb636d50d5802dcc8c7c2e9e8e2944afa467:/include/wx/univ/statusbr.h diff --git a/include/wx/univ/statusbr.h b/include/wx/univ/statusbr.h index 804029fbc1..bb5d3435f5 100644 --- a/include/wx/univ/statusbr.h +++ b/include/wx/univ/statusbr.h @@ -12,22 +12,21 @@ #ifndef _WX_UNIV_STATUSBR_H_ #define _WX_UNIV_STATUSBR_H_ -#ifdef __GNUG__ - #pragma interface "univstatusbr.h" -#endif +#include "wx/univ/inpcons.h" +#include "wx/arrstr.h" // ---------------------------------------------------------------------------- -// wxStatusBar: a window near the bottom of the frame used for status info +// wxStatusBarUniv: a window near the bottom of the frame used for status info // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxStatusBarUniv : public wxStatusBarBase, +class WXDLLIMPEXP_CORE wxStatusBarUniv : public wxStatusBarBase, public wxInputConsumer { public: wxStatusBarUniv() { Init(); } wxStatusBarUniv(wxWindow *parent, - wxWindowID id = -1, + wxWindowID id = wxID_ANY, long style = 0, const wxString& name = wxPanelNameStr) { @@ -37,7 +36,7 @@ public: } bool Create(wxWindow *parent, - wxWindowID id = -1, + wxWindowID id = wxID_ANY, long style = 0, const wxString& name = wxPanelNameStr); @@ -47,7 +46,6 @@ public: // get/set the text of the given field virtual void SetStatusText(const wxString& text, int number = 0); - virtual wxString GetStatusText(int number = 0) const; // Get the position and size of the field's internal bounding rectangle virtual bool GetFieldRect(int i, wxRect& rect) const; @@ -59,6 +57,10 @@ public: virtual int GetBorderX() const; virtual int GetBorderY() const; + // wxInputConsumer pure virtual + virtual wxWindow *GetInputWindow() const + { return const_cast(this); } + protected: // recalculate the field widths void OnSize(wxSizeEvent& event); @@ -66,10 +68,6 @@ protected: // draw the statusbar virtual void DoDraw(wxControlRenderer *renderer); - // wxInputConsumer pure virtual - virtual wxWindow *GetInputWindow() const - { return wxConstCast(this, wxStatusBar); } - // tell them about our preferred height virtual wxSize DoGetBestSize() const; @@ -86,6 +84,9 @@ protected: // also updates m_widthsAbs if necessary wxRect GetTotalFieldRect(wxCoord *borderBetweenFields); + // get the rect for this field without ani side effects (see code) + wxRect DoGetFieldRect(int n) const; + // refresh the given field void RefreshField(int i); @@ -93,8 +94,8 @@ protected: void Init(); private: - // the status fields strings - wxArrayString m_statusText; + // the current status fields strings + //wxArrayString m_statusText; // the absolute status fields widths wxArrayInt m_widthsAbs;