]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/gauge.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/gauge.h
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_GTK_GAUGE_H_
10 #define _WX_GTK_GAUGE_H_
12 //-----------------------------------------------------------------------------
14 //-----------------------------------------------------------------------------
16 class WXDLLIMPEXP_CORE wxGauge
: public wxControl
21 wxGauge( wxWindow
*parent
,
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
)
32 Create(parent
, id
, range
, pos
, size
, style
, validator
, name
);
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
);
43 void SetShadowWidth( int WXUNUSED(w
) ) { }
44 void SetBezelFace( int WXUNUSED(w
) ) { }
45 int GetShadowWidth() const { return 0; }
46 int GetBezelFace() const { return 0; }
48 // determinate mode API
49 void SetRange( int r
);
50 void SetValue( int pos
);
55 // indeterminate mode API
58 bool IsVertical() const { return HasFlag(wxGA_VERTICAL
); }
60 static wxVisualAttributes
61 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
63 virtual wxVisualAttributes
GetDefaultAttributes() const;
68 // the max and current gauge values
73 // set the gauge value to the value of m_gaugePos
76 virtual wxSize
DoGetBestSize() const;
79 void Init() { m_rangeMax
= m_gaugePos
= 0; }
81 DECLARE_DYNAMIC_CLASS(wxGauge
)