]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/univ/gauge.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/gauge.h
3 // Purpose: wxUniversal wxGauge declaration
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_UNIV_GAUGE_H_
12 #define _WX_UNIV_GAUGE_H_
14 // ----------------------------------------------------------------------------
15 // wxGauge: a progress bar
16 // ----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxGauge
: public wxGaugeBase
23 wxGauge(wxWindow
*parent
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
28 long style
= wxGA_HORIZONTAL
,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxGaugeNameStr
)
34 (void)Create(parent
, id
, range
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxGA_HORIZONTAL
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxGaugeNameStr
);
46 // implement base class virtuals
47 virtual void SetRange(int range
);
48 virtual void SetValue(int pos
);
50 // wxUniv-specific methods
52 // is it a smooth progress bar or a discrete one?
53 bool IsSmooth() const { return (GetWindowStyle() & wxGA_SMOOTH
) != 0; }
55 // is it a vertica; progress bar or a horizontal one?
56 bool IsVertical() const { return (GetWindowStyle() & wxGA_VERTICAL
) != 0; }
59 // common part of all ctors
62 // return the def border for a progress bar
63 virtual wxBorder
GetDefaultBorder() const;
65 // return the default size
66 virtual wxSize
DoGetBestClientSize() const;
69 virtual void DoDraw(wxControlRenderer
*renderer
);
71 DECLARE_DYNAMIC_CLASS(wxGauge
)
74 #endif // _WX_UNIV_GAUGE_H_