Simplify use of MacIsWindowScrollbar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -215,8 +215,8 @@ public:
|
|||||||
// returns true if the grandchildren need to be clipped to the children's content area
|
// returns true if the grandchildren need to be clipped to the children's content area
|
||||||
// (e.g., splitter windows)
|
// (e.g., splitter windows)
|
||||||
virtual bool MacClipGrandChildren() const { return false ; }
|
virtual bool MacClipGrandChildren() const { return false ; }
|
||||||
bool MacIsWindowScrollbar( const wxScrollBar* sb )
|
bool MacIsWindowScrollbar( const wxWindow* sb )
|
||||||
{ return (m_hScrollBar == sb || m_vScrollBar == sb) ; }
|
{ return ((wxWindow*)m_hScrollBar == sb || (wxWindow*)m_vScrollBar == sb) ; }
|
||||||
|
|
||||||
virtual void MacInstallEventHandler(WXWidget native) ;
|
virtual void MacInstallEventHandler(WXWidget native) ;
|
||||||
void MacPostControlCreate(const wxPoint& pos, const wxSize& size) ;
|
void MacPostControlCreate(const wxPoint& pos, const wxSize& size) ;
|
||||||
|
@@ -71,11 +71,9 @@ bool wxControlContainer::AcceptsFocus() const
|
|||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
wxScrollBar *sb = wxDynamicCast( child , wxScrollBar ) ;
|
if ( m_winParent->MacIsWindowScrollbar( child ) )
|
||||||
if ( sb == NULL || !m_winParent->MacIsWindowScrollbar( sb ) )
|
|
||||||
hasRealChildren = true ;
|
|
||||||
if ( sb && m_winParent->MacIsWindowScrollbar( sb ) )
|
|
||||||
continue;
|
continue;
|
||||||
|
hasRealChildren = true ;
|
||||||
#endif
|
#endif
|
||||||
if ( child->AcceptsFocus() )
|
if ( child->AcceptsFocus() )
|
||||||
{
|
{
|
||||||
@@ -641,8 +639,7 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
|
|||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
wxScrollBar *sb = wxDynamicCast( child , wxScrollBar ) ;
|
if ( child->GetParent()->MacIsWindowScrollbar( child ) )
|
||||||
if ( sb && child->GetParent()->MacIsWindowScrollbar( sb ) )
|
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user