]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/gauge.h
compatibility fix: have wxListKey ctors from C strings so that passing string literal...
[wxWidgets.git] / include / wx / os2 / gauge.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/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 class WXDLLEXPORT wxGauge: public wxGaugeBase
16 {
17 public:
18 inline wxGauge() { m_nRangeMax = 0; m_nGaugePos = 0; }
19
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
26 ,const wxValidator& rValidator = wxDefaultValidator
27 ,const wxString& rsName = wxGaugeNameStr
28 )
29 {
30 Create( pParent
31 ,vId
32 ,nRange
33 ,rPos
34 ,rSize
35 ,lStyle
36 ,rValidator
37 ,rsName
38 );
39 }
40
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
47 ,const wxValidator& rValidator = wxDefaultValidator
48 ,const wxString& rsName = wxGaugeNameStr
49 );
50
51 int GetShadowWidth(void) const;
52 int GetBezelFace(void) const;
53 int GetRange(void) const;
54 int GetValue(void) const;
55
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);
62
63 inline virtual bool AcceptsFocus(void) const { return FALSE; }
64 inline virtual void Command(wxCommandEvent& WXUNUSED(rEvent)) {};
65
66 protected:
67 int m_nRangeMax;
68 int m_nGaugePos;
69 int m_nWidth;
70 int m_nHeight;
71
72 wxSize wxGauge::DoGetBestSize(void) const;
73
74 private:
75 DECLARE_DYNAMIC_CLASS(wxGauge)
76 }; // end of CLASS wxGauge
77
78 #endif // _WX_GAUGE_H_