Initial ShowWithoutActivating implementations for Mac and Windows, and attempt to improve IsActive behavior on Mac. Also adding ShowWithoutActivating() and Show/Hide tests, but until the mainloop issues are resolved, not adding them to tests.bkl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2009-10-30 05:04:47 +00:00
parent bc7879ec4c
commit dbc7ceb925
13 changed files with 189 additions and 10 deletions

View File

@@ -51,6 +51,21 @@ void wxNonOwnedWindowCarbonImpl::Lower()
::SendBehind( m_macWindow , NULL ) ;
}
void wxNonOwnedWindowCarbonImpl::ShowWithoutActivating()
{
bool plainTransition = true;
#if wxUSE_SYSTEM_OPTIONS
if ( wxSystemOptions::HasOption(wxMAC_WINDOW_PLAIN_TRANSITION) )
plainTransition = ( wxSystemOptions::GetOptionInt( wxMAC_WINDOW_PLAIN_TRANSITION ) == 1 ) ;
#endif
if ( plainTransition )
::ShowWindow( (WindowRef)m_macWindow );
else
::TransitionWindow( (WindowRef)m_macWindow, kWindowZoomTransitionEffect, kWindowShowTransitionAction, NULL );
}
bool wxNonOwnedWindowCarbonImpl::Show(bool show)
{
bool plainTransition = true;
@@ -62,14 +77,8 @@ bool wxNonOwnedWindowCarbonImpl::Show(bool show)
if (show)
{
#if wxOSX_USE_CARBON
if ( plainTransition )
::ShowWindow( (WindowRef)m_macWindow );
else
::TransitionWindow( (WindowRef)m_macWindow, kWindowZoomTransitionEffect, kWindowShowTransitionAction, NULL );
ShowWithoutActivating();
::SelectWindow( (WindowRef)m_macWindow ) ;
#endif
}
else
{
@@ -1669,6 +1678,11 @@ void wxNonOwnedWindowCarbonImpl::WindowToScreen( int *x, int *y )
*y = (int)p.y;
}
bool wxNonOwnedWindowCarbonImpl::IsActive()
{
return ActiveNonFloatingWindow() == m_macWindow;
}
wxNonOwnedWindowImpl* wxNonOwnedWindowImpl::CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, const wxPoint& pos, const wxSize& size,
long style, long extraStyle, const wxString& name )
{