Implemented wxStatusBar::Push/PopStatusText.

Implemented wxFrame::Push/PopSTatusText ( just forward to the status bar ).
Implemented wxFrame::DoGiveHelp, to show menu/toolbar help in the status bar.
Added Get/SetStatusBarPane to get/set the status bar pane the menu/toolbar help
  will be show in


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2002-05-02 20:07:10 +00:00
parent fe87983b95
commit 1f361cddbf
7 changed files with 182 additions and 57 deletions

View File

@@ -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;
};
// ----------------------------------------------------------------------------