X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/71e030352d74e4e6aed28cfcb0ea6edf3d17af6e..b6e2eddeaf7e559589ce41ac41e88f9bd71c5a08:/include/wx/statusbr.h?ds=sidebyside diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h index adc1bf5946..515417d7ad 100644 --- a/include/wx/statusbr.h +++ b/include/wx/statusbr.h @@ -6,13 +6,13 @@ // Created: 05.02.00 // RCS-ID: $Id$ // Copyright: (c) wxWindows team -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_STATUSBR_H_BASE_ #define _WX_STATUSBR_H_BASE_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "statbar.h" #endif @@ -20,6 +20,11 @@ #if wxUSE_STATUSBAR +#include "wx/list.h" +#include "wx/dynarray.h" + +WX_DECLARE_LIST(wxString, wxListString); + // ---------------------------------------------------------------------------- // wxStatusBar: a window near the bottom of the frame used for status info // ---------------------------------------------------------------------------- @@ -45,6 +50,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 +90,30 @@ 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; + + DECLARE_NO_COPY_CLASS(wxStatusBarBase) }; // ----------------------------------------------------------------------------