]>
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 wxWindows team
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GAUGE_H_BASE_
13 #define _WX_GAUGE_H_BASE_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "gaugebase.h"
23 #include "wx/control.h"
25 // ----------------------------------------------------------------------------
26 // wxGauge style flags
27 // ----------------------------------------------------------------------------
29 #define wxGA_HORIZONTAL wxHORIZONTAL
30 #define wxGA_VERTICAL wxVERTICAL
32 // Win32 only, is default (and only) on some other platforms
33 #define wxGA_SMOOTH 0x0020
36 #define wxGA_PROGRESSBAR 0
39 WXDLLEXPORT_DATA(extern const wxChar
*) wxGaugeNameStr
;
41 // ----------------------------------------------------------------------------
42 // wxGauge: a progress bar
43 // ----------------------------------------------------------------------------
45 class WXDLLEXPORT wxGaugeBase
: public wxControl
48 wxGaugeBase() { m_rangeMax
= m_gaugePos
= 0; }
49 virtual ~wxGaugeBase();
51 bool Create(wxWindow
*parent
,
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
);
60 // set/get the control range
61 virtual void SetRange(int range
);
62 virtual int GetRange() const;
65 virtual void SetValue(int pos
);
66 virtual int GetValue() const;
69 bool IsVertical() const { return HasFlag(wxGA_VERTICAL
); }
72 // appearance params (not implemented for most ports)
73 virtual void SetShadowWidth(int w
);
74 virtual int GetShadowWidth() const;
76 virtual void SetBezelFace(int w
);
77 virtual int GetBezelFace() const;
79 // overriden base class virtuals
80 virtual bool AcceptsFocus() const { return FALSE
; }
86 // the current position
89 DECLARE_NO_COPY_CLASS(wxGaugeBase
)
92 #if defined(__WXUNIVERSAL__)
93 #include "wx/univ/gauge.h"
94 #elif defined(__WXMSW__)
96 #include "wx/msw/gauge95.h"
97 #define wxGauge wxGauge95
99 // Gauge no longer supported on 16-bit Windows
101 #elif defined(__WXMOTIF__)
102 #include "wx/motif/gauge.h"
103 #elif defined(__WXGTK__)
104 #include "wx/gtk/gauge.h"
105 #elif defined(__WXMAC__)
106 #include "wx/mac/gauge.h"
107 #elif defined(__WXCOCOA__)
108 #include "wx/cocoa/gauge.h"
109 #elif defined(__WXPM__)
110 #include "wx/os2/gauge.h"
113 #endif // wxUSE_GAUGE