1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxStatusBar class interface
4 // Author: Vadim Zeitlin
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_STATUSBR_H_BASE_
13 #define _WX_STATUSBR_H_BASE_
15 #include "wx/window.h"
19 // ----------------------------------------------------------------------------
20 // wxStatusBar: a window near the bottom of the frame used for status info
21 // ----------------------------------------------------------------------------
23 class WXDLLEXPORT wxStatusBarBase
: public wxWindow
26 wxStatusBarBase() { m_statusWidths
= NULL
; }
28 // get/set the number of fields
29 virtual void SetFieldsCount(int number
= 1,
30 const int *widths
= (const int *) NULL
) = 0;
31 int GetFieldsCount() const { return m_nFields
; }
33 // get/set the text of the given field
34 virtual void SetStatusText(const wxString
& text
, int number
= 0) = 0;
35 virtual wxString
GetStatusText(int number
= 0) const = 0;
37 // set status line widths (n should be the same as field count)
38 virtual void SetStatusWidths(int n
, const int widths
[]) = 0;
40 // Get the position and size of the field's internal bounding rectangle
41 virtual bool GetFieldRect(int i
, wxRect
& rect
) const = 0;
43 // sets the minimal vertical size of the status bar
44 virtual void SetMinHeight(int height
) = 0;
46 // get the dimensions of the horizontal and vertical borders
47 virtual int GetBorderX() const = 0;
48 virtual int GetBorderY() const = 0;
50 // don't want status bars to accept the focus at all
51 virtual bool AcceptsFocus() const { return FALSE
; }
54 int m_nFields
; // the current number of fields
55 int *m_statusWidths
; // the width (if !NULL) of the fields
58 #if defined(__WIN32__) && wxUSE_NATIVE_STATUSBAR
59 #include "wx/msw/statbr95.h"
61 typedef wxStatusBar95 wxStatusBarReal
;
62 #elif defined(__WXMAC__)
63 #include "wx/generic/statusbr.h"
64 #include "wx/mac/statusbr.h"
66 typedef wxStatusBarMac wxStatusBarReal
;
68 #include "wx/generic/statusbr.h"
70 typedef wxStatusBarGeneric wxStatusBarReal
;
73 // we can't just typedef wxStatusBar to be one of 95/Generic because we should
74 // be able to forward declare it (done in several places) and because wxWin
75 // RTTI wouldn't work then
76 class WXDLLEXPORT wxStatusBar
: public wxStatusBarReal
80 wxStatusBar(wxWindow
*parent
,
82 const wxPoint
& WXUNUSED(pos
) = wxDefaultPosition
,
83 const wxSize
& WXUNUSED(size
) = wxDefaultSize
,
84 long style
= wxST_SIZEGRIP
,
85 const wxString
& name
= wxPanelNameStr
)
87 Create(parent
, id
, style
, name
);
89 wxStatusBar(wxWindow
*parent
,
92 const wxString
& name
= wxPanelNameStr
)
94 Create(parent
, id
, style
, name
);
98 DECLARE_DYNAMIC_CLASS(wxStatusBar
)
104 // _WX_STATUSBR_H_BASE_