]> git.saurik.com Git - wxWidgets.git/blame - include/wx/spinctrl.h
we don't need reserved virtual functions on HEAD
[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
65571936 9// Licence: wxWindows licence
b782f2e0
VZ
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SPINCTRL_H_
13#define _WX_SPINCTRL_H_
14
2ecf902b
WS
15#include "wx/defs.h"
16
17#if wxUSE_SPINCTRL
18
9d9b7755 19#include "wx/spinbutt.h" // should make wxSpinEvent visible to the app
b782f2e0
VZ
20
21// ----------------------------------------------------------------------------
22// a spin ctrl is a text control with a spin button which is usually used to
23// prompt the user for a numeric input
24// ----------------------------------------------------------------------------
25
26/* there is no generic base class for this control because it's imlpemented
27 very differently under MSW and other platforms
28
29class WXDLLEXPORT wxSpinCtrlBase : public wxControl
30{
31public:
32 wxSpinCtrlBase() { Init(); }
33
34 // accessors
35 virtual int GetValue() const = 0;
36 virtual int GetMin() const { return m_min; }
37 virtual int GetMax() const { return m_max; }
38
39 // operations
36f210c8 40 virtual void SetValue(const wxString& value) = 0;
b782f2e0
VZ
41 virtual void SetValue(int val) = 0;
42 virtual void SetRange(int minVal, int maxVal) = 0;
43
14bc59a2
VZ
44 // as the wxTextCtrl method
45 virtual void SetSelection(long from, long to) = 0;
46
b782f2e0
VZ
47protected:
48 // initialize m_min/max with the default values
49 void Init() { m_min = 0; m_max = 100; }
50
51 int m_min;
52 int m_max;
53};
54*/
55
56// ----------------------------------------------------------------------------
57// include the platform-dependent class implementation
58// ----------------------------------------------------------------------------
59
1e6feb95
VZ
60#if defined(__WXUNIVERSAL__)
61 #include "wx/generic/spinctlg.h"
3a5bcc4d 62#elif defined(__WXMSW__)
b782f2e0 63 #include "wx/msw/spinctrl.h"
04701dd9
DW
64#elif defined(__WXPM__)
65 #include "wx/os2/spinctrl.h"
1be7a35c 66#elif defined(__WXGTK20__)
738f9e5a 67 #include "wx/gtk/spinctrl.h"
1be7a35c
MR
68#elif defined(__WXGTK__)
69 #include "wx/gtk1/spinctrl.h"
9806a47c
JS
70#elif defined(__WXMOTIF__)
71 #include "wx/generic/spinctlg.h"
1e5e1c40 72#elif defined(__WXMAC__)
571d14b2 73 #include "wx/mac/spinctrl.h"
c1d19dfb
DE
74#elif defined(__WXCOCOA__)
75 #include "wx/generic/spinctlg.h"
b782f2e0
VZ
76#endif // platform
77
82a5f02c 78#define EVT_SPINCTRL(id, fn) \
7fa03f04 79 wx__DECLARE_EVT1(wxEVT_COMMAND_SPINCTRL_UPDATED, id, wxSpinEventHandler(fn))
5dd26b08 80
2ecf902b 81#endif // wxUSE_SPINCTRL
b782f2e0 82
2ecf902b 83#endif // _WX_SPINCTRL_H_