]> git.saurik.com Git - wxWidgets.git/blame - include/wx/univ/gauge.h
fixed a signed/unsigned comparison warning introudced by last warning fix...
[wxWidgets.git] / include / wx / univ / gauge.h
CommitLineData
1e6feb95
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/univ/gauge.h
3// Purpose: wxUniversal wxGauge declaration
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 20.02.01
7// RCS-ID: $Id$
442b35b5 8// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
65571936 9// Licence: wxWindows licence
1e6feb95
VZ
10///////////////////////////////////////////////////////////////////////////////
11
1e6feb95
VZ
12// ----------------------------------------------------------------------------
13// wxGauge: a progress bar
14// ----------------------------------------------------------------------------
15
16class WXDLLEXPORT wxGauge : public wxGaugeBase
17{
18public:
19 wxGauge() { Init(); }
20
21 wxGauge(wxWindow *parent,
22 wxWindowID id,
23 int range,
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)
29 {
30 Init();
31
32 (void)Create(parent, id, range, pos, size, style, validator, name);
33 }
34
35 bool Create(wxWindow *parent,
36 wxWindowID id,
37 int range,
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);
43
44 // implement base class virtuals
45 virtual void SetRange(int range);
46 virtual void SetValue(int pos);
47
48 // wxUniv-specific methods
49
50 // is it a smooth progress bar or a discrete one?
51 bool IsSmooth() const { return (GetWindowStyle() & wxGA_SMOOTH) != 0; }
52
53 // is it a vertica; progress bar or a horizontal one?
54 bool IsVertical() const { return (GetWindowStyle() & wxGA_VERTICAL) != 0; }
55
56protected:
57 // common part of all ctors
58 void Init();
59
60 // return the def border for a progress bar
61 virtual wxBorder GetDefaultBorder() const;
62
63 // return the default size
64 virtual wxSize DoGetBestClientSize() const;
65
66 // draw the control
67 virtual void DoDraw(wxControlRenderer *renderer);
68
69 DECLARE_DYNAMIC_CLASS(wxGauge)
70};