// 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
#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
// ----------------------------------------------------------------------------
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
// -------------
// 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)
};
// ----------------------------------------------------------------------------
#if defined(__WXUNIVERSAL__)
#define wxStatusBarUniv wxStatusBar
- #define sm_classwxStatusBarUniv sm_classwxStatusBar
#include "wx/univ/statusbr.h"
#elif defined(__WIN32__) && wxUSE_NATIVE_STATUSBAR
#define wxStatusBar95 wxStatusBar
- #define sm_classwxStatusBar95 sm_classwxStatusBar
#include "wx/msw/statbr95.h"
#elif defined(__WXMAC__)
#define wxStatusBarMac wxStatusBar
- #define sm_classwxStatusBarMac sm_classwxStatusBar
#include "wx/generic/statusbr.h"
#include "wx/mac/statusbr.h"
#else
#define wxStatusBarGeneric wxStatusBar
- #define sm_classwxStatusBarGeneric sm_classwxStatusBar
#include "wx/generic/statusbr.h"
#endif