]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/gauge.h
don't try to paint hidden windows
[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
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
0416c418
PC
10#ifndef _WX_GTK_GAUGE_H_
11#define _WX_GTK_GAUGE_H_
1a56f55c 12
c801d85f 13//-----------------------------------------------------------------------------
0416c418 14// wxGauge
c801d85f
KB
15//-----------------------------------------------------------------------------
16
20123d49 17class WXDLLIMPEXP_CORE wxGauge: public wxControl
1a56f55c 18{
20e05ffb 19public:
2b5f62a0
VZ
20 wxGauge() { Init(); }
21
22 wxGauge( wxWindow *parent,
23 wxWindowID id,
24 int range,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize,
27 long style = wxGA_HORIZONTAL,
28 const wxValidator& validator = wxDefaultValidator,
29 const wxString& name = wxGaugeNameStr )
6de97a3b 30 {
2b5f62a0
VZ
31 Init();
32
33 Create(parent, id, range, pos, size, style, validator, name);
6de97a3b 34 }
2b5f62a0
VZ
35
36 bool Create( wxWindow *parent,
37 wxWindowID id, int range,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = wxGA_HORIZONTAL,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxGaugeNameStr );
43
44 void SetShadowWidth( int WXUNUSED(w) ) { }
45 void SetBezelFace( int WXUNUSED(w) ) { }
6de97a3b
RR
46 void SetRange( int r );
47 void SetValue( int pos );
36b3b54a
RR
48 int GetShadowWidth() const { return 0; };
49 int GetBezelFace() const { return 0; };
50 int GetRange() const;
51 int GetValue() const;
6de97a3b 52
e04fe03d
RD
53 bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
54
9d522606
RD
55 static wxVisualAttributes
56 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
6f02a879
VZ
57
58 virtual wxVisualAttributes GetDefaultAttributes() const;
9d522606 59
20e05ffb
RR
60 // implementation
61 // -------------
2b5f62a0 62
2b5f62a0
VZ
63 // the max and current gauge values
64 int m_rangeMax,
65 m_gaugePos;
66
2b5f62a0
VZ
67protected:
68 // common part of all ctors
69 void Init() { m_rangeMax = m_gaugePos = 0; }
70
71 // set the gauge value to the value of m_gaugePos
72 void DoSetGauge();
73
3a12cb0a
RD
74 virtual wxSize DoGetBestSize() const;
75
20e05ffb
RR
76private:
77 DECLARE_DYNAMIC_CLASS(wxGauge)
1a56f55c
RR
78};
79
0416c418 80#endif // _WX_GTK_GAUGE_H_