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 void SetRange(int minVal
, int maxVal
); 
  56     virtual int GetValue() const ; 
  57     virtual void SetValue(int val
); 
  62     virtual void MacHandleControlClick( WXWidget control 
, wxInt16 controlpart 
, bool mouseStillDown 
) ; 
  64     // osx specific event handling common for all osx-ports 
  66     virtual bool HandleClicked( double timestampsec 
); 
  69     void         SendThumbTrackEvent() ; 
  71     virtual wxSize 
DoGetBestSize() const; 
  74     DECLARE_DYNAMIC_CLASS(wxSpinButton
)