wxWidgets/include/wx/statusbr.h
Vadim Zeitlin 43b5058d59 1. status bar can now be positioned on top (and anywhere, in fact)
2. status bar without wxST_SIZEGRIP style won't have the size grip (wow)
3. scrollbars don't get the cursor of the main window any more
4. introduced wxSetCursorEvent and use it in wxSplitterWindow


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-14 00:45:54 +00:00

93 lines
2.9 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/statusbr.h
// Purpose: wxStatusBar class interface
// Author: Vadim Zeitlin
// Modified by:
// Created: 05.02.00
// RCS-ID: $Id$
// Copyright: (c) wxWindows team
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_STATUSBR_H_BASE_
#define _WX_STATUSBR_H_BASE_
#include "wx/window.h"
// ----------------------------------------------------------------------------
// wxStatusBar: a window near the bottom of the frame used for status info
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxStatusBarBase : public wxWindow
{
public:
wxStatusBarBase() { m_statusWidths = NULL; }
// get/set the number of fields
virtual void SetFieldsCount(int number = 1,
const int *widths = (const int *) NULL) = 0;
int GetFieldsCount() const { return m_nFields; }
// get/set the text of the given field
virtual void SetStatusText(const wxString& text, int number = 0) = 0;
virtual wxString GetStatusText(int number = 0) const = 0;
// set status line widths (n should be the same as field count)
virtual void SetStatusWidths(int n, const int widths[]) = 0;
// Get the position and size of the field's internal bounding rectangle
virtual bool GetFieldRect(int i, wxRect& rect) const = 0;
// sets the minimal vertical size of the status bar
virtual void SetMinHeight(int height) = 0;
// get the dimensions of the horizontal and vertical borders
virtual int GetBorderX() const = 0;
virtual int GetBorderY() const = 0;
protected:
int m_nFields; // the current number of fields
int *m_statusWidths; // the width (if !NULL) of the fields
};
#if defined(__WIN32__) && wxUSE_NATIVE_STATUSBAR
#include "wx/msw/statbr95.h"
typedef wxStatusBar95 wxStatusBarReal;
#else
#include "wx/generic/statusbr.h"
typedef wxStatusBarGeneric wxStatusBarReal;
#endif
// we can't just typedef wxStatusBar to be one of 95/Generic because we should
// be able to forward declare it (done in several places) and because wxWin
// RTTI wouldn't work then
class wxStatusBar : public wxStatusBarReal
{
public:
wxStatusBar() { }
wxStatusBar(wxWindow *parent,
wxWindowID id,
const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
const wxSize& WXUNUSED(size) = wxDefaultSize,
long style = wxST_SIZEGRIP,
const wxString& name = wxPanelNameStr)
{
Create(parent, id, style, name);
}
wxStatusBar(wxWindow *parent,
wxWindowID id,
long style,
const wxString& name = wxPanelNameStr)
{
Create(parent, id, style, name);
}
private:
DECLARE_DYNAMIC_CLASS(wxStatusBar)
};
#endif
// _WX_STATUSBR_H_BASE_