spinbutt.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/cocoa/spinbutt.h
  3. // Purpose: wxSpinButton class
  4. // Author: David Elliott
  5. // Modified by:
  6. // Created: 2003/07/14
  7. // Copyright: (c) 2003 David Elliott
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef __WX_COCOA_SPINBUTT_H__
  11. #define __WX_COCOA_SPINBUTT_H__
  12. // #include "wx/cocoa/NSStepper.h"
  13. // ========================================================================
  14. // wxSpinButton
  15. // ========================================================================
  16. class WXDLLIMPEXP_CORE wxSpinButton: public wxSpinButtonBase// , protected wxCocoaNSStepper
  17. {
  18. DECLARE_DYNAMIC_CLASS(wxSpinButton)
  19. DECLARE_EVENT_TABLE()
  20. // WX_DECLARE_COCOA_OWNER(NSStepper,NSControl,NSView)
  21. // ------------------------------------------------------------------------
  22. // initialization
  23. // ------------------------------------------------------------------------
  24. public:
  25. wxSpinButton() { }
  26. wxSpinButton(wxWindow *parent, wxWindowID winid = 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)
  31. {
  32. Create(parent, winid, pos, size, style, name);
  33. }
  34. bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY,
  35. const wxPoint& pos = wxDefaultPosition,
  36. const wxSize& size = wxDefaultSize,
  37. long style = wxSP_HORIZONTAL,
  38. const wxString& name = wxSPIN_BUTTON_NAME);
  39. virtual ~wxSpinButton();
  40. // ------------------------------------------------------------------------
  41. // Cocoa callbacks
  42. // ------------------------------------------------------------------------
  43. protected:
  44. virtual void CocoaTarget_action();
  45. // ------------------------------------------------------------------------
  46. // Implementation
  47. // ------------------------------------------------------------------------
  48. public:
  49. // Pure Virtuals
  50. virtual int GetValue() const;
  51. virtual void SetValue(int value);
  52. // retrieve/change the range
  53. virtual void SetRange(int minValue, int maxValue);
  54. };
  55. #endif
  56. // __WX_COCOA_SPINBUTT_H__