1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/gauge.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
17 #include "wx/object.h"
19 #include "wx/control.h"
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
25 class WXDLLIMPEXP_FWD_CORE wxGauge
;
27 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 extern WXDLLIMPEXP_CORE
const wxChar wxGaugeNameStr
[];
33 //-----------------------------------------------------------------------------
35 //-----------------------------------------------------------------------------
37 class WXDLLIMPEXP_CORE wxGauge
: public wxGaugeBase
42 wxGauge( wxWindow
*parent
,
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
)
53 Create(parent
, id
, range
, pos
, size
, style
, validator
, name
);
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
);
64 void SetShadowWidth( int WXUNUSED(w
) ) { }
65 void SetBezelFace( int WXUNUSED(w
) ) { }
66 void SetRange( int r
);
67 void SetValue( int pos
);
68 int GetShadowWidth() const { return 0; };
69 int GetBezelFace() const { return 0; };
73 bool IsVertical() const { return HasFlag(wxGA_VERTICAL
); }
75 static wxVisualAttributes
76 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
81 // the max and current gauge values
86 // common part of all ctors
87 void Init() { m_rangeMax
= m_gaugePos
= 0; }
89 // set the gauge value to the value of m_gaugePos
92 virtual wxSize
DoGetBestSize() const;
94 virtual wxVisualAttributes
GetDefaultAttributes() const;
97 DECLARE_DYNAMIC_CLASS(wxGauge
)