]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/statusbr.h
Make list consistent with tree in terms of Vetoed changes closing the inline edit...
[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
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
c801d85f
KB
16#pragma interface "statusbr.h"
17#endif
18
ac57418f
RR
19#include "wx/pen.h"
20#include "wx/font.h"
af07f174 21#include "wx/statusbr.h"
2da2f941 22#include "wx/arrstr.h"
c801d85f 23
f4fffffc 24extern WXDLLEXPORT_DATA(const wxChar*) wxPanelNameStr;
c801d85f 25
ed791986 26class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
c801d85f 27{
c801d85f 28public:
390015c0 29 wxStatusBarGeneric() { Init(); }
ed791986 30 wxStatusBarGeneric(wxWindow *parent,
d9e2e4c2 31 wxWindowID winid,
ed791986
VZ
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
73bb6776 34 long style = wxFULL_REPAINT_ON_RESIZE,
ed791986 35 const wxString& name = wxPanelNameStr)
c801d85f 36 {
390015c0
VZ
37 Init();
38
d9e2e4c2 39 Create(parent, winid, pos, size, style, name);
c801d85f 40 }
ed791986 41 wxStatusBarGeneric(wxWindow *parent,
d9e2e4c2 42 wxWindowID winid,
390015c0
VZ
43 long style,
44 const wxString& name = wxPanelNameStr)
ed791986 45 {
390015c0
VZ
46 Init();
47
d9e2e4c2 48 Create(parent, winid, style, name);
ed791986
VZ
49 }
50
390015c0 51 virtual ~wxStatusBarGeneric();
c801d85f 52
d9e2e4c2 53 bool Create(wxWindow *parent, wxWindowID winid,
ed791986
VZ
54 const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
55 const wxSize& WXUNUSED(size) = wxDefaultSize,
73bb6776 56 long style = wxFULL_REPAINT_ON_RESIZE,
ed791986
VZ
57 const wxString& name = wxPanelNameStr)
58 {
d9e2e4c2 59 return Create(parent, winid, style, name);
ed791986 60 }
c801d85f 61
d9e2e4c2 62 bool Create(wxWindow *parent, wxWindowID winid,
33ac7e6f 63 long style,
ed791986 64 const wxString& name = wxPanelNameStr);
c801d85f
KB
65
66 // Create status line
ed791986
VZ
67 virtual void SetFieldsCount(int number = 1,
68 const int *widths = (const int *) NULL);
c801d85f
KB
69
70 // Set status line text
debe6624
JS
71 virtual void SetStatusText(const wxString& text, int number = 0);
72 virtual wxString GetStatusText(int number = 0) const;
c801d85f
KB
73
74 // Set status line widths
330043b4 75 virtual void SetStatusWidths(int n, const int widths_field[]);
c801d85f 76
c801d85f 77 // Get the position and size of the field's internal bounding rectangle
16e93305 78 virtual bool GetFieldRect(int i, wxRect& rect) const;
c801d85f 79
ed791986
VZ
80 // sets the minimal vertical size of the status bar
81 virtual void SetMinHeight(int height);
82
83 virtual int GetBorderX() const { return m_borderX; }
84 virtual int GetBorderY() const { return m_borderY; }
c801d85f
KB
85
86 ////////////////////////////////////////////////////////////////////////
87 // Implementation
88
ed791986
VZ
89 virtual void DrawFieldText(wxDC& dc, int i);
90 virtual void DrawField(wxDC& dc, int i);
91
92 void SetBorderX(int x);
93 void SetBorderY(int y);
94
c801d85f 95 void OnPaint(wxPaintEvent& event);
ca65c044 96
2b5f62a0
VZ
97 void OnLeftDown(wxMouseEvent& event);
98 void OnRightDown(wxMouseEvent& event);
c801d85f 99
330043b4 100 virtual void InitColours();
c801d85f
KB
101
102 // Responds to colour changes
103 void OnSysColourChanged(wxSysColourChangedEvent& event);
104
105protected:
390015c0
VZ
106 // common part of all ctors
107 void Init();
108
76880b87 109 wxArrayString m_statusStrings;
390015c0 110
2b5f62a0
VZ
111 // the last known width of the client rect (used to rebuild cache)
112 int m_lastClientWidth;
390015c0
VZ
113 // the widths of the status bar panes in pixels
114 wxArrayInt m_widthsAbs;
115
c801d85f
KB
116 int m_borderX;
117 int m_borderY;
c801d85f
KB
118 wxPen m_mediumShadowPen;
119 wxPen m_hilightPen;
120
595a9493
RD
121 virtual wxSize DoGetBestSize() const;
122
ed791986 123private:
c801d85f 124 DECLARE_EVENT_TABLE()
2eb10e2a 125 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric)
c801d85f
KB
126};
127
128#endif
ed791986 129 // _WX_GENERIC_STATUSBR_H_