]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/spinctrl.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSpinCtrlBase class
4 // Author: Vadim Zeitlin
8 // Copyright: (c) Vadim Zeitlin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_SPINCTRL_H_
13 #define _WX_SPINCTRL_H_
15 #include "wx/control.h"
18 // ----------------------------------------------------------------------------
19 // a spin ctrl is a text control with a spin button which is usually used to
20 // prompt the user for a numeric input
21 // ----------------------------------------------------------------------------
23 /* there is no generic base class for this control because it's imlpemented
24 very differently under MSW and other platforms
26 class WXDLLEXPORT wxSpinCtrlBase : public wxControl
29 wxSpinCtrlBase() { Init(); }
32 virtual int GetValue() const = 0;
33 virtual int GetMin() const { return m_min; }
34 virtual int GetMax() const { return m_max; }
37 virtual void SetValue(const wxString& value) = 0;
38 virtual void SetValue(int val) = 0;
39 virtual void SetRange(int minVal, int maxVal) = 0;
42 // initialize m_min/max with the default values
43 void Init() { m_min = 0; m_max = 100; }
50 // ----------------------------------------------------------------------------
51 // include the platform-dependent class implementation
52 // ----------------------------------------------------------------------------
54 #if defined(__WXMSW__) && defined(__WIN32__)
55 #include "wx/msw/spinctrl.h"
56 #elif defined(__WXPM__)
57 #include "wx/os2/spinctrl.h"
58 #elif defined(__WXGTK__)
59 #include "wx/gtk/spinctrl.h"
60 #else // Win16 || !Win
61 #include "wx/generic/spinctlg.h"
64 #endif // _WX_SPINCTRL_H_