]>
Commit | Line | Data |
---|---|---|
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 | |
af49c4b8 GD |
15 | #if defined(__GNUG__) && !defined(__APPLE__) |
16 | #pragma interface "gaugebase.h" | |
1e6feb95 VZ |
17 | #endif |
18 | ||
19 | #include "wx/defs.h" | |
20 | ||
21 | #if wxUSE_GAUGE | |
22 | ||
23 | #include "wx/control.h" | |
24 | ||
25 | WXDLLEXPORT_DATA(extern const wxChar*) wxGaugeNameStr; | |
26 | ||
27 | // ---------------------------------------------------------------------------- | |
28 | // wxGauge: a progress bar | |
29 | // ---------------------------------------------------------------------------- | |
30 | ||
31 | class WXDLLEXPORT wxGaugeBase : public wxControl | |
32 | { | |
33 | public: | |
799ea011 GD |
34 | virtual ~wxGaugeBase(); |
35 | ||
1e6feb95 VZ |
36 | bool Create(wxWindow *parent, |
37 | wxWindowID id, | |
38 | int range, | |
39 | const wxPoint& pos = wxDefaultPosition, | |
40 | const wxSize& size = wxDefaultSize, | |
41 | long style = wxGA_HORIZONTAL, | |
42 | const wxValidator& validator = wxDefaultValidator, | |
43 | const wxString& name = wxGaugeNameStr); | |
44 | ||
45 | // set/get the control range | |
46 | virtual void SetRange(int range); | |
47 | virtual int GetRange() const; | |
48 | ||
49 | // position | |
50 | virtual void SetValue(int pos); | |
51 | virtual int GetValue() const; | |
52 | ||
53 | // appearance params (not implemented for most ports) | |
54 | ||
55 | virtual void SetShadowWidth(int w); | |
56 | virtual int GetShadowWidth() const; | |
57 | ||
58 | virtual void SetBezelFace(int w); | |
59 | virtual int GetBezelFace() const; | |
60 | ||
61 | // overriden base class virtuals | |
62 | virtual bool AcceptsFocus() const { return FALSE; } | |
63 | ||
64 | protected: | |
65 | // the max position | |
66 | int m_rangeMax; | |
67 | ||
68 | // the current position | |
69 | int m_gaugePos; | |
70 | }; | |
71 | ||
72 | #if defined(__WXUNIVERSAL__) | |
73 | #include "wx/univ/gauge.h" | |
74 | #elif defined(__WXMSW__) | |
75 | #ifdef __WIN95__ | |
76 | #include "wx/msw/gauge95.h" | |
77 | #define wxGauge wxGauge95 | |
78 | #define sm_classwxGauge sm_classwxGauge95 | |
79 | #else // !__WIN95__ | |
80 | #include "wx/msw/gaugemsw.h" | |
81 | #define wxGauge wxGaugeMSW | |
82 | #define sm_classwxGauge sm_classwxGaugeMSW | |
83 | #endif | |
2049ba38 | 84 | #elif defined(__WXMOTIF__) |
1e6feb95 | 85 | #include "wx/motif/gauge.h" |
2049ba38 | 86 | #elif defined(__WXGTK__) |
1e6feb95 | 87 | #include "wx/gtk/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" |
c801d85f KB |
92 | #endif |
93 | ||
1e6feb95 VZ |
94 | #endif // wxUSE_GAUGE |
95 | ||
c801d85f | 96 | #endif |
34138703 | 97 | // _WX_GAUGE_H_BASE_ |