]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/gauge.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
14 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
22 #include "wx/object.h"
24 #include "wx/control.h"
26 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 //-----------------------------------------------------------------------------
36 extern const wxChar
* wxGaugeNameStr
;
38 //-----------------------------------------------------------------------------
40 //-----------------------------------------------------------------------------
42 class wxGauge
: public wxControl
47 wxGauge( wxWindow
*parent
,
50 const wxPoint
& pos
= wxDefaultPosition
,
51 const wxSize
& size
= wxDefaultSize
,
52 long style
= wxGA_HORIZONTAL
,
53 const wxValidator
& validator
= wxDefaultValidator
,
54 const wxString
& name
= wxGaugeNameStr
)
58 Create(parent
, id
, range
, pos
, size
, style
, validator
, name
);
61 bool Create( wxWindow
*parent
,
62 wxWindowID id
, int range
,
63 const wxPoint
& pos
= wxDefaultPosition
,
64 const wxSize
& size
= wxDefaultSize
,
65 long style
= wxGA_HORIZONTAL
,
66 const wxValidator
& validator
= wxDefaultValidator
,
67 const wxString
& name
= wxGaugeNameStr
);
69 void SetShadowWidth( int WXUNUSED(w
) ) { }
70 void SetBezelFace( int WXUNUSED(w
) ) { }
71 void SetRange( int r
);
72 void SetValue( int pos
);
73 int GetShadowWidth() const { return 0; };
74 int GetBezelFace() const { return 0; };
78 bool IsVertical() const { return HasFlag(wxGA_VERTICAL
); }
80 static wxVisualAttributes
81 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
86 void ApplyWidgetStyle();
88 // the max and current gauge values
92 // obsolete functions, don't use
93 #if WXWIN_COMPATIBILITY_2_2
94 bool GetProgressBar() const { return true; }
95 #endif // WXWIN_COMPATIBILITY_2_2
98 // common part of all ctors
99 void Init() { m_rangeMax
= m_gaugePos
= 0; }
101 // set the gauge value to the value of m_gaugePos
104 virtual wxSize
DoGetBestSize() const;
106 virtual wxVisualAttributes
GetDefaultAttributes() const;
109 DECLARE_DYNAMIC_CLASS(wxGauge
)
114 #endif // __GTKGAUGEH__