X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..c7d9c476ea807927781813bca979e9f793599229:/include/wx/statusbr.h diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h index 49ae99e24e..66ec068c96 100644 --- a/include/wx/statusbr.h +++ b/include/wx/statusbr.h @@ -39,14 +39,16 @@ class wxStatusBarPane { public: wxStatusBarPane(int style = wxSB_NORMAL, size_t width = 0) - : nStyle(style), nWidth(width) {} + : nStyle(style), nWidth(width) { arrStack.Add(wxEmptyString); } int nStyle; int nWidth; // the width maybe negative, indicating a variable-width field // this is the array of the stacked strings of this pane; note that this - // stack does not include the string currently displayed in this pane - // as it's stored in the native status bar control + // stack does include also the string currently displayed in this pane + // as the version stored in the native status bar control is possibly + // ellipsized; note that arrStack.Last() is the top of the stack + // (i.e. the string shown in the status bar) wxArrayString arrStack; }; @@ -74,8 +76,10 @@ public: // field text // ---------- - virtual void SetStatusText(const wxString& text, int number = 0) = 0; - virtual wxString GetStatusText(int number = 0) const = 0; + virtual void SetStatusText(const wxString& text, int number = 0) + { m_panes[number].arrStack.Last() = text; } + virtual wxString GetStatusText(int number = 0) const + { return m_panes[number].arrStack.Last(); } void PushStatusText(const wxString& text, int number = 0); void PopStatusText(int number = 0);