virtual void MacHiliteChanged() ;
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
- bool MacIsReallyShown() ;
bool MacIsReallyEnabled() ;
bool MacIsReallyHilited() ;
void wxGLCanvas::MacVisibilityChanged()
{
- if ( MacIsReallyShown() != m_macCanvasIsShown )
+ if ( IsShownOnScreen() != m_macCanvasIsShown )
{
m_macCanvasIsShown = !m_macCanvasIsShown;
MacUpdateView();
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
void wxTextCtrl::MacVisibilityChanged()
{
- GetPeer()->VisibilityChanged( MacIsReallyShown() ) ;
+ GetPeer()->VisibilityChanged( IsShownOnScreen() ) ;
}
void wxTextCtrl::MacCheckSpelling(bool check)
if ( textctrl == NULL )
return ;
- if ( textctrl->MacIsReallyShown() )
+ if ( textctrl->IsShownOnScreen() )
{
wxMacWindowClipper clipper( textctrl ) ;
TXNDraw( m_txn , NULL ) ;
ControlPartCode result = kControlNoPart;
wxTextCtrl* textctrl = (wxTextCtrl*) GetControlReference( m_controlRef );
- if ( (textctrl != NULL) && textctrl->MacIsReallyShown() )
+ if ( (textctrl != NULL) && textctrl->IsShownOnScreen() )
{
if (PtInRect( where, &m_txnControlBounds ))
{
ControlPartCode result = kControlNoPart;
wxTextCtrl* textctrl = (wxTextCtrl*) GetControlReference( m_controlRef );
- if ( (textctrl != NULL) && textctrl->MacIsReallyShown() )
+ if ( (textctrl != NULL) && textctrl->IsShownOnScreen() )
{
Point startPt = { y , x } ;
if ( textctrl == NULL )
return ;
- if (textctrl->MacIsReallyShown())
+ if (textctrl->IsShownOnScreen())
{
if (IsControlActive(m_controlRef))
{
AdjustCreationAttributes( *wxWHITE , true ) ;
- MacSetObjectVisibility( wxPeer->MacIsReallyShown() ) ;
+ MacSetObjectVisibility( wxPeer->IsShownOnScreen() ) ;
{
wxString st = str ;
{
m_peer->SetFont( GetFont() , GetForegroundColour() , GetWindowStyle() ) ;
// do not trigger refreshes upon invisible and possible partly created objects
- if ( MacIsReallyShown() )
+ if ( IsShownOnScreen() )
Refresh() ;
}
if ( m_peer == NULL )
return ;
- bool vis = MacIsReallyShown() ;
+ bool vis = IsShownOnScreen() ;
if ( !vis )
return ;
m_peer->SetLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics) ) ;
// do not trigger refreshes upon invisible and possible partly created objects
- if ( MacIsReallyShown() )
+ if ( IsShownOnScreen() )
Refresh() ;
}
// 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() ;
if ( m_peer == NULL )
return ;
- if ( !MacIsReallyShown() )
+ if ( !IsShownOnScreen() )
return ;
if ( rect )
{
static wxRegion emptyrgn ;
- if ( !m_isBeingDeleted && MacIsReallyShown() /*m_peer->IsVisible() */ )
+ if ( !m_isBeingDeleted && IsShownOnScreen() )
{
MacUpdateClippedRects() ;
if ( includeOuterStructures )
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();
}