]>
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
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #include "wx/wxprec.h"
13 #include "wx/scrolbar.h"
18 #include "wx/settings.h"
21 #include "wx/osx/private.h"
23 class wxOSXScrollBarCarbonImpl
: public wxMacControl
26 wxOSXScrollBarCarbonImpl( wxWindowMac
* peer
) : wxMacControl( peer
)
30 void SetScrollThumb( wxInt32 value
, wxInt32 thumbSize
)
33 SetControlViewSize(m_controlRef
, thumbSize
);
38 wxWidgetImplType
* wxWidgetImpl::CreateScrollBar( wxWindowMac
* wxpeer
,
40 wxWindowID
WXUNUSED(id
),
44 long WXUNUSED(extraStyle
))
46 Rect bounds
= wxMacGetBoundsForControl( wxpeer
, pos
, size
);
48 wxMacControl
* peer
= new wxOSXScrollBarCarbonImpl( wxpeer
);
49 OSStatus err
= CreateScrollBarControl(
50 MAC_WXHWND(parent
->MacGetTopLevelWindowRef()), &bounds
,
51 0, 0, 100, 1, true /* liveTracking */,
52 GetwxMacLiveScrollbarActionProc(),
53 peer
->GetControlRefAddr() );