]>
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "spinbutt.h"
19 #include "wx/control.h"
22 class WXDLLEXPORT wxSpinButton
: public wxSpinButtonBase
28 wxSpinButton(wxWindow
*parent
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
32 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
33 const wxString
& name
= wxSPIN_BUTTON_NAME
)
35 Create(parent
, id
, pos
, size
, style
, name
);
38 virtual ~wxSpinButton();
40 bool Create(wxWindow
*parent
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 long style
= wxSP_VERTICAL
| wxSP_ARROW_KEYS
,
45 const wxString
& name
= wxSPIN_BUTTON_NAME
);
49 virtual int GetValue() const;
50 virtual void SetValue(int val
);
51 virtual void SetRange(int minVal
, int maxVal
);
54 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
55 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
);
56 virtual bool MSWOnScroll(int orientation
, WXWORD wParam
,
57 WXWORD pos
, WXHWND control
);
59 // a wxSpinButton can't do anything useful with focus, only wxSpinCtrl can
60 virtual bool AcceptsFocus() const { return FALSE
; }
63 virtual wxSize
DoGetBestSize() const;
66 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSpinButton
)