]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: spinbutt.h | |
3 | // Purpose: wxSpinButton class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
31528cd3 | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_SPINBUTT_H_ |
13 | #define _WX_SPINBUTT_H_ | |
2bda0e17 KB |
14 | |
15 | #ifdef __GNUG__ | |
b782f2e0 | 16 | #pragma interface "spinbutt.h" |
2bda0e17 KB |
17 | #endif |
18 | ||
19 | #include "wx/control.h" | |
20 | #include "wx/event.h" | |
21 | ||
22 | #if defined(__WIN95__) | |
23 | ||
31528cd3 | 24 | class WXDLLEXPORT wxSpinButton : public wxSpinButtonBase |
2bda0e17 | 25 | { |
aeafc354 | 26 | public: |
b782f2e0 | 27 | // construction |
5ea47806 | 28 | wxSpinButton() { } |
a23fd0e1 | 29 | |
aeafc354 VZ |
30 | wxSpinButton(wxWindow *parent, |
31 | wxWindowID id = -1, | |
32 | const wxPoint& pos = wxDefaultPosition, | |
33 | const wxSize& size = wxDefaultSize, | |
34 | long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, | |
35 | const wxString& name = "wxSpinButton") | |
36 | { | |
37 | Create(parent, id, pos, size, style, name); | |
38 | } | |
a23fd0e1 | 39 | |
aeafc354 | 40 | virtual ~wxSpinButton(); |
a23fd0e1 | 41 | |
aeafc354 VZ |
42 | bool Create(wxWindow *parent, |
43 | wxWindowID id = -1, | |
44 | const wxPoint& pos = wxDefaultPosition, | |
45 | const wxSize& size = wxDefaultSize, | |
a23fd0e1 | 46 | long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, |
aeafc354 | 47 | const wxString& name = "wxSpinButton"); |
a23fd0e1 VZ |
48 | |
49 | ||
0655ad29 | 50 | // accessors |
31528cd3 VZ |
51 | virtual int GetValue() const; |
52 | virtual void SetValue(int val); | |
53 | virtual void SetRange(int minVal, int maxVal); | |
a23fd0e1 | 54 | |
0655ad29 | 55 | // implementation |
aeafc354 | 56 | virtual bool MSWCommand(WXUINT param, WXWORD id); |
0655ad29 | 57 | virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); |
a23fd0e1 VZ |
58 | virtual bool MSWOnScroll(int orientation, WXWORD wParam, |
59 | WXWORD pos, WXHWND control); | |
b782f2e0 VZ |
60 | |
61 | protected: | |
62 | virtual wxSize DoGetBestSize(); | |
63 | ||
64 | private: | |
65 | DECLARE_DYNAMIC_CLASS(wxSpinButton) | |
2bda0e17 KB |
66 | }; |
67 | ||
2bda0e17 | 68 | #endif |
b782f2e0 | 69 | // __WIN95__ |
2bda0e17 | 70 | #endif |
bbcdf8bc | 71 | // _WX_SPINBUTT_H_ |