]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/gauge.h
compatibility changes: WXWIN_COMPATIBILITY_EVENT_TYPES and DECLARE_EVENT_TABLE_ENTRY...
[wxWidgets.git] / include / wx / os2 / gauge.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: gauge.h
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
DW
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GAUGE_H_
13#define _WX_GAUGE_H_
14
0e320a79
DW
15#include "wx/control.h"
16
17WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
18
0e320a79
DW
19class 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,
57c4d796 30#if wxUSE_VALIDATORS
0e320a79 31 const wxValidator& validator = wxDefaultValidator,
57c4d796 32#endif
0e320a79
DW
33 const wxString& name = wxGaugeNameStr)
34 {
35 Create(parent, id, range, pos, size, style, validator, name);
36 }
37
38 bool Create(wxWindow *parent, wxWindowID id,
39 int range,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxGA_HORIZONTAL,
57c4d796 43#if wxUSE_VALIDATORS
0e320a79 44 const wxValidator& validator = wxDefaultValidator,
57c4d796 45#endif
0e320a79
DW
46 const wxString& name = wxGaugeNameStr);
47
48 void SetShadowWidth(int w);
49 void SetBezelFace(int w);
50 void SetRange(int r);
51 void SetValue(int pos);
52
53 int GetShadowWidth() const ;
54 int GetBezelFace() const ;
55 int GetRange() const ;
56 int GetValue() const ;
57
0371a691
DW
58 bool SetForegroundColour(const wxColour& col);
59 bool SetBackgroundColour(const wxColour& col);
0e320a79
DW
60
61 virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
62
63 protected:
64 int m_rangeMax;
65 int m_gaugePos;
0e320a79
DW
66};
67
68#endif
69 // _WX_GAUGE_H_