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"
23 WXDLLEXPORT_DATA(extern const wxChar
*) wxPanelNameStr
;
25 class WXDLLEXPORT wxStatusBar
: public wxWindow
27 DECLARE_DYNAMIC_CLASS(wxStatusBar
)
31 inline wxStatusBar(wxWindow
*parent
, wxWindowID id
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
35 const wxString
& name
= wxPanelNameStr
)
37 Create(parent
, id
, pos
, size
, style
, name
);
42 bool Create(wxWindow
*parent
, wxWindowID id
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
,
46 const wxString
& name
= wxPanelNameStr
);
49 virtual void SetFieldsCount(int number
=1, const int widths
[] = (const int *) NULL
);
50 inline int GetFieldsCount() const { return m_nFields
; }
52 // Set status line text
53 virtual void SetStatusText(const wxString
& text
, int number
= 0);
54 virtual wxString
GetStatusText(int number
= 0) const;
56 // Set status line widths
57 virtual void SetStatusWidths(int n
, const int widths_field
[]);
59 virtual void DrawFieldText(wxDC
& dc
, int i
);
60 virtual void DrawField(wxDC
& dc
, int i
);
62 // Get the position and size of the field's internal bounding rectangle
63 virtual bool GetFieldRect(int i
, wxRect
& rect
) const;
65 inline int GetBorderX() const { return m_borderX
; }
66 inline int GetBorderY() const { return m_borderY
; }
67 inline void SetBorderX(int x
);
68 inline void SetBorderY(int y
);
70 ////////////////////////////////////////////////////////////////////////
73 void OnPaint(wxPaintEvent
& event
);
75 virtual void InitColours();
77 // Responds to colour changes
78 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
83 wxString
* m_statusStrings
;
86 wxFont m_defaultStatusBarFont
;
87 wxPen m_mediumShadowPen
;