]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/statusbr.h
just fix some $Id$ tokens
[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
245243ec
WS
15#include "wx/defs.h"
16
17#if wxUSE_STATUSBAR
18
ac57418f 19#include "wx/pen.h"
2da2f941 20#include "wx/arrstr.h"
c801d85f 21
7b6fefbe
FM
22
23// ----------------------------------------------------------------------------
24// wxStatusBarGeneric
25// ----------------------------------------------------------------------------
26
53a2db12 27class WXDLLIMPEXP_CORE wxStatusBarGeneric : public wxStatusBarBase
c801d85f 28{
c801d85f 29public:
3304646d
WS
30 wxStatusBarGeneric() { Init(); }
31 wxStatusBarGeneric(wxWindow *parent,
53b6d7a2
PC
32 wxWindowID winid = wxID_ANY,
33 long style = wxST_SIZEGRIP,
34 const wxString& name = wxStatusBarNameStr)
3304646d
WS
35 {
36 Init();
390015c0 37
3304646d
WS
38 Create(parent, winid, style, name);
39 }
ed791986 40
3304646d 41 virtual ~wxStatusBarGeneric();
c801d85f 42
53b6d7a2
PC
43 bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY,
44 long style = wxST_SIZEGRIP,
45 const wxString& name = wxStatusBarNameStr);
c801d85f 46
3304646d
WS
47 // Create status line
48 virtual void SetFieldsCount(int number = 1,
49 const int *widths = (const int *) NULL);
c801d85f 50
3304646d
WS
51 // Set status line text
52 virtual void SetStatusText(const wxString& text, int number = 0);
53 virtual wxString GetStatusText(int number = 0) const;
c801d85f 54
3304646d
WS
55 // Set status line widths
56 virtual void SetStatusWidths(int n, const int widths_field[]);
c801d85f 57
3304646d
WS
58 // Get the position and size of the field's internal bounding rectangle
59 virtual bool GetFieldRect(int i, wxRect& rect) const;
c801d85f 60
3304646d
WS
61 // sets the minimal vertical size of the status bar
62 virtual void SetMinHeight(int height);
ed791986 63
3304646d
WS
64 virtual int GetBorderX() const { return m_borderX; }
65 virtual int GetBorderY() const { return m_borderY; }
c801d85f 66
3304646d
WS
67 ////////////////////////////////////////////////////////////////////////
68 // Implementation
c801d85f 69
3304646d
WS
70 virtual void DrawFieldText(wxDC& dc, int i);
71 virtual void DrawField(wxDC& dc, int i);
ed791986 72
3304646d
WS
73 void SetBorderX(int x);
74 void SetBorderY(int y);
ed791986 75
3304646d 76 void OnPaint(wxPaintEvent& event);
ca65c044 77
3304646d
WS
78 void OnLeftDown(wxMouseEvent& event);
79 void OnRightDown(wxMouseEvent& event);
c801d85f 80
3304646d 81 virtual void InitColours();
c801d85f 82
3304646d
WS
83 // Responds to colour changes
84 void OnSysColourChanged(wxSysColourChangedEvent& event);
c801d85f 85
7422d7c4
VZ
86 // true if the status bar shows the size grip: for this it must have
87 // wxST_SIZEGRIP style and the window it is attached to must be resizeable
88 // and not maximized
89 bool ShowsSizeGrip() const;
90
c801d85f 91protected:
3304646d
WS
92 // common part of all ctors
93 void Init();
390015c0 94
7b6fefbe 95 // the array of the currently displayed strings
3304646d 96 wxArrayString m_statusStrings;
390015c0 97
3304646d
WS
98 // the last known width of the client rect (used to rebuild cache)
99 int m_lastClientWidth;
7b6fefbe
FM
100
101 // the absolute widths of the status bar panes in pixels
3304646d 102 wxArrayInt m_widthsAbs;
390015c0 103
3304646d
WS
104 int m_borderX;
105 int m_borderY;
106 wxPen m_mediumShadowPen;
107 wxPen m_hilightPen;
c801d85f 108
3304646d 109 virtual wxSize DoGetBestSize() const;
595a9493 110
ed791986 111private:
3304646d
WS
112 DECLARE_EVENT_TABLE()
113 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric)
c801d85f
KB
114};
115
245243ec
WS
116#endif // wxUSE_STATUSBAR
117
c801d85f 118#endif
ed791986 119 // _WX_GENERIC_STATUSBR_H_