]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gauge.h
Script updates
[wxWidgets.git] / include / wx / gauge.h
CommitLineData
1e6feb95
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/gauge.h
3// Purpose: wxGauge interface
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 20.02.01
7// RCS-ID: $Id$
77ffb593 8// Copyright: (c) 1996-2001 wxWidgets team
65571936 9// Licence: wxWindows licence
1e6feb95
VZ
10///////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_GAUGE_H_BASE_
13#define _WX_GAUGE_H_BASE_
c801d85f 14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
af49c4b8 16 #pragma interface "gaugebase.h"
1e6feb95
VZ
17#endif
18
19#include "wx/defs.h"
20
21#if wxUSE_GAUGE
22
23#include "wx/control.h"
24
014c5a64
VZ
25// ----------------------------------------------------------------------------
26// wxGauge style flags
27// ----------------------------------------------------------------------------
28
29#define wxGA_HORIZONTAL wxHORIZONTAL
30#define wxGA_VERTICAL wxVERTICAL
31
32// Win32 only, is default (and only) on some other platforms
33#define wxGA_SMOOTH 0x0020
34
35// obsolete style
36#define wxGA_PROGRESSBAR 0
37
38
1e6feb95
VZ
39WXDLLEXPORT_DATA(extern const wxChar*) wxGaugeNameStr;
40
41// ----------------------------------------------------------------------------
42// wxGauge: a progress bar
43// ----------------------------------------------------------------------------
44
45class WXDLLEXPORT wxGaugeBase : public wxControl
46{
47public:
9446dc26 48 wxGaugeBase() { m_rangeMax = m_gaugePos = 0; }
799ea011
GD
49 virtual ~wxGaugeBase();
50
1e6feb95
VZ
51 bool Create(wxWindow *parent,
52 wxWindowID id,
53 int range,
54 const wxPoint& pos = wxDefaultPosition,
55 const wxSize& size = wxDefaultSize,
56 long style = wxGA_HORIZONTAL,
57 const wxValidator& validator = wxDefaultValidator,
58 const wxString& name = wxGaugeNameStr);
59
60 // set/get the control range
61 virtual void SetRange(int range);
62 virtual int GetRange() const;
63
64 // position
65 virtual void SetValue(int pos);
66 virtual int GetValue() const;
67
9446dc26
VZ
68 // simple accessors
69 bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
70
1e6feb95 71
9446dc26 72 // appearance params (not implemented for most ports)
1e6feb95
VZ
73 virtual void SetShadowWidth(int w);
74 virtual int GetShadowWidth() const;
75
76 virtual void SetBezelFace(int w);
77 virtual int GetBezelFace() const;
78
79 // overriden base class virtuals
5d3e7b52 80 virtual bool AcceptsFocus() const { return false; }
1e6feb95
VZ
81
82protected:
83 // the max position
84 int m_rangeMax;
85
86 // the current position
87 int m_gaugePos;
fc7a2a60
VZ
88
89 DECLARE_NO_COPY_CLASS(wxGaugeBase)
1e6feb95
VZ
90};
91
92#if defined(__WXUNIVERSAL__)
93 #include "wx/univ/gauge.h"
94#elif defined(__WXMSW__)
95 #ifdef __WIN95__
96 #include "wx/msw/gauge95.h"
97 #define wxGauge wxGauge95
1e6feb95 98 #else // !__WIN95__
6aa855b9 99 // Gauge no longer supported on 16-bit Windows
1e6feb95 100 #endif
2049ba38 101#elif defined(__WXMOTIF__)
1e6feb95 102 #include "wx/motif/gauge.h"
2049ba38 103#elif defined(__WXGTK__)
1e6feb95 104 #include "wx/gtk/gauge.h"
34138703 105#elif defined(__WXMAC__)
1e6feb95 106 #include "wx/mac/gauge.h"
24e97652
DE
107#elif defined(__WXCOCOA__)
108 #include "wx/cocoa/gauge.h"
1777b9bb 109#elif defined(__WXPM__)
1e6feb95 110 #include "wx/os2/gauge.h"
c801d85f
KB
111#endif
112
1e6feb95
VZ
113#endif // wxUSE_GAUGE
114
c801d85f 115#endif
34138703 116 // _WX_GAUGE_H_BASE_