]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/gauge.h
New drawing test code.
[wxWidgets.git] / include / wx / gtk1 / gauge.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: gauge.h
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
c801d85f
KB
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKGAUGEH__
12#define __GTKGAUGEH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
dcf924a3
RR
19
20#if wxUSE_GAUGE
21
c801d85f
KB
22#include "wx/object.h"
23#include "wx/list.h"
24#include "wx/control.h"
25
26//-----------------------------------------------------------------------------
27// classes
28//-----------------------------------------------------------------------------
29
30class wxGauge;
31
1a56f55c
RR
32//-----------------------------------------------------------------------------
33// global data
34//-----------------------------------------------------------------------------
35
36extern const char* wxGaugeNameStr;
37
c801d85f
KB
38//-----------------------------------------------------------------------------
39// wxGaugeBox
40//-----------------------------------------------------------------------------
41
1a56f55c
RR
42class wxGauge: public wxControl
43{
44 DECLARE_DYNAMIC_CLASS(wxGauge)
45
46 public:
36b3b54a 47 inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
1a56f55c 48
36b3b54a 49 inline wxGauge( wxWindow *parent, wxWindowID id, int range,
1a56f55c
RR
50 const wxPoint& pos = wxDefaultPosition,
51 const wxSize& size = wxDefaultSize,
debe6624 52 long style = wxGA_HORIZONTAL,
6de97a3b
RR
53 const wxValidator& validator = wxDefaultValidator,
54 const wxString& name = wxGaugeNameStr )
55 {
56 Create(parent, id, range, pos, size, style, validator, name);
57 }
36b3b54a 58 bool Create( wxWindow *parent, wxWindowID id, int range,
1a56f55c
RR
59 const wxPoint& pos = wxDefaultPosition,
60 const wxSize& size = wxDefaultSize,
debe6624 61 long style = wxGA_HORIZONTAL,
6de97a3b 62 const wxValidator& validator = wxDefaultValidator,
1a56f55c 63 const wxString& name = wxGaugeNameStr );
6de97a3b
RR
64 void SetShadowWidth( int WXUNUSED(w) ) {};
65 void SetBezelFace( int WXUNUSED(w) ) {};
66 void SetRange( int r );
67 void SetValue( int pos );
36b3b54a
RR
68 int GetShadowWidth() const { return 0; };
69 int GetBezelFace() const { return 0; };
70 int GetRange() const;
71 int GetValue() const;
6de97a3b
RR
72
73 // Are we a Win95/GTK progress bar, or a normal gauge?
36b3b54a 74 inline bool GetProgressBar() const { return m_useProgressBar; }
58614078
RR
75
76 // implementation
77
78 void ApplyWidgetStyle();
79
1a56f55c
RR
80 int m_rangeMax;
81 int m_gaugePos;
82 bool m_useProgressBar;
83};
84
dcf924a3
RR
85#endif
86
c801d85f 87#endif // __GTKGAUGEH__