]>
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 ///////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "gauge.h"
16 // ----------------------------------------------------------------------------
17 // wxGauge: a progress bar
18 // ----------------------------------------------------------------------------
20 class WXDLLEXPORT wxGauge
: public wxGaugeBase
25 wxGauge(wxWindow
*parent
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 long style
= wxGA_HORIZONTAL
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxGaugeNameStr
)
36 (void)Create(parent
, id
, range
, pos
, size
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 long style
= wxGA_HORIZONTAL
,
45 const wxValidator
& validator
= wxDefaultValidator
,
46 const wxString
& name
= wxGaugeNameStr
);
48 // implement base class virtuals
49 virtual void SetRange(int range
);
50 virtual void SetValue(int pos
);
52 // wxUniv-specific methods
54 // is it a smooth progress bar or a discrete one?
55 bool IsSmooth() const { return (GetWindowStyle() & wxGA_SMOOTH
) != 0; }
57 // is it a vertica; progress bar or a horizontal one?
58 bool IsVertical() const { return (GetWindowStyle() & wxGA_VERTICAL
) != 0; }
61 // common part of all ctors
64 // return the def border for a progress bar
65 virtual wxBorder
GetDefaultBorder() const;
67 // return the default size
68 virtual wxSize
DoGetBestClientSize() const;
71 virtual void DoDraw(wxControlRenderer
*renderer
);
73 DECLARE_DYNAMIC_CLASS(wxGauge
)