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