]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/gauge.h
OS/2 PM specific fixes for validators and fonts
[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 WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
18
19 class WXDLLEXPORT wxGauge: public wxControl
20 {
21 DECLARE_DYNAMIC_CLASS(wxGauge)
22 public:
23 inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
24
25 inline wxGauge(wxWindow *parent, wxWindowID id,
26 int range,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxGA_HORIZONTAL,
30 #if wxUSE_VALIDATORS
31 # if defined(__VISAGECPP__)
32 const wxValidator* validator = wxDefaultValidator,
33 # else
34 const wxValidator& validator = wxDefaultValidator,
35 # endif
36 #endif
37 const wxString& name = wxGaugeNameStr)
38 {
39 Create(parent, id, range, pos, size, style, validator, name);
40 }
41
42 bool Create(wxWindow *parent, wxWindowID id,
43 int range,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = wxGA_HORIZONTAL,
47 #if wxUSE_VALIDATORS
48 # if defined(__VISAGECPP__)
49 const wxValidator* validator = wxDefaultValidator,
50 # else
51 const wxValidator& validator = wxDefaultValidator,
52 # endif
53 #endif
54 const wxString& name = wxGaugeNameStr);
55
56 void SetShadowWidth(int w);
57 void SetBezelFace(int w);
58 void SetRange(int r);
59 void SetValue(int pos);
60
61 int GetShadowWidth() const ;
62 int GetBezelFace() const ;
63 int GetRange() const ;
64 int GetValue() const ;
65
66 bool SetForegroundColour(const wxColour& col);
67 bool SetBackgroundColour(const wxColour& col);
68
69 virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
70
71 protected:
72 int m_rangeMax;
73 int m_gaugePos;
74 };
75
76 #endif
77 // _WX_GAUGE_H_