]> git.saurik.com Git - wxWidgets.git/blame - include/wx/statusbr.h
added GetMargins()
[wxWidgets.git] / include / wx / statusbr.h
CommitLineData
ed791986
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/statusbr.h
3// Purpose: wxStatusBar class interface
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 05.02.00
7// RCS-ID: $Id$
8// Copyright: (c) wxWindows team
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_STATUSBR_H_BASE_
13#define _WX_STATUSBR_H_BASE_
c801d85f 14
ed791986
VZ
15#include "wx/window.h"
16
17// ----------------------------------------------------------------------------
18// wxStatusBar: a window near the bottom of the frame used for status info
19// ----------------------------------------------------------------------------
20
21class WXDLLEXPORT wxStatusBarBase : public wxWindow
22{
23public:
24 wxStatusBarBase() { m_statusWidths = NULL; }
25
26 // get/set the number of fields
27 virtual void SetFieldsCount(int number = 1,
28 const int *widths = (const int *) NULL) = 0;
29 int GetFieldsCount() const { return m_nFields; }
30
31 // get/set the text of the given field
32 virtual void SetStatusText(const wxString& text, int number = 0) = 0;
33 virtual wxString GetStatusText(int number = 0) const = 0;
34
35 // set status line widths (n should be the same as field count)
36 virtual void SetStatusWidths(int n, const int widths[]) = 0;
37
38 // Get the position and size of the field's internal bounding rectangle
39 virtual bool GetFieldRect(int i, wxRect& rect) const = 0;
40
41 // sets the minimal vertical size of the status bar
42 virtual void SetMinHeight(int height) = 0;
43
44 // get the dimensions of the horizontal and vertical borders
45 virtual int GetBorderX() const = 0;
46 virtual int GetBorderY() const = 0;
47
48protected:
49 int m_nFields; // the current number of fields
50 int *m_statusWidths; // the width (if !NULL) of the fields
51};
52
53#if defined(__WIN32__) && wxUSE_NATIVE_STATUSBAR
54 #include "wx/msw/statbr95.h"
55
56 typedef wxStatusBar95 wxStatusBarReal;
03e11df5 57#elif defined(__WXMAC__) && !defined(__UNIX__)
a02bb143
SC
58 #include "wx/mac/statusbr.h"
59
60 typedef wxStatusBarMac wxStatusBarReal;
ed791986
VZ
61#else
62 #include "wx/generic/statusbr.h"
63
64 typedef wxStatusBarGeneric wxStatusBarReal;
65#endif
66
67// we can't just typedef wxStatusBar to be one of 95/Generic because we should
68// be able to forward declare it (done in several places) and because wxWin
69// RTTI wouldn't work then
f6bcfd97 70class WXDLLEXPORT wxStatusBar : public wxStatusBarReal
ed791986
VZ
71{
72public:
73 wxStatusBar() { }
74 wxStatusBar(wxWindow *parent,
75 wxWindowID id,
76 const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
77 const wxSize& WXUNUSED(size) = wxDefaultSize,
43b5058d 78 long style = wxST_SIZEGRIP,
ed791986
VZ
79 const wxString& name = wxPanelNameStr)
80 {
81 Create(parent, id, style, name);
82 }
83 wxStatusBar(wxWindow *parent,
84 wxWindowID id,
85 long style,
86 const wxString& name = wxPanelNameStr)
87 {
88 Create(parent, id, style, name);
89 }
90
91private:
92 DECLARE_DYNAMIC_CLASS(wxStatusBar)
93};
c801d85f
KB
94
95#endif
34138703 96 // _WX_STATUSBR_H_BASE_