]> git.saurik.com Git - wxWidgets.git/blame - include/wx/spinctrl.h
Updated install.txt, added double-inclusion guard, corrected a GnuWin32 thing
[wxWidgets.git] / include / wx / spinctrl.h
CommitLineData
b782f2e0
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: spinctrl.h
3// Purpose: wxSpinCtrlBase class
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 22.07.99
7// RCS-ID: $Id$
8// Copyright: (c) Vadim Zeitlin
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SPINCTRL_H_
13#define _WX_SPINCTRL_H_
14
15#include "wx/control.h"
16#include "wx/event.h"
17
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// ----------------------------------------------------------------------------
22
23/* there is no generic base class for this control because it's imlpemented
24 very differently under MSW and other platforms
25
26class WXDLLEXPORT wxSpinCtrlBase : public wxControl
27{
28public:
29 wxSpinCtrlBase() { Init(); }
30
31 // accessors
32 virtual int GetValue() const = 0;
33 virtual int GetMin() const { return m_min; }
34 virtual int GetMax() const { return m_max; }
35
36 // operations
37 virtual void SetValue(int val) = 0;
38 virtual void SetRange(int minVal, int maxVal) = 0;
39
40protected:
41 // initialize m_min/max with the default values
42 void Init() { m_min = 0; m_max = 100; }
43
44 int m_min;
45 int m_max;
46};
47*/
48
49// ----------------------------------------------------------------------------
50// include the platform-dependent class implementation
51// ----------------------------------------------------------------------------
52
53#if defined(__WXMSW__) && defined(__WIN32__)
54 #include "wx/msw/spinctrl.h"
738f9e5a
RR
55#elif defined(__WXGTK__)
56 #include "wx/gtk/spinctrl.h"
b782f2e0
VZ
57#else // Win16 || !Win
58 #include "wx/generic/spinctrl.h"
59#endif // platform
60
61#endif // _WX_SPINCTRL_H_
62