m_peer = new wxMacControl() ;
verify_noerr ( CreateSliderControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
value , minValue , maxValue , kControlSliderPointsDownOrRight , tickMarks , true /* liveTracking */ ,
- wxMacLiveScrollbarActionUPP , *m_peer ) );
+ wxMacLiveScrollbarActionUPP , m_peer->GetControlRefAddr() ) );
if(style & wxSL_VERTICAL) {
int wxSlider::GetValue() const
{
- return GetControl32BitValue( *m_peer) ;
+ return m_peer->GetValue() ;
}
void wxSlider::SetValue(int value)
valuestring.Printf( wxT("%d") , value ) ;
if ( m_macValueStatic )
m_macValueStatic->SetLabel( valuestring ) ;
- SetControl32BitValue( *m_peer , value ) ;
+ m_peer->SetValue( value ) ;
}
void wxSlider::SetRange(int minValue, int maxValue)
m_rangeMin = minValue;
m_rangeMax = maxValue;
- SetControl32BitMinimum( *m_peer, m_rangeMin);
- SetControl32BitMaximum( *m_peer, m_rangeMax);
+ m_peer->SetMinimum( m_rangeMin);
+ m_peer->SetMaximum( m_rangeMax);
if(m_macMinimumStatic) {
value.Printf(wxT("%d"), m_rangeMin);
void wxSlider::MacHandleControlClick( WXWidget control , wxInt16 controlpart, bool mouseStillDown )
{
- SInt16 value = ::GetControl32BitValue( *m_peer ) ;
+ SInt16 value = m_peer->GetValue() ;
SetValue( value ) ;
wxInt32 wxSlider::MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF mevent )
{
- SInt16 value = ::GetControl32BitValue( *m_peer ) ;
+ SInt16 value = m_peer->GetValue() ;
SetValue( value ) ;
if ( m_macMinimumStatic )
m_macMinimumStatic->Move(GetPosition().x + sliderBreadth + wxSLIDER_BORDERTEXT,
- GetPosition().y + h - yborder - textheight);
+ GetPosition().y + h - yborder);
if ( m_macMaximumStatic )
m_macMaximumStatic->Move(GetPosition().x + sliderBreadth + wxSLIDER_BORDERTEXT, GetPosition().y + 0);
if ( m_macValueStatic )
- m_macValueStatic->Move(GetPosition().x, GetPosition().y + h - textheight);
+ m_macValueStatic->Move(GetPosition().x, GetPosition().y + h );
}
else
{