]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gauge.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGauge interface
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1996-2001 wxWidgets team
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GAUGE_H_BASE_
13 #define _WX_GAUGE_H_BASE_
19 #include "wx/control.h"
21 // ----------------------------------------------------------------------------
22 // wxGauge style flags
23 // ----------------------------------------------------------------------------
25 #define wxGA_HORIZONTAL wxHORIZONTAL
26 #define wxGA_VERTICAL wxVERTICAL
28 // Win32 only, is default (and only) on some other platforms
29 #define wxGA_SMOOTH 0x0020
32 #define wxGA_PROGRESSBAR 0
35 extern WXDLLEXPORT_DATA(const wxChar
) wxGaugeNameStr
[];
37 // ----------------------------------------------------------------------------
38 // wxGauge: a progress bar
39 // ----------------------------------------------------------------------------
41 class WXDLLEXPORT wxGaugeBase
: public wxControl
44 wxGaugeBase() { m_rangeMax
= m_gaugePos
= 0; }
45 virtual ~wxGaugeBase();
47 bool Create(wxWindow
*parent
,
50 const wxPoint
& pos
= wxDefaultPosition
,
51 const wxSize
& size
= wxDefaultSize
,
52 long style
= wxGA_HORIZONTAL
,
53 const wxValidator
& validator
= wxDefaultValidator
,
54 const wxString
& name
= wxGaugeNameStr
);
56 // set/get the control range
57 virtual void SetRange(int range
);
58 virtual int GetRange() const;
61 virtual void SetValue(int pos
);
62 virtual int GetValue() const;
65 bool IsVertical() const { return HasFlag(wxGA_VERTICAL
); }
68 // appearance params (not implemented for most ports)
69 virtual void SetShadowWidth(int w
);
70 virtual int GetShadowWidth() const;
72 virtual void SetBezelFace(int w
);
73 virtual int GetBezelFace() const;
75 // overriden base class virtuals
76 virtual bool AcceptsFocus() const { return false; }
82 // the current position
85 DECLARE_NO_COPY_CLASS(wxGaugeBase
)
88 #if defined(__WXUNIVERSAL__)
89 #include "wx/univ/gauge.h"
90 #elif defined(__WXMSW__)
91 #include "wx/msw/gauge95.h"
92 #define wxGauge wxGauge95
93 #elif defined(__WXMOTIF__)
94 #include "wx/motif/gauge.h"
95 #elif defined(__WXGTK__)
96 #include "wx/gtk/gauge.h"
97 #elif defined(__WXMAC__)
98 #include "wx/mac/gauge.h"
99 #elif defined(__WXCOCOA__)
100 #include "wx/cocoa/gauge.h"
101 #elif defined(__WXPM__)
102 #include "wx/os2/gauge.h"
105 #endif // wxUSE_GAUGE