remove MacIsReallyShown() as we now have public IsShownOnScreen() doing exactly the same thing

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-02-23 00:19:18 +00:00
parent 041e0eaf2a
commit 841e47cfd7
5 changed files with 19 additions and 40 deletions

View File

@@ -195,7 +195,6 @@ public:
virtual void MacHiliteChanged() ;
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
bool MacIsReallyShown() ;
bool MacIsReallyEnabled() ;
bool MacIsReallyHilited() ;

View File

@@ -415,7 +415,7 @@ void wxGLCanvas::MacTopLevelWindowChangedPosition()
void wxGLCanvas::MacVisibilityChanged()
{
if ( MacIsReallyShown() != m_macCanvasIsShown )
if ( IsShownOnScreen() != m_macCanvasIsShown )
{
m_macCanvasIsShown = !m_macCanvasIsShown;
MacUpdateView();

View File

@@ -1101,7 +1101,7 @@ void wxQTMediaBackend::MacVisibilityChanged()
if(!m_mc || !m_ctrl->m_bLoaded)
return; //not initialized yet
if(m_ctrl->MacIsReallyShown())
if(m_ctrl->IsShownOnScreen())
{
//The window is being shown again, so set the GWorld of the
//controller back to the port of the parent WindowRef

View File

@@ -486,7 +486,7 @@ void wxTextCtrl::MacSuperChangedPosition()
void wxTextCtrl::MacVisibilityChanged()
{
GetPeer()->VisibilityChanged( MacIsReallyShown() ) ;
GetPeer()->VisibilityChanged( IsShownOnScreen() ) ;
}
void wxTextCtrl::MacCheckSpelling(bool check)
@@ -2562,7 +2562,7 @@ void wxMacMLTEClassicControl::MacControlUserPaneDrawProc(wxInt16 WXUNUSED(thePar
if ( textctrl == NULL )
return ;
if ( textctrl->MacIsReallyShown() )
if ( textctrl->IsShownOnScreen() )
{
wxMacWindowClipper clipper( textctrl ) ;
TXNDraw( m_txn , NULL ) ;
@@ -2575,7 +2575,7 @@ wxInt16 wxMacMLTEClassicControl::MacControlUserPaneHitTestProc(wxInt16 x, wxInt1
ControlPartCode result = kControlNoPart;
wxTextCtrl* textctrl = (wxTextCtrl*) GetControlReference( m_controlRef );
if ( (textctrl != NULL) && textctrl->MacIsReallyShown() )
if ( (textctrl != NULL) && textctrl->IsShownOnScreen() )
{
if (PtInRect( where, &m_txnControlBounds ))
{
@@ -2602,7 +2602,7 @@ wxInt16 wxMacMLTEClassicControl::MacControlUserPaneTrackingProc( wxInt16 x, wxIn
ControlPartCode result = kControlNoPart;
wxTextCtrl* textctrl = (wxTextCtrl*) GetControlReference( m_controlRef );
if ( (textctrl != NULL) && textctrl->MacIsReallyShown() )
if ( (textctrl != NULL) && textctrl->IsShownOnScreen() )
{
Point startPt = { y , x } ;
@@ -2638,7 +2638,7 @@ void wxMacMLTEClassicControl::MacControlUserPaneIdleProc()
if ( textctrl == NULL )
return ;
if (textctrl->MacIsReallyShown())
if (textctrl->IsShownOnScreen())
{
if (IsControlActive(m_controlRef))
{
@@ -2744,7 +2744,7 @@ wxMacMLTEClassicControl::wxMacMLTEClassicControl( wxTextCtrl *wxPeer,
AdjustCreationAttributes( *wxWHITE , true ) ;
MacSetObjectVisibility( wxPeer->MacIsReallyShown() ) ;
MacSetObjectVisibility( wxPeer->IsShownOnScreen() ) ;
{
wxString st = str ;

View File

@@ -1108,7 +1108,7 @@ void wxWindowMac::MacUpdateControlFont()
{
m_peer->SetFont( GetFont() , GetForegroundColour() , GetWindowStyle() ) ;
// do not trigger refreshes upon invisible and possible partly created objects
if ( MacIsReallyShown() )
if ( IsShownOnScreen() )
Refresh() ;
}
@@ -1673,7 +1673,7 @@ void wxWindowMac::MacInvalidateBorders()
if ( m_peer == NULL )
return ;
bool vis = MacIsReallyShown() ;
bool vis = IsShownOnScreen() ;
if ( !vis )
return ;
@@ -1942,7 +1942,7 @@ void wxWindowMac::SetLabel(const wxString& title)
m_peer->SetLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics) ) ;
// do not trigger refreshes upon invisible and possible partly created objects
if ( MacIsReallyShown() )
if ( IsShownOnScreen() )
Refresh() ;
}
@@ -1988,31 +1988,6 @@ void wxWindowMac::MacEnabledStateChanged()
// status queries on the inherited window's state
//
bool wxWindowMac::MacIsReallyShown()
{
// only under OSX the visibility of the TLW is taken into account
if ( m_isBeingDeleted )
return false ;
#if TARGET_API_MAC_OSX
if ( m_peer && m_peer->Ok() )
return m_peer->IsVisible();
#endif
wxWindow* win = this ;
while ( win->IsShown() )
{
if ( win->IsTopLevel() )
return true ;
win = win->GetParent() ;
if ( win == NULL )
return true ;
}
return false ;
}
bool wxWindowMac::MacIsReallyEnabled()
{
return m_peer->IsEnabled() ;
@@ -2074,7 +2049,7 @@ void wxWindowMac::Refresh(bool WXUNUSED(eraseBack), const wxRect *rect)
if ( m_peer == NULL )
return ;
if ( !MacIsReallyShown() )
if ( !IsShownOnScreen() )
return ;
if ( rect )
@@ -2614,7 +2589,7 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool includeOuterStructures )
{
static wxRegion emptyrgn ;
if ( !m_isBeingDeleted && MacIsReallyShown() /*m_peer->IsVisible() */ )
if ( !m_isBeingDeleted && IsShownOnScreen() )
{
MacUpdateClippedRects() ;
if ( includeOuterStructures )
@@ -3222,5 +3197,10 @@ wxByte wxWindowMac::GetTransparent() const
bool wxWindowMac::IsShownOnScreen() const
{
return ((wxWindowMac*)this)->MacIsReallyShown();
#if TARGET_API_MAC_OSX
if ( m_peer && m_peer->Ok() )
return m_peer->IsVisible();
#endif
return wxWindowBase::IsShownOnScreen();
}