1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxStatusBar class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __STATUSBRH_G__
13 #define __STATUSBRH_G__
16 #pragma interface "statusbr.h"
19 #include "wx/window.h"
21 WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr
;
23 class WXDLLEXPORT wxStatusBar
: public wxWindow
25 DECLARE_DYNAMIC_CLASS(wxStatusBar
)
29 inline wxStatusBar(wxWindow
*parent
, const wxWindowID id
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
33 const wxString
& name
= wxPanelNameStr
)
35 Create(parent
, id
, pos
, size
, style
, name
);
40 bool Create(wxWindow
*parent
, const wxWindowID id
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
,
44 const wxString
& name
= wxPanelNameStr
);
47 virtual void SetFieldsCount(const int number
=1, const int *widths
= NULL
);
48 inline int GetFieldsCount(void) const { return m_nFields
; }
50 // Set status line text
51 virtual void SetStatusText(const wxString
& text
, const int number
= 0);
52 virtual wxString
GetStatusText(const int number
= 0) const;
54 // Set status line widths
55 virtual void SetStatusWidths(const int n
, const int *widths_field
);
57 virtual void DrawFieldText(wxDC
& dc
, const int i
);
58 virtual void DrawField(wxDC
& dc
, const int i
);
60 // Get the position and size of the field's internal bounding rectangle
61 virtual bool GetFieldRect(const int i
, wxRectangle
& rect
) const;
63 inline int GetBorderX(void) const { return m_borderX
; }
64 inline int GetBorderY(void) const { return m_borderY
; }
65 inline void SetBorderX(const int x
);
66 inline void SetBorderY(const int y
);
68 ////////////////////////////////////////////////////////////////////////
71 void OnPaint(wxPaintEvent
& event
);
73 virtual void InitColours(void);
75 // Responds to colour changes
76 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
81 wxString
* m_statusStrings
;
84 wxFont m_defaultStatusBarFont
;
85 wxPen m_mediumShadowPen
;