]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
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 | ||
21 | WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr; | |
22 | ||
23 | class WXDLLEXPORT wxStatusBar: public wxWindow | |
24 | { | |
25 | DECLARE_DYNAMIC_CLASS(wxStatusBar) | |
26 | ||
27 | public: | |
28 | wxStatusBar(void); | |
debe6624 | 29 | inline wxStatusBar(wxWindow *parent, wxWindowID id, |
c801d85f KB |
30 | const wxPoint& pos = wxDefaultPosition, |
31 | const wxSize& size = wxDefaultSize, | |
debe6624 | 32 | long style = 0, |
c801d85f KB |
33 | const wxString& name = wxPanelNameStr) |
34 | { | |
35 | Create(parent, id, pos, size, style, name); | |
36 | } | |
37 | ||
38 | ~wxStatusBar(void); | |
39 | ||
debe6624 | 40 | bool Create(wxWindow *parent, wxWindowID id, |
c801d85f KB |
41 | const wxPoint& pos = wxDefaultPosition, |
42 | const wxSize& size = wxDefaultSize, | |
debe6624 | 43 | long style = 0, |
c801d85f KB |
44 | const wxString& name = wxPanelNameStr); |
45 | ||
46 | // Create status line | |
debe6624 | 47 | virtual void SetFieldsCount(int number=1, int *widths = NULL); |
c801d85f KB |
48 | inline int GetFieldsCount(void) const { return m_nFields; } |
49 | ||
50 | // Set status line text | |
debe6624 JS |
51 | virtual void SetStatusText(const wxString& text, int number = 0); |
52 | virtual wxString GetStatusText(int number = 0) const; | |
c801d85f KB |
53 | |
54 | // Set status line widths | |
debe6624 | 55 | virtual void SetStatusWidths(int n, int *widths_field); |
c801d85f | 56 | |
debe6624 JS |
57 | virtual void DrawFieldText(wxDC& dc, int i); |
58 | virtual void DrawField(wxDC& dc, int i); | |
c801d85f KB |
59 | |
60 | // Get the position and size of the field's internal bounding rectangle | |
debe6624 | 61 | virtual bool GetFieldRect(int i, wxRectangle& rect) const; |
c801d85f KB |
62 | |
63 | inline int GetBorderX(void) const { return m_borderX; } | |
64 | inline int GetBorderY(void) const { return m_borderY; } | |
debe6624 JS |
65 | inline void SetBorderX(int x); |
66 | inline void SetBorderY(int y); | |
c801d85f KB |
67 | |
68 | //////////////////////////////////////////////////////////////////////// | |
69 | // Implementation | |
70 | ||
71 | void OnPaint(wxPaintEvent& event); | |
72 | ||
73 | virtual void InitColours(void); | |
74 | ||
75 | // Responds to colour changes | |
76 | void OnSysColourChanged(wxSysColourChangedEvent& event); | |
77 | ||
78 | protected: | |
79 | int * m_statusWidths; | |
80 | int m_nFields; | |
81 | wxString * m_statusStrings; | |
82 | int m_borderX; | |
83 | int m_borderY; | |
84 | wxFont m_defaultStatusBarFont; | |
85 | wxPen m_mediumShadowPen; | |
86 | wxPen m_hilightPen; | |
87 | ||
88 | DECLARE_EVENT_TABLE() | |
89 | }; | |
90 | ||
91 | #endif | |
92 | // __STATUSBRH_G__ |