workaroung for handling problems because groupboxes are not included in the parent-child relationship in wxwindows in a geometrical correct way

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2001-11-04 21:02:06 +00:00
parent a3bf4a6263
commit f78024a1f9
2 changed files with 16 additions and 18 deletions

View File

@ -834,13 +834,13 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
if ( event.m_metaDown )
modifiers |= cmdKey ;
/*
#if TARGET_CARBON
control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
#else
// control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
controlpart = FindControl( localwhere , window , &control ) ;
#endif
*/
{
/*
if ( AcceptsFocus() && FindFocus() != this )
@ -848,18 +848,17 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
SetFocus() ;
}
*/
control = m_macControl ;
if ( control && ::IsControlActive( control ) )
{
{
if ( controlpart == kControlIndicatorPart && !UMAHasAppearance() )
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) NULL ) ;
else
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
wxTheApp->s_lastMouseDown = 0 ;
if ( control && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) )
&& (IsKindOf( CLASSINFO( wxScrollBar ) ) ) ) ) // otherwise we will get the event twice
if ( control && controlpart != kControlNoPart &&
! IsKindOf( CLASSINFO( wxScrollBar ) )
) // otherwise we will get the event twice for scrollbar
{
MacHandleControlClick( control , controlpart ) ;
MacHandleControlClick( control , controlpart ) ;
}
}
}

View File

@ -834,13 +834,13 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
if ( event.m_metaDown )
modifiers |= cmdKey ;
/*
#if TARGET_CARBON
control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
#else
// control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
controlpart = FindControl( localwhere , window , &control ) ;
#endif
*/
{
/*
if ( AcceptsFocus() && FindFocus() != this )
@ -848,18 +848,17 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
SetFocus() ;
}
*/
control = m_macControl ;
if ( control && ::IsControlActive( control ) )
{
{
if ( controlpart == kControlIndicatorPart && !UMAHasAppearance() )
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) NULL ) ;
else
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
wxTheApp->s_lastMouseDown = 0 ;
if ( control && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) )
&& (IsKindOf( CLASSINFO( wxScrollBar ) ) ) ) ) // otherwise we will get the event twice
if ( control && controlpart != kControlNoPart &&
! IsKindOf( CLASSINFO( wxScrollBar ) )
) // otherwise we will get the event twice for scrollbar
{
MacHandleControlClick( control , controlpart ) ;
MacHandleControlClick( control , controlpart ) ;
}
}
}