support for freeze and thaw under cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -89,6 +89,8 @@ public :
|
|||||||
virtual void SetNeedsDisplay( const wxRect* where = NULL );
|
virtual void SetNeedsDisplay( const wxRect* where = NULL );
|
||||||
virtual bool GetNeedsDisplay() const;
|
virtual bool GetNeedsDisplay() const;
|
||||||
|
|
||||||
|
virtual void SetDrawingEnabled(bool enabled);
|
||||||
|
|
||||||
virtual bool CanFocus() const;
|
virtual bool CanFocus() const;
|
||||||
// return true if successful
|
// return true if successful
|
||||||
virtual bool SetFocus();
|
virtual bool SetFocus();
|
||||||
|
@@ -282,6 +282,8 @@ public :
|
|||||||
|
|
||||||
virtual bool NeedsFrame() const;
|
virtual bool NeedsFrame() const;
|
||||||
virtual void SetNeedsFrame( bool needs );
|
virtual void SetNeedsFrame( bool needs );
|
||||||
|
|
||||||
|
virtual void SetDrawingEnabled(bool enabled);
|
||||||
|
|
||||||
virtual bool CanFocus() const = 0;
|
virtual bool CanFocus() const = 0;
|
||||||
// return true if successful
|
// return true if successful
|
||||||
|
@@ -1404,7 +1404,15 @@ void wxMacControl::Enable( bool enable )
|
|||||||
|
|
||||||
void wxMacControl::SetDrawingEnabled( bool enable )
|
void wxMacControl::SetDrawingEnabled( bool enable )
|
||||||
{
|
{
|
||||||
HIViewSetDrawingEnabled( m_controlRef , enable );
|
if ( enable )
|
||||||
|
{
|
||||||
|
HIViewSetDrawingEnabled( m_controlRef , true );
|
||||||
|
HIViewSetNeedsDisplay( m_controlRef, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HIViewSetDrawingEnabled( m_controlRef , false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacControl::GetRectInWindowCoords( Rect *r )
|
void wxMacControl::GetRectInWindowCoords( Rect *r )
|
||||||
|
@@ -2586,6 +2586,18 @@ void wxWidgetCocoaImpl::SetFlipped(bool flipped)
|
|||||||
m_isFlipped = flipped;
|
m_isFlipped = flipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxWidgetCocoaImpl::SetDrawingEnabled(bool enabled)
|
||||||
|
{
|
||||||
|
if ( enabled )
|
||||||
|
{
|
||||||
|
[[m_osxView window] enableFlushWindow];
|
||||||
|
[m_osxView setNeedsDisplay:YES];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[[m_osxView window] disableFlushWindow];
|
||||||
|
}
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// Factory methods
|
// Factory methods
|
||||||
//
|
//
|
||||||
|
@@ -1362,27 +1362,23 @@ void wxWindowMac::Refresh(bool WXUNUSED(eraseBack), const wxRect *rect)
|
|||||||
|
|
||||||
if ( !IsShownOnScreen() )
|
if ( !IsShownOnScreen() )
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
|
if ( IsFrozen() )
|
||||||
|
return;
|
||||||
|
|
||||||
GetPeer()->SetNeedsDisplay( rect ) ;
|
GetPeer()->SetNeedsDisplay( rect ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMac::DoFreeze()
|
void wxWindowMac::DoFreeze()
|
||||||
{
|
{
|
||||||
#if wxOSX_USE_CARBON
|
|
||||||
if ( GetPeer() && GetPeer()->IsOk() )
|
if ( GetPeer() && GetPeer()->IsOk() )
|
||||||
GetPeer()->SetDrawingEnabled( false ) ;
|
GetPeer()->SetDrawingEnabled( false ) ;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMac::DoThaw()
|
void wxWindowMac::DoThaw()
|
||||||
{
|
{
|
||||||
#if wxOSX_USE_CARBON
|
|
||||||
if ( GetPeer() && GetPeer()->IsOk() )
|
if ( GetPeer() && GetPeer()->IsOk() )
|
||||||
{
|
|
||||||
GetPeer()->SetDrawingEnabled( true ) ;
|
GetPeer()->SetDrawingEnabled( true ) ;
|
||||||
GetPeer()->InvalidateWithChildren() ;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow *wxGetActiveWindow()
|
wxWindow *wxGetActiveWindow()
|
||||||
@@ -2854,3 +2850,7 @@ bool wxWidgetImpl::NeedsFrame() const
|
|||||||
{
|
{
|
||||||
return m_needsFrame;
|
return m_needsFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxWidgetImpl::SetDrawingEnabled(bool WXUNUSED(enabled))
|
||||||
|
{
|
||||||
|
}
|
Reference in New Issue
Block a user