]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/spinbutt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_SPINBUTT_H_
13 #define _WX_SPINBUTT_H_
15 #include "wx/control.h"
20 class WXDLLEXPORT wxSpinButton
: public wxSpinButtonBase
26 wxSpinButton(wxWindow
*parent
,
27 wxWindowID id
= wxID_ANY
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
31 const wxString
& name
= wxSPIN_BUTTON_NAME
)
33 Create(parent
, id
, pos
, size
, style
, name
);
36 virtual ~wxSpinButton();
38 bool Create(wxWindow
*parent
,
39 wxWindowID id
= wxID_ANY
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
43 const wxString
& name
= wxSPIN_BUTTON_NAME
);
47 virtual int GetValue() const;
48 virtual void SetValue(int val
);
49 virtual void SetRange(int minVal
, int maxVal
);
52 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
53 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
);
54 virtual bool MSWOnScroll(int orientation
, WXWORD wParam
,
55 WXWORD pos
, WXHWND control
);
57 // a wxSpinButton can't do anything useful with focus, only wxSpinCtrl can
58 virtual bool AcceptsFocus() const { return false; }
61 virtual wxSize
DoGetBestSize() const;
63 // ensure that the control displays a value in the current range
64 virtual void NormalizeValue();
67 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSpinButton
)
70 #endif // wxUSE_SPINBTN
72 #endif // _WX_SPINBUTT_H_