]>
Commit | Line | Data |
---|---|---|
0e320a79 DW |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: gauge.h | |
3 | // Purpose: wxGauge class | |
0371a691 | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
0371a691 | 6 | // Created: 10/06/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
0371a691 DW |
8 | // Copyright: (c) David Webster |
9 | // Licence: wxWindows licence | |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_GAUGE_H_ | |
13 | #define _WX_GAUGE_H_ | |
14 | ||
0e320a79 DW |
15 | #include "wx/control.h" |
16 | ||
17 | WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr; | |
18 | ||
0e320a79 DW |
19 | class WXDLLEXPORT wxGauge: public wxControl |
20 | { | |
21 | DECLARE_DYNAMIC_CLASS(wxGauge) | |
22 | public: | |
23 | inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; } | |
24 | ||
25 | inline wxGauge(wxWindow *parent, wxWindowID id, | |
26 | int range, | |
27 | const wxPoint& pos = wxDefaultPosition, | |
28 | const wxSize& size = wxDefaultSize, | |
29 | long style = wxGA_HORIZONTAL, | |
30 | const wxValidator& validator = wxDefaultValidator, | |
31 | const wxString& name = wxGaugeNameStr) | |
32 | { | |
33 | Create(parent, id, range, pos, size, style, validator, name); | |
34 | } | |
35 | ||
36 | bool Create(wxWindow *parent, wxWindowID id, | |
37 | int range, | |
38 | const wxPoint& pos = wxDefaultPosition, | |
39 | const wxSize& size = wxDefaultSize, | |
40 | long style = wxGA_HORIZONTAL, | |
41 | const wxValidator& validator = wxDefaultValidator, | |
42 | const wxString& name = wxGaugeNameStr); | |
43 | ||
44 | void SetShadowWidth(int w); | |
45 | void SetBezelFace(int w); | |
46 | void SetRange(int r); | |
47 | void SetValue(int pos); | |
48 | ||
49 | int GetShadowWidth() const ; | |
50 | int GetBezelFace() const ; | |
51 | int GetRange() const ; | |
52 | int GetValue() const ; | |
53 | ||
0371a691 DW |
54 | bool SetForegroundColour(const wxColour& col); |
55 | bool SetBackgroundColour(const wxColour& col); | |
0e320a79 DW |
56 | |
57 | virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ; | |
58 | ||
59 | protected: | |
60 | int m_rangeMax; | |
61 | int m_gaugePos; | |
0e320a79 DW |
62 | }; |
63 | ||
64 | #endif | |
65 | // _WX_GAUGE_H_ |