]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: spinbutt.cpp | |
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" | |
17 | #include "wx/osx/private.h" | |
18 | ||
19 | ||
20 | wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer, | |
21 | wxWindowMac* parent, | |
22 | wxWindowID WXUNUSED(id), | |
23 | wxInt32 value, | |
24 | wxInt32 minimum, | |
25 | wxInt32 maximum, | |
26 | const wxPoint& pos, | |
27 | const wxSize& size, | |
28 | long WXUNUSED(style), | |
29 | long WXUNUSED(extraStyle)) | |
30 | { | |
31 | Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ); | |
32 | ||
33 | wxMacControl* peer = new wxMacControl( wxpeer ); | |
34 | OSStatus err = CreateLittleArrowsControl( | |
35 | MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, value, | |
36 | minimum, maximum, 1, peer->GetControlRefAddr() ); | |
37 | verify_noerr( err ); | |
38 | ||
39 | peer->SetActionProc( GetwxMacLiveScrollbarActionProc() ); | |
40 | return peer ; | |
41 | } | |
42 | ||
43 | #endif // wxUSE_SPINBTN |