]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/statusbr.h
wxFileDialog's report/list view icons changed to some visually more different
[wxWidgets.git] / include / wx / generic / statusbr.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statusbr.h
3 // Purpose: wxStatusBar class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __STATUSBRH_G__
13 #define __STATUSBRH_G__
14
15 #ifdef __GNUG__
16 #pragma interface "statusbr.h"
17 #endif
18
19 #include "wx/window.h"
20 #include "wx/pen.h"
21 #include "wx/font.h"
22
23 WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
24
25 class WXDLLEXPORT wxStatusBar: public wxWindow
26 {
27 DECLARE_DYNAMIC_CLASS(wxStatusBar)
28
29 public:
30 wxStatusBar(void);
31 inline wxStatusBar(wxWindow *parent, wxWindowID id,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 long style = 0,
35 const wxString& name = wxPanelNameStr)
36 {
37 Create(parent, id, pos, size, style, name);
38 }
39
40 ~wxStatusBar();
41
42 bool Create(wxWindow *parent, wxWindowID id,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 long style = 0,
46 const wxString& name = wxPanelNameStr);
47
48 // Create status line
49 virtual void SetFieldsCount(int number=1, const int widths[] = (const int *) NULL);
50 inline int GetFieldsCount() const { return m_nFields; }
51
52 // Set status line text
53 virtual void SetStatusText(const wxString& text, int number = 0);
54 virtual wxString GetStatusText(int number = 0) const;
55
56 // Set status line widths
57 virtual void SetStatusWidths(int n, const int widths_field[]);
58
59 virtual void DrawFieldText(wxDC& dc, int i);
60 virtual void DrawField(wxDC& dc, int i);
61
62 // Get the position and size of the field's internal bounding rectangle
63 virtual bool GetFieldRect(int i, wxRect& rect) const;
64
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);
69
70 ////////////////////////////////////////////////////////////////////////
71 // Implementation
72
73 void OnPaint(wxPaintEvent& event);
74
75 virtual void InitColours();
76
77 // Responds to colour changes
78 void OnSysColourChanged(wxSysColourChangedEvent& event);
79
80 protected:
81 int * m_statusWidths;
82 int m_nFields;
83 wxString * m_statusStrings;
84 int m_borderX;
85 int m_borderY;
86 wxFont m_defaultStatusBarFont;
87 wxPen m_mediumShadowPen;
88 wxPen m_hilightPen;
89
90 DECLARE_EVENT_TABLE()
91 };
92
93 #endif
94 // __STATUSBRH_G__