]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/spinbutt.h
Define __VISUALC__ for ICC under Windows again.
[wxWidgets.git] / include / wx / osx / spinbutt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_SPINBUTT_H_
12 #define _WX_SPINBUTT_H_
13
14 #include "wx/control.h"
15 #include "wx/event.h"
16
17 /*
18 The wxSpinButton is like a small scrollbar than is often placed next
19 to a text control.
20
21 wxSP_HORIZONTAL: horizontal spin button
22 wxSP_VERTICAL: vertical spin button (the default)
23 wxSP_ARROW_KEYS: arrow keys increment/decrement value
24 wxSP_WRAP: value wraps at either end
25 */
26
27 class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase
28 {
29 public:
30 // construction
31 wxSpinButton();
32
33 wxSpinButton(wxWindow *parent,
34 wxWindowID id = -1,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
38 const wxString& name = wxT("wxSpinButton"))
39 {
40 Create(parent, id, pos, size, style, name);
41 }
42
43 virtual ~wxSpinButton();
44
45 bool Create(wxWindow *parent,
46 wxWindowID id = -1,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
50 const wxString& name = wxT("wxSpinButton"));
51
52
53 // accessors
54 virtual void SetRange(int minVal, int maxVal);
55 virtual int GetValue() const ;
56 virtual void SetValue(int val);
57
58 // implementation
59
60 virtual void TriggerScrollEvent( wxEventType scrollEvent ) ;
61
62 // osx specific event handling common for all osx-ports
63
64 virtual bool OSXHandleClicked( double timestampsec );
65
66 protected:
67 void SendThumbTrackEvent() ;
68
69 virtual wxSize DoGetBestSize() const;
70
71 private:
72 DECLARE_DYNAMIC_CLASS(wxSpinButton)
73 };
74
75 #endif
76 // _WX_SPINBUTT_H_