]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/spinbutt.h
Disconnect all GTK signals referencing a wx object which is being destructed
[wxWidgets.git] / include / wx / osx / spinbutt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // RCS-ID: $Id$
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_SPINBUTT_H_
13 #define _WX_SPINBUTT_H_
14
15 #include "wx/control.h"
16 #include "wx/event.h"
17
18 /*
19 The wxSpinButton is like a small scrollbar than is often placed next
20 to a text control.
21
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
26 */
27
28 class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase
29 {
30 public:
31 // construction
32 wxSpinButton();
33
34 wxSpinButton(wxWindow *parent,
35 wxWindowID id = -1,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
39 const wxString& name = wxT("wxSpinButton"))
40 {
41 Create(parent, id, pos, size, style, name);
42 }
43
44 virtual ~wxSpinButton();
45
46 bool Create(wxWindow *parent,
47 wxWindowID id = -1,
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
50 long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
51 const wxString& name = wxT("wxSpinButton"));
52
53
54 // accessors
55 virtual void SetRange(int minVal, int maxVal);
56 virtual int GetValue() const ;
57 virtual void SetValue(int val);
58
59 // implementation
60
61 virtual void TriggerScrollEvent( wxEventType scrollEvent ) ;
62
63 // osx specific event handling common for all osx-ports
64
65 virtual bool OSXHandleClicked( double timestampsec );
66
67 protected:
68 void SendThumbTrackEvent() ;
69
70 virtual wxSize DoGetBestSize() const;
71
72 private:
73 DECLARE_DYNAMIC_CLASS(wxSpinButton)
74 };
75
76 #endif
77 // _WX_SPINBUTT_H_