]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
ed791986 VZ |
2 | // Name: wx/generic/statusbr.h |
3 | // Purpose: wxStatusBarGeneric class | |
c801d85f | 4 | // Author: Julian Smart |
ed791986 | 5 | // Modified by: VZ at 05.02.00 to derive from wxStatusBarBase |
c801d85f KB |
6 | // Created: 01/02/97 |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart and Markus Holzem | |
ed791986 | 9 | // Licence: wxWindows license |
c801d85f KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
ed791986 VZ |
12 | #ifndef _WX_GENERIC_STATUSBR_H_ |
13 | #define _WX_GENERIC_STATUSBR_H_ | |
c801d85f | 14 | |
af49c4b8 | 15 | #if defined(__GNUG__) && !defined(__APPLE__) |
c801d85f KB |
16 | #pragma interface "statusbr.h" |
17 | #endif | |
18 | ||
ac57418f RR |
19 | #include "wx/pen.h" |
20 | #include "wx/font.h" | |
af07f174 | 21 | #include "wx/statusbr.h" |
c801d85f | 22 | |
908d4516 | 23 | WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr; |
c801d85f | 24 | |
ed791986 | 25 | class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase |
c801d85f | 26 | { |
c801d85f | 27 | public: |
ed791986 VZ |
28 | wxStatusBarGeneric(); |
29 | wxStatusBarGeneric(wxWindow *parent, | |
30 | wxWindowID id, | |
31 | const wxPoint& pos = wxDefaultPosition, | |
32 | const wxSize& size = wxDefaultSize, | |
33 | long style = 0, | |
34 | const wxString& name = wxPanelNameStr) | |
c801d85f KB |
35 | { |
36 | Create(parent, id, pos, size, style, name); | |
37 | } | |
ed791986 VZ |
38 | wxStatusBarGeneric(wxWindow *parent, |
39 | wxWindowID id, | |
40 | long style, | |
41 | const wxString& name = wxPanelNameStr) | |
42 | { | |
43 | Create(parent, id, style, name); | |
44 | } | |
45 | ||
46 | ~wxStatusBarGeneric(); | |
c801d85f | 47 | |
ed791986 VZ |
48 | bool Create(wxWindow *parent, wxWindowID id, |
49 | const wxPoint& WXUNUSED(pos) = wxDefaultPosition, | |
50 | const wxSize& WXUNUSED(size) = wxDefaultSize, | |
51 | long style = 0, | |
52 | const wxString& name = wxPanelNameStr) | |
53 | { | |
54 | return Create(parent, id, style, name); | |
55 | } | |
c801d85f | 56 | |
debe6624 | 57 | bool Create(wxWindow *parent, wxWindowID id, |
33ac7e6f | 58 | long style, |
ed791986 | 59 | const wxString& name = wxPanelNameStr); |
c801d85f KB |
60 | |
61 | // Create status line | |
ed791986 VZ |
62 | virtual void SetFieldsCount(int number = 1, |
63 | const int *widths = (const int *) NULL); | |
64 | int GetFieldsCount() const { return m_nFields; } | |
c801d85f KB |
65 | |
66 | // Set status line text | |
debe6624 JS |
67 | virtual void SetStatusText(const wxString& text, int number = 0); |
68 | virtual wxString GetStatusText(int number = 0) const; | |
c801d85f KB |
69 | |
70 | // Set status line widths | |
330043b4 | 71 | virtual void SetStatusWidths(int n, const int widths_field[]); |
c801d85f | 72 | |
c801d85f | 73 | // Get the position and size of the field's internal bounding rectangle |
16e93305 | 74 | virtual bool GetFieldRect(int i, wxRect& rect) const; |
c801d85f | 75 | |
ed791986 VZ |
76 | // sets the minimal vertical size of the status bar |
77 | virtual void SetMinHeight(int height); | |
78 | ||
79 | virtual int GetBorderX() const { return m_borderX; } | |
80 | virtual int GetBorderY() const { return m_borderY; } | |
c801d85f KB |
81 | |
82 | //////////////////////////////////////////////////////////////////////// | |
83 | // Implementation | |
84 | ||
ed791986 VZ |
85 | virtual void DrawFieldText(wxDC& dc, int i); |
86 | virtual void DrawField(wxDC& dc, int i); | |
87 | ||
88 | void SetBorderX(int x); | |
89 | void SetBorderY(int y); | |
90 | ||
c801d85f KB |
91 | void OnPaint(wxPaintEvent& event); |
92 | ||
330043b4 | 93 | virtual void InitColours(); |
c801d85f KB |
94 | |
95 | // Responds to colour changes | |
96 | void OnSysColourChanged(wxSysColourChangedEvent& event); | |
97 | ||
98 | protected: | |
76880b87 | 99 | wxArrayString m_statusStrings; |
c801d85f KB |
100 | int m_borderX; |
101 | int m_borderY; | |
102 | wxFont m_defaultStatusBarFont; | |
103 | wxPen m_mediumShadowPen; | |
104 | wxPen m_hilightPen; | |
105 | ||
ed791986 | 106 | private: |
c801d85f | 107 | DECLARE_EVENT_TABLE() |
ed791986 | 108 | DECLARE_DYNAMIC_CLASS(wxStatusBarGeneric) |
c801d85f KB |
109 | }; |
110 | ||
111 | #endif | |
ed791986 | 112 | // _WX_GENERIC_STATUSBR_H_ |
76880b87 RL |
113 | |
114 | // vi:sts=4:sw=4:et |