]> git.saurik.com Git - wxWidgets.git/blob - include/wx/spinctrl.h
More details about the internal module name changes
[wxWidgets.git] / include / wx / spinctrl.h
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/spinbutt.h" // should make wxSpinEvent visible to the app
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
25 class WXDLLEXPORT wxSpinCtrlBase : public wxControl
26 {
27 public:
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
36 virtual void SetValue(const wxString& value) = 0;
37 virtual void SetValue(int val) = 0;
38 virtual void SetRange(int minVal, int maxVal) = 0;
39
40 // as the wxTextCtrl method
41 virtual void SetSelection(long from, long to) = 0;
42
43 protected:
44 // initialize m_min/max with the default values
45 void Init() { m_min = 0; m_max = 100; }
46
47 int m_min;
48 int m_max;
49 };
50 */
51
52 // ----------------------------------------------------------------------------
53 // include the platform-dependent class implementation
54 // ----------------------------------------------------------------------------
55
56 #if defined(__WXUNIVERSAL__)
57 #include "wx/generic/spinctlg.h"
58 #elif defined(__WXMSW__)
59 #include "wx/msw/spinctrl.h"
60 #elif defined(__WXPM__)
61 #include "wx/os2/spinctrl.h"
62 #elif defined(__WXGTK__)
63 #include "wx/gtk/spinctrl.h"
64 #elif defined(__WXMOTIF__)
65 #include "wx/generic/spinctlg.h"
66 #elif defined(__WXMAC__)
67 #include "wx/mac/spinctrl.h"
68 #elif defined(__WXCOCOA__)
69 #include "wx/generic/spinctlg.h"
70 #endif // platform
71
72 #define EVT_SPINCTRL(id, fn) \
73 DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SPINCTRL_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxSpinEventFunction, & fn ), (wxObject *) NULL ),
74
75 #endif // _WX_SPINCTRL_H_
76