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_
16 #include "wx/arrstr.h"
18 class WXDLLEXPORT wxStatusBarGeneric
: public wxStatusBarBase
21 wxStatusBarGeneric() { Init(); }
22 wxStatusBarGeneric(wxWindow
*parent
,
23 wxWindowID winid
= wxID_ANY
,
24 long style
= wxST_SIZEGRIP
,
25 const wxString
& name
= wxStatusBarNameStr
)
29 Create(parent
, winid
, style
, name
);
32 virtual ~wxStatusBarGeneric();
34 bool Create(wxWindow
*parent
, wxWindowID winid
= wxID_ANY
,
35 long style
= wxST_SIZEGRIP
,
36 const wxString
& name
= wxStatusBarNameStr
);
39 virtual void SetFieldsCount(int number
= 1,
40 const int *widths
= (const int *) NULL
);
42 // Set status line text
43 virtual void SetStatusText(const wxString
& text
, int number
= 0);
44 virtual wxString
GetStatusText(int number
= 0) const;
46 // Set status line widths
47 virtual void SetStatusWidths(int n
, const int widths_field
[]);
49 // Get the position and size of the field's internal bounding rectangle
50 virtual bool GetFieldRect(int i
, wxRect
& rect
) const;
52 // sets the minimal vertical size of the status bar
53 virtual void SetMinHeight(int height
);
55 virtual int GetBorderX() const { return m_borderX
; }
56 virtual int GetBorderY() const { return m_borderY
; }
58 ////////////////////////////////////////////////////////////////////////
61 virtual void DrawFieldText(wxDC
& dc
, int i
);
62 virtual void DrawField(wxDC
& dc
, int i
);
64 void SetBorderX(int x
);
65 void SetBorderY(int y
);
67 void OnPaint(wxPaintEvent
& event
);
69 void OnLeftDown(wxMouseEvent
& event
);
70 void OnRightDown(wxMouseEvent
& event
);
72 virtual void InitColours();
74 // Responds to colour changes
75 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
78 // common part of all ctors
81 wxArrayString m_statusStrings
;
83 // the last known width of the client rect (used to rebuild cache)
84 int m_lastClientWidth
;
85 // the widths of the status bar panes in pixels
86 wxArrayInt m_widthsAbs
;
90 wxPen m_mediumShadowPen
;
93 virtual wxSize
DoGetBestSize() const;
97 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric
)
101 // _WX_GENERIC_STATUSBR_H_