]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: gauge.h | |
3 | // Purpose: wxGauge class | |
4 | // Author: David Webster | |
5 | // Modified by: | |
6 | // Created: 10/06/99 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) David Webster | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_GAUGE_H_ | |
13 | #define _WX_GAUGE_H_ | |
14 | ||
15 | #include "wx/control.h" | |
16 | ||
17 | class WXDLLEXPORT wxGauge: public wxControl | |
18 | { | |
19 | public: | |
20 | inline wxGauge() { m_nRangeMax = 0; m_nGaugePos = 0; } | |
21 | ||
22 | inline wxGauge( wxWindow* pParent | |
23 | ,wxWindowID vId | |
24 | ,int nRange | |
25 | ,const wxPoint& rPos = wxDefaultPosition | |
26 | ,const wxSize& rSize = wxDefaultSize | |
27 | ,long lStyle = wxGA_HORIZONTAL | |
28 | ,const wxValidator& rValidator = wxDefaultValidator | |
29 | ,const wxString& rsName = wxGaugeNameStr | |
30 | ) | |
31 | { | |
32 | Create( pParent | |
33 | ,vId | |
34 | ,nRange | |
35 | ,rPos | |
36 | ,rSize | |
37 | ,lStyle | |
38 | ,rValidator | |
39 | ,rsName | |
40 | ); | |
41 | } | |
42 | ||
43 | bool Create( wxWindow* pParent | |
44 | ,wxWindowID vId | |
45 | ,int nRange | |
46 | ,const wxPoint& rPos = wxDefaultPosition | |
47 | ,const wxSize& rSize = wxDefaultSize | |
48 | ,long lStyle = wxGA_HORIZONTAL | |
49 | ,const wxValidator& rValidator = wxDefaultValidator | |
50 | ,const wxString& rsName = wxGaugeNameStr | |
51 | ); | |
52 | ||
53 | int GetShadowWidth(void) const; | |
54 | int GetBezelFace(void) const; | |
55 | int GetRange(void) const; | |
56 | int GetValue(void) const; | |
57 | ||
58 | bool SetBackgroundColour(const wxColour& rColour); | |
59 | void SetBezelFace(int nWidth); | |
60 | bool SetForegroundColour(const wxColour& rColour); | |
61 | void SetRange(int nRange); | |
62 | void SetShadowWidth(int nWidth); | |
63 | void SetValue(int nPos); | |
64 | ||
65 | inline virtual bool AcceptsFocus(void) const { return FALSE; } | |
66 | inline virtual void Command(wxCommandEvent& WXUNUSED(rEvent)) {}; | |
67 | ||
68 | protected: | |
69 | int m_nRangeMax; | |
70 | int m_nGaugePos; | |
71 | ||
72 | private: | |
73 | DECLARE_DYNAMIC_CLASS(wxGauge) | |
74 | }; // end of CLASS wxGauge | |
75 | ||
76 | #endif // _WX_GAUGE_H_ | |
77 |