X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/71e030352d74e4e6aed28cfcb0ea6edf3d17af6e..aa8e9a36c47673613f080d7578e771fe62261ef1:/include/wx/statusbr.h?ds=sidebyside diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h index adc1bf5946..103e8479f7 100644 --- a/include/wx/statusbr.h +++ b/include/wx/statusbr.h @@ -20,6 +20,10 @@ #if wxUSE_STATUSBAR +#include "wx/list.h" + +WX_DECLARE_LIST(wxString, wxListString); + // ---------------------------------------------------------------------------- // wxStatusBar: a window near the bottom of the frame used for status info // ---------------------------------------------------------------------------- @@ -45,6 +49,9 @@ public: virtual void SetStatusText(const wxString& text, int number = 0) = 0; virtual wxString GetStatusText(int number = 0) const = 0; + void PushStatusText(const wxString& text, int number = 0); + void PopStatusText(int number = 0); + // fields widths // ------------- @@ -82,15 +89,28 @@ protected: // reset the widths void ReinitWidths() { FreeWidths(); InitWidths(); } + // same, for text stacks + void InitStacks(); + void FreeStacks(); + void ReinitStacks() { FreeStacks(); InitStacks(); } + // calculate the real field widths for the given total available size wxArrayInt CalculateAbsWidths(wxCoord widthTotal) const; + // use these functions to access the stacks of field strings + wxListString *GetStatusStack(int i) const; + wxListString *GetOrCreateStatusStack(int i); + // the current number of fields int m_nFields; // the widths of the fields in pixels if !NULL, all fields have the same // width otherwise int *m_statusWidths; + + // stacks of previous values for PushStatusText/PopStatusText + // this is created on demand, use GetStatusStack/GetOrCreateStatusStack + wxListString **m_statusTextStacks; }; // ----------------------------------------------------------------------------