]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/gauge.h
improved opening/closing of shared library resources so that Mach-O shared
[wxWidgets.git] / include / wx / os2 / gauge.h
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 #if wxUSE_VALIDATORS
29 ,const wxValidator& rValidator = wxDefaultValidator
30 #endif
31 ,const wxString& rsName = wxGaugeNameStr
32 )
33 {
34 Create( pParent
35 ,vId
36 ,nRange
37 ,rPos
38 ,rSize
39 ,lStyle
40 #if wxUSE_VALIDATORS
41 ,rValidator
42 #endif
43 ,rsName
44 );
45 }
46
47 bool Create( wxWindow* pParent
48 ,wxWindowID vId
49 ,int nRange
50 ,const wxPoint& rPos = wxDefaultPosition
51 ,const wxSize& rSize = wxDefaultSize
52 ,long lStyle = wxGA_HORIZONTAL
53 #if wxUSE_VALIDATORS
54 ,const wxValidator& rValidator = wxDefaultValidator
55 #endif
56 ,const wxString& rsName = wxGaugeNameStr
57 );
58
59 int GetShadowWidth(void) const;
60 int GetBezelFace(void) const;
61 int GetRange(void) const;
62 int GetValue(void) const;
63
64 bool SetBackgroundColour(const wxColour& rColour);
65 void SetBezelFace(int nWidth);
66 bool SetForegroundColour(const wxColour& rColour);
67 void SetRange(int nRange);
68 void SetShadowWidth(int nWidth);
69 void SetValue(int nPos);
70
71 inline virtual bool AcceptsFocus(void) const { return FALSE; }
72 inline virtual void Command(wxCommandEvent& WXUNUSED(rEvent)) {};
73
74 protected:
75 int m_nRangeMax;
76 int m_nGaugePos;
77
78 private:
79 DECLARE_DYNAMIC_CLASS(wxGauge)
80 }; // end of CLASS wxGauge
81
82 #endif // _WX_GAUGE_H_
83