]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/univ/gauge.h
180a923f333d535b968a63ab93840a5ca53673ed
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/gauge.h
3 // Purpose: wxUniversal wxGauge declaration
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_UNIV_GAUGE_H_
13 #define _WX_UNIV_GAUGE_H_
15 // ----------------------------------------------------------------------------
16 // wxGauge: a progress bar
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxGauge
: public wxGaugeBase
24 wxGauge(wxWindow
*parent
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
29 long style
= wxGA_HORIZONTAL
,
30 const wxValidator
& validator
= wxDefaultValidator
,
31 const wxString
& name
= wxGaugeNameStr
)
35 (void)Create(parent
, id
, range
, pos
, size
, style
, validator
, name
);
38 bool Create(wxWindow
*parent
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
,
43 long style
= wxGA_HORIZONTAL
,
44 const wxValidator
& validator
= wxDefaultValidator
,
45 const wxString
& name
= wxGaugeNameStr
);
47 // implement base class virtuals
48 virtual void SetRange(int range
);
49 virtual void SetValue(int pos
);
51 // wxUniv-specific methods
53 // is it a smooth progress bar or a discrete one?
54 bool IsSmooth() const { return (GetWindowStyle() & wxGA_SMOOTH
) != 0; }
56 // is it a vertica; progress bar or a horizontal one?
57 bool IsVertical() const { return (GetWindowStyle() & wxGA_VERTICAL
) != 0; }
60 // common part of all ctors
63 // return the def border for a progress bar
64 virtual wxBorder
GetDefaultBorder() const;
66 // return the default size
67 virtual wxSize
DoGetBestClientSize() const;
70 virtual void DoDraw(wxControlRenderer
*renderer
);
72 DECLARE_DYNAMIC_CLASS(wxGauge
)
75 #endif // _WX_UNIV_GAUGE_H_