]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/notebmac.cpp
just added a comment
[wxWidgets.git] / src / mac / carbon / notebmac.cpp
index f242b9195653b013d9ef99cbe7ddf311bce6b573..495cf611e65cc29e5151705f55d4b7996af8f9a5 100644 (file)
@@ -327,7 +327,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long * flags) const
 {
        int                             resultV = wxNOT_FOUND;
 #if TARGET_API_MAC_OSX
-       const size_t    countPages = GetPageCount();
+       const int       countPages = GetPageCount();
     
     HIPoint hipoint= { pt.x , pt.y } ;
     HIViewPartCode outPart = 0 ;
@@ -337,43 +337,44 @@ int wxNotebook::HitTest(const wxPoint& pt, long * flags) const
        &outPart
        );
     
-    int max = HIViewGetMaximum( m_peer->GetControlRef() ) ;
+    int max = m_peer->GetMaximum() ;
     if ( outPart == 0 && max > 0 )
     {
         // this is a hack, as unfortunately a hit on an already selected tab returns 0,
         // so we have to go some extra miles to make sure we select something different 
         // and try again ..
-        int val = HIViewGetValue( m_peer->GetControlRef() ) ;
+        int val = m_peer->GetValue() ;
         int maxval = max ;
         if ( max == 1 )
         {
-            HIViewSetMaximum( m_peer->GetControlRef() , 2 ) ;
+            m_peer->SetMaximum( 2 ) ;
             maxval = 2 ;
         }
 
         if ( val == 1 )
-            HIViewSetValue(m_peer->GetControlRef() , maxval ) ;
+            m_peer->SetValue( maxval ) ;
         else
-            HIViewSetValue(m_peer->GetControlRef() , 1 ) ;
+             m_peer->SetValue( 1 ) ;
                 
-            err = HIViewGetPartHit (
+        err = HIViewGetPartHit (
                                     m_peer->GetControlRef() ,
                                     &hipoint ,
                                     &outPart
                                     );
             
-        HIViewSetValue(m_peer->GetControlRef() , val ) ;
+        m_peer->SetValue( val ) ;
         if ( max == 1 )
         {
-            HIViewSetMaximum( m_peer->GetControlRef() , 1 ) ;
+            m_peer->SetMaximum( 1 ) ;
         }
     }
     
-    if ( outPart >= 1 && outPart <= countPages )
+    if ( outPart >= 1 && (size_t)outPart <= countPages )
     {
         resultV = outPart ;
     }    
-#endif
+#endif // TARGET_API_MAC_OSX
+
     if (flags != NULL)
     {
         *flags = 0;