]> git.saurik.com Git - wxWidgets.git/blame - src/osx/carbon/spinbutt.cpp
Merge in from trunk r68626 - r68683
[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
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/wxprec.h"
13
14#if wxUSE_SPINBTN
15
16#include "wx/spinbutt.h"
524c47aa
SC
17#include "wx/osx/private.h"
18
19
03647350
VZ
20wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer,
21 wxWindowMac* parent,
22 wxWindowID WXUNUSED(id),
524c47aa
SC
23 wxInt32 value,
24 wxInt32 minimum,
25 wxInt32 maximum,
03647350 26 const wxPoint& pos,
524c47aa 27 const wxSize& size,
03647350 28 long WXUNUSED(style),
a4fec5b4 29 long WXUNUSED(extraStyle))
489468fe 30{
524c47aa 31 Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size );
489468fe 32
524c47aa 33 wxMacControl* peer = new wxMacControl( wxpeer );
489468fe 34 OSStatus err = CreateLittleArrowsControl(
03647350 35 MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, value,
524c47aa 36 minimum, maximum, 1, peer->GetControlRefAddr() );
489468fe
SC
37 verify_noerr( err );
38
524c47aa
SC
39 peer->SetActionProc( GetwxMacLiveScrollbarActionProc() );
40 return peer ;
489468fe
SC
41}
42
489468fe 43#endif // wxUSE_SPINBTN