1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSpinButton class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_SPINBUTT_H_
13 #define _WX_SPINBUTT_H_
15 #include "wx/control.h"
19 The wxSpinButton is like a small scrollbar than is often placed next
22 wxSP_HORIZONTAL: horizontal spin button
23 wxSP_VERTICAL: vertical spin button (the default)
24 wxSP_ARROW_KEYS: arrow keys increment/decrement value
25 wxSP_WRAP: value wraps at either end
28 class WXDLLIMPEXP_CORE wxSpinButton
: public wxSpinButtonBase
34 wxSpinButton(wxWindow
*parent
,
36 const wxPoint
& pos
= wxDefaultPosition
,
37 const wxSize
& size
= wxDefaultSize
,
38 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
39 const wxString
& name
= wxT("wxSpinButton"))
41 Create(parent
, id
, pos
, size
, style
, name
);
44 virtual ~wxSpinButton();
46 bool Create(wxWindow
*parent
,
48 const wxPoint
& pos
= wxDefaultPosition
,
49 const wxSize
& size
= wxDefaultSize
,
50 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
51 const wxString
& name
= wxT("wxSpinButton"));
55 virtual int GetMin() const;
56 virtual int GetMax() const;
57 virtual int GetValue() const;
58 virtual void SetValue(int val
);
59 virtual void SetRange(int minVal
, int maxVal
);
63 virtual void MacHandleControlClick( WXWidget control
, wxInt16 controlpart
, bool mouseStillDown
) ;
64 virtual wxInt32
MacControlHit( WXEVENTHANDLERREF handler
, WXEVENTREF event
) ;
67 void MacHandleValueChanged( int inc
) ;
68 virtual wxSize
DoGetBestSize() const;
72 DECLARE_DYNAMIC_CLASS(wxSpinButton
)