]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/slider.cpp
key/char event changes for inline editing (japanese/hirgana etc)
[wxWidgets.git] / src / mac / carbon / slider.cpp
index 6080397266157197dffca57fe5273bc6b7702402..559b37eabaa0155c2b0c11c8da2f09b2187c2e75 100644 (file)
@@ -108,17 +108,18 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
     // NB: (RN) Ticks here are sometimes off in the GUI if there
     // is not as many ticks as there are values
     //
-    UInt16 tickMarks = 0 ;
+    int tickMarks = 0 ;
     if ( style & wxSL_AUTOTICKS )
         tickMarks = (maxValue - minValue) + 1; //+1 for the 0 value
 
-    // keep the number of tickmarks from becoming unwieldly
+    // keep the number of tickmarks from becoming unwieldly, therefore below it is ok to cast
+    // it to a UInt16
     while (tickMarks > 20)
         tickMarks /= 5;
 
     m_peer = new wxMacControl( this );
     verify_noerr ( CreateSliderControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
-        value , minValue , maxValue , kControlSliderPointsDownOrRight , tickMarks , true /* liveTracking */ ,
+        value , minValue , maxValue , kControlSliderPointsDownOrRight , (UInt16) tickMarks , true /* liveTracking */ ,
         GetwxMacLiveScrollbarActionProc() , m_peer->GetControlRefAddr() ) );
 
     if (style & wxSL_VERTICAL)
@@ -284,7 +285,7 @@ void wxSlider::MacHandleControlClick( WXWidget control , wxInt16 controlpart, bo
 {
     // Whatever the native value is, we may need to invert it for calling
     // SetValue and putting the possibly inverted value in the event
-    SInt16 value = ValueInvertOrNot ( m_peer->GetValue() ) ;
+    int value = ValueInvertOrNot ( m_peer->GetValue() ) ;
 
     SetValue( value ) ;
 
@@ -308,7 +309,7 @@ wxInt32 wxSlider::MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF mevent )
 {
     // Whatever the native value is, we may need to invert it for calling
     // SetValue and putting the possibly inverted value in the event
-    SInt16 value = ValueInvertOrNot ( m_peer->GetValue() ) ;
+    int value = ValueInvertOrNot ( m_peer->GetValue() ) ;
 
     SetValue( value ) ;