]> git.saurik.com Git - wxWidgets.git/blame - include/wx/spinctrl.h
Committing in .
[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
9d9b7755 15#include "wx/spinbutt.h" // should make wxSpinEvent visible to the app
b782f2e0
VZ
16
17// ----------------------------------------------------------------------------
18// a spin ctrl is a text control with a spin button which is usually used to
19// prompt the user for a numeric input
20// ----------------------------------------------------------------------------
21
22/* there is no generic base class for this control because it's imlpemented
23 very differently under MSW and other platforms
24
25class WXDLLEXPORT wxSpinCtrlBase : public wxControl
26{
27public:
28 wxSpinCtrlBase() { Init(); }
29
30 // accessors
31 virtual int GetValue() const = 0;
32 virtual int GetMin() const { return m_min; }
33 virtual int GetMax() const { return m_max; }
34
35 // operations
36f210c8 36 virtual void SetValue(const wxString& value) = 0;
b782f2e0
VZ
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
1e6feb95
VZ
53#if defined(__WXUNIVERSAL__)
54 #include "wx/generic/spinctlg.h"
55#elif defined(__WXMSW__) && defined(__WIN32__)
b782f2e0 56 #include "wx/msw/spinctrl.h"
04701dd9
DW
57#elif defined(__WXPM__)
58 #include "wx/os2/spinctrl.h"
738f9e5a
RR
59#elif defined(__WXGTK__)
60 #include "wx/gtk/spinctrl.h"
9806a47c
JS
61#elif defined(__WXMOTIF__)
62 #include "wx/generic/spinctlg.h"
1e5e1c40
GD
63#elif defined(__WXMAC__)
64 #include "wx/generic/spinctlg.h"
b782f2e0 65#else // Win16 || !Win
36f210c8 66 #include "wx/generic/spinctlg.h"
b782f2e0
VZ
67#endif // platform
68
82a5f02c 69#define EVT_SPINCTRL(id, fn) \
2e4df4bf 70 DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SPINCTRL_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & fn, (wxObject *) NULL ),
5dd26b08 71
b782f2e0
VZ
72#endif // _WX_SPINCTRL_H_
73