]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/gauge.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / gtk1 / gauge.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/gauge.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
58614078 5// Copyright: (c) 1998 Robert Roebling
1b88201f 6// Licence: wxWindows licence
c801d85f
KB
7/////////////////////////////////////////////////////////////////////////////
8
c801d85f
KB
9#ifndef __GTKGAUGEH__
10#define __GTKGAUGEH__
11
c801d85f
KB
12//-----------------------------------------------------------------------------
13// wxGaugeBox
14//-----------------------------------------------------------------------------
15
a0f3a021 16class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase
1a56f55c 17{
20e05ffb 18public:
2b5f62a0
VZ
19 wxGauge() { Init(); }
20
21 wxGauge( wxWindow *parent,
22 wxWindowID id,
23 int range,
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize,
26 long style = wxGA_HORIZONTAL,
27 const wxValidator& validator = wxDefaultValidator,
28 const wxString& name = wxGaugeNameStr )
6de97a3b 29 {
2b5f62a0
VZ
30 Init();
31
32 Create(parent, id, range, pos, size, style, validator, name);
6de97a3b 33 }
2b5f62a0
VZ
34
35 bool Create( wxWindow *parent,
36 wxWindowID id, int range,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = wxGA_HORIZONTAL,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxGaugeNameStr );
42
43 void SetShadowWidth( int WXUNUSED(w) ) { }
44 void SetBezelFace( int WXUNUSED(w) ) { }
6de97a3b
RR
45 void SetRange( int r );
46 void SetValue( int pos );
6dd0883d
SN
47 int GetShadowWidth() const { return 0; }
48 int GetBezelFace() const { return 0; }
36b3b54a
RR
49 int GetRange() const;
50 int GetValue() const;
6de97a3b 51
e04fe03d 52 bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
8ef94bfc 53
9d522606
RD
54 static wxVisualAttributes
55 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
8ef94bfc 56
20e05ffb
RR
57 // implementation
58 // -------------
2b5f62a0 59
2b5f62a0
VZ
60 // the max and current gauge values
61 int m_rangeMax,
62 m_gaugePos;
63
2b5f62a0
VZ
64protected:
65 // common part of all ctors
66 void Init() { m_rangeMax = m_gaugePos = 0; }
67
68 // set the gauge value to the value of m_gaugePos
69 void DoSetGauge();
70
3a12cb0a
RD
71 virtual wxSize DoGetBestSize() const;
72
9d522606
RD
73 virtual wxVisualAttributes GetDefaultAttributes() const;
74
20e05ffb
RR
75private:
76 DECLARE_DYNAMIC_CLASS(wxGauge)
1a56f55c
RR
77};
78
1b88201f
WS
79#endif
80 // __GTKGAUGEH__