]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/gauge.h
rewrote wxFileName::Normalize(), added a few methods, general clean up,
[wxWidgets.git] / include / wx / gtk / 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{
20e05ffb 44public:
36b3b54a 45 inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
1a56f55c 46
36b3b54a 47 inline wxGauge( wxWindow *parent, wxWindowID id, int range,
1a56f55c
RR
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
debe6624 50 long style = wxGA_HORIZONTAL,
6de97a3b
RR
51 const wxValidator& validator = wxDefaultValidator,
52 const wxString& name = wxGaugeNameStr )
53 {
54 Create(parent, id, range, pos, size, style, validator, name);
55 }
36b3b54a 56 bool Create( wxWindow *parent, wxWindowID id, int range,
1a56f55c
RR
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize& size = wxDefaultSize,
debe6624 59 long style = wxGA_HORIZONTAL,
6de97a3b 60 const wxValidator& validator = wxDefaultValidator,
1a56f55c 61 const wxString& name = wxGaugeNameStr );
6de97a3b
RR
62 void SetShadowWidth( int WXUNUSED(w) ) {};
63 void SetBezelFace( int WXUNUSED(w) ) {};
64 void SetRange( int r );
65 void SetValue( int pos );
36b3b54a
RR
66 int GetShadowWidth() const { return 0; };
67 int GetBezelFace() const { return 0; };
68 int GetRange() const;
69 int GetValue() const;
6de97a3b
RR
70
71 // Are we a Win95/GTK progress bar, or a normal gauge?
36b3b54a 72 inline bool GetProgressBar() const { return m_useProgressBar; }
58614078 73
20e05ffb
RR
74 // implementation
75 // -------------
58614078
RR
76
77 void ApplyWidgetStyle();
20e05ffb
RR
78 int m_rangeMax;
79 int m_gaugePos;
80 bool m_useProgressBar;
81
82private:
83 DECLARE_DYNAMIC_CLASS(wxGauge)
1a56f55c
RR
84};
85
dcf924a3
RR
86#endif
87
c801d85f 88#endif // __GTKGAUGEH__