1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Stefan Csomor
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_SPINBUTT_H_
12 #define _WX_SPINBUTT_H_
14 #include "wx/control.h"
18 The wxSpinButton is like a small scrollbar than is often placed next
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
27 class WXDLLIMPEXP_CORE wxSpinButton
: public wxSpinButtonBase
33 wxSpinButton(wxWindow
*parent
,
35 const wxPoint
& pos
= wxDefaultPosition
,
36 const wxSize
& size
= wxDefaultSize
,
37 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
38 const wxString
& name
= wxT("wxSpinButton"))
40 Create(parent
, id
, pos
, size
, style
, name
);
43 virtual ~wxSpinButton();
45 bool Create(wxWindow
*parent
,
47 const wxPoint
& pos
= wxDefaultPosition
,
48 const wxSize
& size
= wxDefaultSize
,
49 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
50 const wxString
& name
= wxT("wxSpinButton"));
54 virtual void SetRange(int minVal
, int maxVal
);
55 virtual int GetValue() const ;
56 virtual void SetValue(int val
);
60 virtual void TriggerScrollEvent( wxEventType scrollEvent
) ;
62 // osx specific event handling common for all osx-ports
64 virtual bool OSXHandleClicked( double timestampsec
);
67 void SendThumbTrackEvent() ;
69 virtual wxSize
DoGetBestSize() const;
72 DECLARE_DYNAMIC_CLASS(wxSpinButton
)