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 ) ;
}
else
{
- w = w - xborder ;
if ( m_macMinimumStatic )
m_macMinimumStatic->Move(GetPosition().x + 0, GetPosition().y + sliderBreadth + wxSLIDER_BORDERTEXT);
if ( m_macMaximumStatic )
GetPosition().y + sliderBreadth + wxSLIDER_BORDERTEXT);
if ( m_macValueStatic )
m_macValueStatic->Move(GetPosition().x + w, GetPosition().y + 0);
+ w = w - xborder ;
}
}
//If the control has labels, we still need to call this again because