]>
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 | int m_nWidth; | |
72 | int m_nHeight; | |
73 | ||
74 | wxSize wxGauge::DoGetBestSize(void) const; | |
75 | ||
76 | private: | |
77 | DECLARE_DYNAMIC_CLASS(wxGauge) | |
78 | }; // end of CLASS wxGauge | |
79 | ||
80 | #endif // _WX_GAUGE_H_ | |
81 |