1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_SPINBUTT_H_
12 #define _WX_SPINBUTT_H_
14 #include "wx/control.h"
19 class WXDLLIMPEXP_CORE wxSpinButton
: public wxSpinButtonBase
25 wxSpinButton(wxWindow
*parent
,
26 wxWindowID id
= wxID_ANY
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
29 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
30 const wxString
& name
= wxSPIN_BUTTON_NAME
)
32 Create(parent
, id
, pos
, size
, style
, name
);
35 virtual ~wxSpinButton();
37 bool Create(wxWindow
*parent
,
38 wxWindowID id
= wxID_ANY
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
,
41 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
42 const wxString
& name
= wxSPIN_BUTTON_NAME
);
46 virtual int GetValue() const;
47 virtual void SetValue(int val
);
48 virtual void SetRange(int minVal
, int maxVal
);
51 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
52 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
);
53 virtual bool MSWOnScroll(int orientation
, WXWORD wParam
,
54 WXWORD pos
, WXHWND control
);
56 // a wxSpinButton can't do anything useful with focus, only wxSpinCtrl can
57 virtual bool AcceptsFocus() const { return false; }
59 // returns true if the platform should explicitly apply a theme border
60 virtual bool CanApplyThemeBorder() const { return false; }
63 virtual wxSize
DoGetBestSize() const;
65 // ensure that the control displays a value in the current range
66 virtual void NormalizeValue();
69 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSpinButton
)
72 #endif // wxUSE_SPINBTN
74 #endif // _WX_SPINBUTT_H_