]>
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
8 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ----------------------------------------------------------------------------
13 // wxGauge: a progress bar
14 // ----------------------------------------------------------------------------
16 class WXDLLEXPORT wxGauge
: public wxGaugeBase
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 (void)Create(parent
, id
, range
, pos
, size
, style
, validator
, name
);
35 bool Create(wxWindow
*parent
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
40 long style
= wxGA_HORIZONTAL
,
41 const wxValidator
& validator
= wxDefaultValidator
,
42 const wxString
& name
= wxGaugeNameStr
);
44 // implement base class virtuals
45 virtual void SetRange(int range
);
46 virtual void SetValue(int pos
);
48 // wxUniv-specific methods
50 // is it a smooth progress bar or a discrete one?
51 bool IsSmooth() const { return (GetWindowStyle() & wxGA_SMOOTH
) != 0; }
53 // is it a vertica; progress bar or a horizontal one?
54 bool IsVertical() const { return (GetWindowStyle() & wxGA_VERTICAL
) != 0; }
57 // common part of all ctors
60 // return the def border for a progress bar
61 virtual wxBorder
GetDefaultBorder() const;
63 // return the default size
64 virtual wxSize
DoGetBestClientSize() const;
67 virtual void DoDraw(wxControlRenderer
*renderer
);
69 DECLARE_DYNAMIC_CLASS(wxGauge
)