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