]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/gauge.h
added test for writing empty value to the config
[wxWidgets.git] / include / wx / gtk / gauge.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: gauge.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
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"
19
20#if wxUSE_GAUGE
21
22#include "wx/object.h"
23#include "wx/list.h"
24#include "wx/control.h"
25
26//-----------------------------------------------------------------------------
27// classes
28//-----------------------------------------------------------------------------
29
30class wxGauge;
31
32//-----------------------------------------------------------------------------
33// global data
34//-----------------------------------------------------------------------------
35
36extern const char* wxGaugeNameStr;
37
38//-----------------------------------------------------------------------------
39// wxGaugeBox
40//-----------------------------------------------------------------------------
41
42class wxGauge: public wxControl
43{
44public:
45 inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
46
47 inline wxGauge( wxWindow *parent, wxWindowID id, int range,
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
50 long style = wxGA_HORIZONTAL,
51 const wxValidator& validator = wxDefaultValidator,
52 const wxString& name = wxGaugeNameStr )
53 {
54 Create(parent, id, range, pos, size, style, validator, name);
55 }
56 bool Create( wxWindow *parent, wxWindowID id, int range,
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize& size = wxDefaultSize,
59 long style = wxGA_HORIZONTAL,
60 const wxValidator& validator = wxDefaultValidator,
61 const wxString& name = wxGaugeNameStr );
62 void SetShadowWidth( int WXUNUSED(w) ) {};
63 void SetBezelFace( int WXUNUSED(w) ) {};
64 void SetRange( int r );
65 void SetValue( int pos );
66 int GetShadowWidth() const { return 0; };
67 int GetBezelFace() const { return 0; };
68 int GetRange() const;
69 int GetValue() const;
70
71 // Are we a Win95/GTK progress bar, or a normal gauge?
72 inline bool GetProgressBar() const { return m_useProgressBar; }
73
74 // implementation
75 // -------------
76
77 void ApplyWidgetStyle();
78 int m_rangeMax;
79 int m_gaugePos;
80 bool m_useProgressBar;
81
82private:
83 DECLARE_DYNAMIC_CLASS(wxGauge)
84};
85
86#endif
87
88#endif // __GTKGAUGEH__