]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gauge.h
mac fixes
[wxWidgets.git] / include / wx / gauge.h
CommitLineData
1e6feb95
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/gauge.h
3// Purpose: wxGauge interface
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 20.02.01
7// RCS-ID: $Id$
8// Copyright: (c) 1996-2001 wxWindows team
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_GAUGE_H_BASE_
13#define _WX_GAUGE_H_BASE_
c801d85f 14
1e6feb95
VZ
15#ifdef __GNUG__
16 #pragma implementation "gaugebase.h"
17#endif
18
19#include "wx/defs.h"
20
21#if wxUSE_GAUGE
22
23#include "wx/control.h"
24
25WXDLLEXPORT_DATA(extern const wxChar*) wxGaugeNameStr;
26
27// ----------------------------------------------------------------------------
28// wxGauge: a progress bar
29// ----------------------------------------------------------------------------
30
31class WXDLLEXPORT wxGaugeBase : public wxControl
32{
33public:
34 bool Create(wxWindow *parent,
35 wxWindowID id,
36 int range,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = wxGA_HORIZONTAL,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxGaugeNameStr);
42
43 // set/get the control range
44 virtual void SetRange(int range);
45 virtual int GetRange() const;
46
47 // position
48 virtual void SetValue(int pos);
49 virtual int GetValue() const;
50
51 // appearance params (not implemented for most ports)
52
53 virtual void SetShadowWidth(int w);
54 virtual int GetShadowWidth() const;
55
56 virtual void SetBezelFace(int w);
57 virtual int GetBezelFace() const;
58
59 // overriden base class virtuals
60 virtual bool AcceptsFocus() const { return FALSE; }
61
62protected:
63 // the max position
64 int m_rangeMax;
65
66 // the current position
67 int m_gaugePos;
68};
69
70#if defined(__WXUNIVERSAL__)
71 #include "wx/univ/gauge.h"
72#elif defined(__WXMSW__)
73 #ifdef __WIN95__
74 #include "wx/msw/gauge95.h"
75 #define wxGauge wxGauge95
76 #define sm_classwxGauge sm_classwxGauge95
77 #else // !__WIN95__
78 #include "wx/msw/gaugemsw.h"
79 #define wxGauge wxGaugeMSW
80 #define sm_classwxGauge sm_classwxGaugeMSW
81 #endif
2049ba38 82#elif defined(__WXMOTIF__)
1e6feb95 83 #include "wx/motif/gauge.h"
2049ba38 84#elif defined(__WXGTK__)
1e6feb95 85 #include "wx/gtk/gauge.h"
b4e76e0d 86#elif defined(__WXQT__)
1e6feb95 87 #include "wx/qt/gauge.h"
34138703 88#elif defined(__WXMAC__)
1e6feb95 89 #include "wx/mac/gauge.h"
1777b9bb 90#elif defined(__WXPM__)
1e6feb95 91 #include "wx/os2/gauge.h"
34138703 92#elif defined(__WXSTUBS__)
1e6feb95 93 #include "wx/stubs/gauge.h"
c801d85f
KB
94#endif
95
1e6feb95
VZ
96#endif // wxUSE_GAUGE
97
c801d85f 98#endif
34138703 99 // _WX_GAUGE_H_BASE_