]>
git.saurik.com Git - wxWidgets.git/blob - src/osx/carbon/scrolbar.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/carbon/scrolbar.cpp
3 // Purpose: wxScrollBar
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
14 #include "wx/scrolbar.h"
19 #include "wx/settings.h"
22 #include "wx/osx/private.h"
24 class wxOSXScrollBarCarbonImpl
: public wxMacControl
27 wxOSXScrollBarCarbonImpl( wxWindowMac
* peer
) : wxMacControl( peer
)
31 void SetScrollThumb( wxInt32 value
, wxInt32 thumbSize
)
34 SetControlViewSize(m_controlRef
, thumbSize
);
39 wxWidgetImplType
* wxWidgetImpl::CreateScrollBar( wxWindowMac
* wxpeer
,
41 wxWindowID
WXUNUSED(id
),
45 long WXUNUSED(extraStyle
))
47 Rect bounds
= wxMacGetBoundsForControl( wxpeer
, pos
, size
);
49 wxMacControl
* peer
= new wxOSXScrollBarCarbonImpl( wxpeer
);
50 OSStatus err
= CreateScrollBarControl(
51 MAC_WXHWND(parent
->MacGetTopLevelWindowRef()), &bounds
,
52 0, 0, 100, 1, true /* liveTracking */,
53 GetwxMacLiveScrollbarActionProc(),
54 peer
->GetControlRefAddr() );