]> git.saurik.com Git - wxWidgets.git/commitdiff
Simplify use of MacIsWindowScrollbar
authorRobin Dunn <robin@alldunn.com>
Sat, 9 Sep 2006 18:12:59 +0000 (18:12 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 9 Sep 2006 18:12:59 +0000 (18:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mac/carbon/window.h
src/common/containr.cpp

index 95e240d4db1b13c1eeb38a6f008ba2baafa5033c..68a0a4f36bd600629d5bc0962df56b2513b7cdd4 100644 (file)
@@ -215,8 +215,8 @@ public:
     // returns true if the grandchildren need to be clipped to the children's content area
     // (e.g., splitter windows)
     virtual bool        MacClipGrandChildren() const { return false ; }
-    bool                MacIsWindowScrollbar( const wxScrollBar* sb )
-    { return (m_hScrollBar == sb || m_vScrollBar == sb) ; }
+    bool                MacIsWindowScrollbar( const wxWindow* sb )
+    { return ((wxWindow*)m_hScrollBar == sb || (wxWindow*)m_vScrollBar == sb) ; }
 
     virtual void        MacInstallEventHandler(WXWidget native) ;
     void                MacPostControlCreate(const wxPoint& pos, const wxSize& size) ;
index 42aa660a504c1c40728332be3a432b9e670c5db4..d465bc0511ad076e86368d72f78fa0d319500b66 100644 (file)
@@ -71,11 +71,9 @@ bool wxControlContainer::AcceptsFocus() const
             node = node->GetNext();
 
 #ifdef __WXMAC__
-            wxScrollBar *sb = wxDynamicCast( child , wxScrollBar ) ;
-            if ( sb == NULL || !m_winParent->MacIsWindowScrollbar( sb ) )
-                hasRealChildren = true ;
-            if ( sb && m_winParent->MacIsWindowScrollbar( sb ) )
+            if ( m_winParent->MacIsWindowScrollbar( child ) )
                 continue;
+            hasRealChildren = true ;
 #endif
             if ( child->AcceptsFocus() )
             {
@@ -641,8 +639,7 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
         node = node->GetNext();
 
 #ifdef __WXMAC__
-        wxScrollBar *sb = wxDynamicCast( child , wxScrollBar ) ;
-        if ( sb && child->GetParent()->MacIsWindowScrollbar( sb ) )
+        if ( child->GetParent()->MacIsWindowScrollbar( child ) )
             continue;
 #endif