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