]>
Commit | Line | Data |
---|---|---|
768d9ec8 DE |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/cocoa/spinbutt.h | |
3 | // Purpose: wxSpinButton class | |
4 | // Author: David Elliott | |
5 | // Modified by: | |
6 | // Created: 2003/07/14 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2003 David Elliott | |
65571936 | 9 | // Licence: wxWindows licence |
768d9ec8 DE |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef __WX_COCOA_SPINBUTT_H__ | |
13 | #define __WX_COCOA_SPINBUTT_H__ | |
14 | ||
15 | // #include "wx/cocoa/NSStepper.h" | |
16 | ||
17 | // ======================================================================== | |
18 | // wxSpinButton | |
19 | // ======================================================================== | |
20 | class WXDLLEXPORT wxSpinButton: public wxSpinButtonBase// , protected wxCocoaNSStepper | |
21 | { | |
22 | DECLARE_DYNAMIC_CLASS(wxSpinButton) | |
23 | DECLARE_EVENT_TABLE() | |
24 | // WX_DECLARE_COCOA_OWNER(NSStepper,NSControl,NSView) | |
25 | // ------------------------------------------------------------------------ | |
26 | // initialization | |
27 | // ------------------------------------------------------------------------ | |
28 | public: | |
29 | wxSpinButton() { } | |
30 | wxSpinButton(wxWindow *parent, wxWindowID winid = -1, | |
31 | const wxPoint& pos = wxDefaultPosition, | |
32 | const wxSize& size = wxDefaultSize, | |
33 | long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, | |
34 | const wxString& name = wxSPIN_BUTTON_NAME) | |
35 | { | |
36 | Create(parent, winid, pos, size, style, name); | |
37 | } | |
38 | ||
39 | bool Create(wxWindow *parent, wxWindowID winid = -1, | |
40 | const wxPoint& pos = wxDefaultPosition, | |
41 | const wxSize& size = wxDefaultSize, | |
4930046b | 42 | long style = wxSP_HORIZONTAL, |
768d9ec8 DE |
43 | const wxString& name = wxSPIN_BUTTON_NAME); |
44 | virtual ~wxSpinButton(); | |
45 | ||
46 | // ------------------------------------------------------------------------ | |
47 | // Cocoa callbacks | |
48 | // ------------------------------------------------------------------------ | |
49 | protected: | |
11573ad8 | 50 | virtual void CocoaTarget_action(); |
768d9ec8 DE |
51 | // ------------------------------------------------------------------------ |
52 | // Implementation | |
53 | // ------------------------------------------------------------------------ | |
54 | public: | |
55 | // Pure Virtuals | |
11573ad8 DE |
56 | virtual int GetValue() const; |
57 | virtual void SetValue(int value); | |
768d9ec8 DE |
58 | |
59 | // retrieve/change the range | |
11573ad8 | 60 | virtual void SetRange(int minValue, int maxValue); |
768d9ec8 DE |
61 | }; |
62 | ||
63 | #endif // __WX_COCOA_SPINBUTT_H__ |