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