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
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GENERIC_STATUSBR_H_
13 #define _WX_GENERIC_STATUSBR_H_
20 #include "wx/arrstr.h"
22 class WXDLLEXPORT wxStatusBarGeneric
: public wxStatusBarBase
25 wxStatusBarGeneric() { Init(); }
26 wxStatusBarGeneric(wxWindow
*parent
,
27 wxWindowID winid
= wxID_ANY
,
28 long style
= wxST_SIZEGRIP
,
29 const wxString
& name
= wxStatusBarNameStr
)
33 Create(parent
, winid
, style
, name
);
36 virtual ~wxStatusBarGeneric();
38 bool Create(wxWindow
*parent
, wxWindowID winid
= wxID_ANY
,
39 long style
= wxST_SIZEGRIP
,
40 const wxString
& name
= wxStatusBarNameStr
);
43 virtual void SetFieldsCount(int number
= 1,
44 const int *widths
= (const int *) NULL
);
46 // Set status line text
47 virtual void SetStatusText(const wxString
& text
, int number
= 0);
48 virtual wxString
GetStatusText(int number
= 0) const;
50 // Set status line widths
51 virtual void SetStatusWidths(int n
, const int widths_field
[]);
53 // Get the position and size of the field's internal bounding rectangle
54 virtual bool GetFieldRect(int i
, wxRect
& rect
) const;
56 // sets the minimal vertical size of the status bar
57 virtual void SetMinHeight(int height
);
59 virtual int GetBorderX() const { return m_borderX
; }
60 virtual int GetBorderY() const { return m_borderY
; }
62 ////////////////////////////////////////////////////////////////////////
65 virtual void DrawFieldText(wxDC
& dc
, int i
);
66 virtual void DrawField(wxDC
& dc
, int i
);
68 void SetBorderX(int x
);
69 void SetBorderY(int y
);
71 void OnPaint(wxPaintEvent
& event
);
73 void OnLeftDown(wxMouseEvent
& event
);
74 void OnRightDown(wxMouseEvent
& event
);
76 virtual void InitColours();
78 // Responds to colour changes
79 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
82 // common part of all ctors
85 wxArrayString m_statusStrings
;
87 // the last known width of the client rect (used to rebuild cache)
88 int m_lastClientWidth
;
89 // the widths of the status bar panes in pixels
90 wxArrayInt m_widthsAbs
;
94 wxPen m_mediumShadowPen
;
97 virtual wxSize
DoGetBestSize() const;
100 DECLARE_EVENT_TABLE()
101 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric
)
104 #endif // wxUSE_STATUSBAR
107 // _WX_GENERIC_STATUSBR_H_