]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/statusbr.h
remove unneeded DoGetClientSize
[wxWidgets.git] / include / wx / generic / statusbr.h
CommitLineData
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$
371a5b4e 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
c801d85f
KB
10/////////////////////////////////////////////////////////////////////////////
11
ed791986
VZ
12#ifndef _WX_GENERIC_STATUSBR_H_
13#define _WX_GENERIC_STATUSBR_H_
c801d85f 14
ac57418f 15#include "wx/pen.h"
2da2f941 16#include "wx/arrstr.h"
c801d85f 17
ed791986 18class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
c801d85f 19{
c801d85f 20public:
3304646d
WS
21 wxStatusBarGeneric() { Init(); }
22 wxStatusBarGeneric(wxWindow *parent,
53b6d7a2
PC
23 wxWindowID winid = wxID_ANY,
24 long style = wxST_SIZEGRIP,
25 const wxString& name = wxStatusBarNameStr)
3304646d
WS
26 {
27 Init();
390015c0 28
3304646d
WS
29 Create(parent, winid, style, name);
30 }
ed791986 31
3304646d 32 virtual ~wxStatusBarGeneric();
c801d85f 33
53b6d7a2
PC
34 bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY,
35 long style = wxST_SIZEGRIP,
36 const wxString& name = wxStatusBarNameStr);
c801d85f 37
3304646d
WS
38 // Create status line
39 virtual void SetFieldsCount(int number = 1,
40 const int *widths = (const int *) NULL);
c801d85f 41
3304646d
WS
42 // Set status line text
43 virtual void SetStatusText(const wxString& text, int number = 0);
44 virtual wxString GetStatusText(int number = 0) const;
c801d85f 45
3304646d
WS
46 // Set status line widths
47 virtual void SetStatusWidths(int n, const int widths_field[]);
c801d85f 48
3304646d
WS
49 // Get the position and size of the field's internal bounding rectangle
50 virtual bool GetFieldRect(int i, wxRect& rect) const;
c801d85f 51
3304646d
WS
52 // sets the minimal vertical size of the status bar
53 virtual void SetMinHeight(int height);
ed791986 54
3304646d
WS
55 virtual int GetBorderX() const { return m_borderX; }
56 virtual int GetBorderY() const { return m_borderY; }
c801d85f 57
3304646d
WS
58 ////////////////////////////////////////////////////////////////////////
59 // Implementation
c801d85f 60
3304646d
WS
61 virtual void DrawFieldText(wxDC& dc, int i);
62 virtual void DrawField(wxDC& dc, int i);
ed791986 63
3304646d
WS
64 void SetBorderX(int x);
65 void SetBorderY(int y);
ed791986 66
3304646d 67 void OnPaint(wxPaintEvent& event);
ca65c044 68
3304646d
WS
69 void OnLeftDown(wxMouseEvent& event);
70 void OnRightDown(wxMouseEvent& event);
c801d85f 71
3304646d 72 virtual void InitColours();
c801d85f 73
3304646d
WS
74 // Responds to colour changes
75 void OnSysColourChanged(wxSysColourChangedEvent& event);
c801d85f
KB
76
77protected:
3304646d
WS
78 // common part of all ctors
79 void Init();
390015c0 80
3304646d 81 wxArrayString m_statusStrings;
390015c0 82
3304646d
WS
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;
390015c0 87
3304646d
WS
88 int m_borderX;
89 int m_borderY;
90 wxPen m_mediumShadowPen;
91 wxPen m_hilightPen;
c801d85f 92
3304646d 93 virtual wxSize DoGetBestSize() const;
595a9493 94
ed791986 95private:
3304646d
WS
96 DECLARE_EVENT_TABLE()
97 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric)
c801d85f
KB
98};
99
100#endif
ed791986 101 // _WX_GENERIC_STATUSBR_H_