]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/statusbr.h
made the log dialog resizeable (again?)
[wxWidgets.git] / include / wx / generic / statusbr.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/statusbr.h
3 // Purpose: wxStatusBarGeneric class
4 // Author: Julian Smart
5 // Modified by: VZ at 05.02.00 to derive from wxStatusBarBase
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 _WX_GENERIC_STATUSBR_H_
13 #define _WX_GENERIC_STATUSBR_H_
14
15 #ifdef __GNUG__
16 #pragma interface "statusbr.h"
17 #endif
18
19 #include "wx/pen.h"
20 #include "wx/font.h"
21 #include "wx/statusbr.h"
22
23 WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
24
25 class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
26 {
27 public:
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)
35 {
36 Create(parent, id, pos, size, style, name);
37 }
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();
47
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 }
56
57 bool Create(wxWindow *parent, wxWindowID id,
58 long style,
59 const wxString& name = wxPanelNameStr);
60
61 // Create status line
62 virtual void SetFieldsCount(int number = 1,
63 const int *widths = (const int *) NULL);
64 int GetFieldsCount() const { return m_nFields; }
65
66 // Set status line text
67 virtual void SetStatusText(const wxString& text, int number = 0);
68 virtual wxString GetStatusText(int number = 0) const;
69
70 // Set status line widths
71 virtual void SetStatusWidths(int n, const int widths_field[]);
72
73 // Get the position and size of the field's internal bounding rectangle
74 virtual bool GetFieldRect(int i, wxRect& rect) const;
75
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; }
81
82 ////////////////////////////////////////////////////////////////////////
83 // Implementation
84
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
91 void OnPaint(wxPaintEvent& event);
92
93 virtual void InitColours();
94
95 // Responds to colour changes
96 void OnSysColourChanged(wxSysColourChangedEvent& event);
97
98 protected:
99 wxString * m_statusStrings;
100 int m_borderX;
101 int m_borderY;
102 wxFont m_defaultStatusBarFont;
103 wxPen m_mediumShadowPen;
104 wxPen m_hilightPen;
105
106 private:
107 DECLARE_EVENT_TABLE()
108 DECLARE_DYNAMIC_CLASS(wxStatusBarGeneric)
109 };
110
111 #endif
112 // _WX_GENERIC_STATUSBR_H_