]> git.saurik.com Git - wxWidgets.git/blob - src/osx/carbon/spinbutt.cpp
Make mouse capture checking asserts stronger and more detailed.
[wxWidgets.git] / src / osx / carbon / spinbutt.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/carbon/spinbutt.cpp
3 // Purpose: wxSpinButton
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #include "wx/wxprec.h"
12
13 #if wxUSE_SPINBTN
14
15 #include "wx/spinbutt.h"
16 #include "wx/osx/private.h"
17
18
19 wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer,
20 wxWindowMac* parent,
21 wxWindowID WXUNUSED(id),
22 wxInt32 value,
23 wxInt32 minimum,
24 wxInt32 maximum,
25 const wxPoint& pos,
26 const wxSize& size,
27 long WXUNUSED(style),
28 long WXUNUSED(extraStyle))
29 {
30 Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size );
31
32 wxMacControl* peer = new wxMacControl( wxpeer );
33 OSStatus err = CreateLittleArrowsControl(
34 MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, value,
35 minimum, maximum, 1, peer->GetControlRefAddr() );
36 verify_noerr( err );
37
38 peer->SetActionProc( GetwxMacLiveScrollbarActionProc() );
39 return peer ;
40 }
41
42 #endif // wxUSE_SPINBTN