]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/gauge.h
fixed wxComboBox::Clear to clear stored value
[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
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKGAUGEH__
11#define __GTKGAUGEH__
12
c801d85f 13#include "wx/defs.h"
dcf924a3
RR
14
15#if wxUSE_GAUGE
16
c801d85f
KB
17#include "wx/object.h"
18#include "wx/list.h"
19#include "wx/control.h"
20
21//-----------------------------------------------------------------------------
22// classes
23//-----------------------------------------------------------------------------
24
20123d49 25class WXDLLIMPEXP_CORE wxGauge;
c801d85f 26
1a56f55c
RR
27//-----------------------------------------------------------------------------
28// global data
29//-----------------------------------------------------------------------------
30
20123d49 31extern WXDLLIMPEXP_CORE const wxChar* wxGaugeNameStr;
1a56f55c 32
c801d85f
KB
33//-----------------------------------------------------------------------------
34// wxGaugeBox
35//-----------------------------------------------------------------------------
36
20123d49 37class WXDLLIMPEXP_CORE wxGauge: public wxControl
1a56f55c 38{
20e05ffb 39public:
2b5f62a0
VZ
40 wxGauge() { Init(); }
41
42 wxGauge( wxWindow *parent,
43 wxWindowID id,
44 int range,
45 const wxPoint& pos = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
47 long style = wxGA_HORIZONTAL,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxGaugeNameStr )
6de97a3b 50 {
2b5f62a0
VZ
51 Init();
52
53 Create(parent, id, range, pos, size, style, validator, name);
6de97a3b 54 }
2b5f62a0
VZ
55
56 bool Create( wxWindow *parent,
57 wxWindowID id, int range,
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
60 long style = wxGA_HORIZONTAL,
61 const wxValidator& validator = wxDefaultValidator,
62 const wxString& name = wxGaugeNameStr );
63
64 void SetShadowWidth( int WXUNUSED(w) ) { }
65 void SetBezelFace( int WXUNUSED(w) ) { }
6de97a3b
RR
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 72
e04fe03d
RD
73 bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
74
9d522606
RD
75 static wxVisualAttributes
76 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
77
20e05ffb
RR
78 // implementation
79 // -------------
2b5f62a0 80
2b5f62a0
VZ
81 // the max and current gauge values
82 int m_rangeMax,
83 m_gaugePos;
84
2b5f62a0
VZ
85protected:
86 // common part of all ctors
87 void Init() { m_rangeMax = m_gaugePos = 0; }
88
89 // set the gauge value to the value of m_gaugePos
90 void DoSetGauge();
91
3a12cb0a
RD
92 virtual wxSize DoGetBestSize() const;
93
9d522606
RD
94 virtual wxVisualAttributes GetDefaultAttributes() const;
95
20e05ffb
RR
96private:
97 DECLARE_DYNAMIC_CLASS(wxGauge)
1a56f55c
RR
98};
99
dcf924a3
RR
100#endif
101
c801d85f 102#endif // __GTKGAUGEH__