]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/gauge.h
Include some more declarations & defines.
[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
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
1b88201f 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKGAUGEH__
11#define __GTKGAUGEH__
12
c801d85f
KB
13//-----------------------------------------------------------------------------
14// wxGaugeBox
15//-----------------------------------------------------------------------------
16
a0f3a021 17class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase
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 53 bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
8ef94bfc 54
9d522606
RD
55 static wxVisualAttributes
56 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
8ef94bfc 57
20e05ffb
RR
58 // implementation
59 // -------------
2b5f62a0 60
2b5f62a0
VZ
61 // the max and current gauge values
62 int m_rangeMax,
63 m_gaugePos;
64
2b5f62a0
VZ
65protected:
66 // common part of all ctors
67 void Init() { m_rangeMax = m_gaugePos = 0; }
68
69 // set the gauge value to the value of m_gaugePos
70 void DoSetGauge();
71
3a12cb0a
RD
72 virtual wxSize DoGetBestSize() const;
73
9d522606
RD
74 virtual wxVisualAttributes GetDefaultAttributes() const;
75
20e05ffb
RR
76private:
77 DECLARE_DYNAMIC_CLASS(wxGauge)
1a56f55c
RR
78};
79
1b88201f
WS
80#endif
81 // __GTKGAUGEH__