]> git.saurik.com Git - wxWidgets.git/blame - include/wx/univ/gauge.h
Revert r62598 which removed "unnecessary wxOSX_USE_COCOA checks."
[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
20ceebaa
MW
12#ifndef _WX_UNIV_GAUGE_H_
13#define _WX_UNIV_GAUGE_H_
14
1e6feb95
VZ
15// ----------------------------------------------------------------------------
16// wxGauge: a progress bar
17// ----------------------------------------------------------------------------
18
53a2db12 19class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase
1e6feb95
VZ
20{
21public:
22 wxGauge() { Init(); }
23
24 wxGauge(wxWindow *parent,
25 wxWindowID id,
26 int range,
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)
32 {
33 Init();
34
35 (void)Create(parent, id, range, pos, size, style, validator, name);
36 }
37
38 bool Create(wxWindow *parent,
39 wxWindowID id,
40 int range,
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);
46
47 // implement base class virtuals
48 virtual void SetRange(int range);
49 virtual void SetValue(int pos);
50
51 // wxUniv-specific methods
52
53 // is it a smooth progress bar or a discrete one?
54 bool IsSmooth() const { return (GetWindowStyle() & wxGA_SMOOTH) != 0; }
55
56 // is it a vertica; progress bar or a horizontal one?
57 bool IsVertical() const { return (GetWindowStyle() & wxGA_VERTICAL) != 0; }
58
59protected:
60 // common part of all ctors
61 void Init();
62
63 // return the def border for a progress bar
64 virtual wxBorder GetDefaultBorder() const;
65
66 // return the default size
67 virtual wxSize DoGetBestClientSize() const;
68
69 // draw the control
70 virtual void DoDraw(wxControlRenderer *renderer);
71
72 DECLARE_DYNAMIC_CLASS(wxGauge)
73};
20ceebaa
MW
74
75#endif // _WX_UNIV_GAUGE_H_