]> git.saurik.com Git - wxWidgets.git/blame - src/osx/carbon/spinbutt.cpp
Fix horizontal mouse wheel scrolling in wxGTK.
[wxWidgets.git] / src / osx / carbon / spinbutt.cpp
CommitLineData
489468fe 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: src/osx/carbon/spinbutt.cpp
489468fe
SC
3// Purpose: wxSpinButton
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
489468fe
SC
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"
524c47aa
SC
16#include "wx/osx/private.h"
17
18
03647350
VZ
19wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer,
20 wxWindowMac* parent,
21 wxWindowID WXUNUSED(id),
524c47aa
SC
22 wxInt32 value,
23 wxInt32 minimum,
24 wxInt32 maximum,
03647350 25 const wxPoint& pos,
524c47aa 26 const wxSize& size,
03647350 27 long WXUNUSED(style),
a4fec5b4 28 long WXUNUSED(extraStyle))
489468fe 29{
524c47aa 30 Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size );
489468fe 31
524c47aa 32 wxMacControl* peer = new wxMacControl( wxpeer );
489468fe 33 OSStatus err = CreateLittleArrowsControl(
03647350 34 MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, value,
524c47aa 35 minimum, maximum, 1, peer->GetControlRefAddr() );
489468fe
SC
36 verify_noerr( err );
37
524c47aa
SC
38 peer->SetActionProc( GetwxMacLiveScrollbarActionProc() );
39 return peer ;
489468fe
SC
40}
41
489468fe 42#endif // wxUSE_SPINBTN