]> git.saurik.com Git - wxWidgets.git/commitdiff
added calls for invalidating the dc setup on mac explicitely (needed in case of neste...
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 27 Feb 2001 21:38:13 +0000 (21:38 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 27 Feb 2001 21:38:13 +0000 (21:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 files changed:
src/mac/aga.cpp
src/mac/carbon/aga.cpp
src/mac/carbon/control.cpp
src/mac/carbon/toolbar.cpp
src/mac/carbon/tooltip.cpp
src/mac/carbon/uma.cpp
src/mac/carbon/window.cpp
src/mac/control.cpp
src/mac/toolbar.cpp
src/mac/tooltip.cpp
src/mac/uma.cpp
src/mac/window.cpp

index 0185303bd1c1906ece9620f58d12269fa8586d1b..6c24f5ddf82ea9626f3db58bbf15cdcdbd6f2d7e 100644 (file)
@@ -2619,6 +2619,7 @@ AGAPortHelper::~AGAPortHelper()
                TextMode( mode );
                SetOrigin( 0 , 0 ) ;
                SetPort( port ) ;
+               wxDC::MacInvalidateSetup() ;
        }
 }
 
index 0185303bd1c1906ece9620f58d12269fa8586d1b..6c24f5ddf82ea9626f3db58bbf15cdcdbd6f2d7e 100644 (file)
@@ -2619,6 +2619,7 @@ AGAPortHelper::~AGAPortHelper()
                TextMode( mode );
                SetOrigin( 0 , 0 ) ;
                SetPort( port ) ;
+               wxDC::MacInvalidateSetup() ;
        }
 }
 
index 3e5679a826fe5876a508e810586a3a63e4019643..0953356de7d7f53f1ed4bc45d2387e22e4935e98 100644 (file)
@@ -623,6 +623,7 @@ void wxControl::MacRedrawControl()
                                
                                UMADrawControl( m_macControl ) ;
                                UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
+                               wxDC::MacInvalidateSetup() ;
                        }
                }
        }
@@ -664,6 +665,7 @@ void wxControl::OnPaint(wxPaintEvent& event)
                                
                                UMADrawControl( m_macControl ) ;
                                UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
+                               wxDC::MacInvalidateSetup() ;
                        }
                }
        }
index 23dd7761b54d9d582d47c0426c6a074e45449e16..752f71a8cc4d2264c9e18e8143bf85ddc84626e8 100644 (file)
@@ -536,6 +536,7 @@ void wxToolBar::OnPaint(wxPaintEvent& event)
                                }
                        }
                        UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
+                       wxDC::MacInvalidateSetup() ;
                }
        }
 }
index ada78751e77358e00532c012bb364d23ed2f0480..5974c8808e31505f4448cca2fe1e775eaa0a57b6 100644 (file)
@@ -295,6 +295,7 @@ void wxMacToolTip::Draw()
                                        
                ::DrawText( text , laststop , i - laststop ) ;
                ::TextMode( srcOr ) ;
+               wxDC::MacInvalidateSetup() ;
                
        //      DrawText( m_label , 0 , m_label.Length() ) ;
        }
@@ -329,6 +330,7 @@ void wxMacToolTip::Clear()
                DrawPicture(m_backpict, &m_rect);
                KillPicture(m_backpict);
                m_backpict = NULL ;
+               wxDC::MacInvalidateSetup() ;
        }
 }
 
index 5c1fbaddb1f3720f7727dfbfd1d07ddef850fdd8..78f6706ac3b50fcda36cd5f1040a8a2c5914d502 100644 (file)
@@ -834,6 +834,7 @@ OSErr UMASetKeyboardFocus                           (WindowPtr                              inWindow,
        }
 #endif
        SetPort( port ) ;
+       wxDC::MacInvalidateSetup() ;
        return err ;
 }
 
index 6c4f516f71d7b30ec7b8d950081303a60137f4f3..989141e74c63d9140bd6a23cfecc9a14a346b0d6 100644 (file)
@@ -2271,37 +2271,8 @@ long wxWindow::MacRemoveBordersFromStyle( long style )
 {
        return style & ~( wxDOUBLE_BORDER | wxSUNKEN_BORDER | wxRAISED_BORDER | wxBORDER | wxSTATIC_BORDER ) ;
 }
-/*
-wxMacFocusHelper::wxMacFocusHelper( wxWindow * theWindow ) 
-{
-       m_ok = false ;
-       Point localOrigin ;
-       Rect clipRect ;
-       WindowRef window ;
-       wxWindow *rootwin ;
-       m_currentPort = NULL ;
-       GetPort( &m_formerPort ) ;
-       if ( theWindow )
-       {
-       
-               theWindow->MacGetPortParams( &localOrigin , &clipRect , &window , &rootwin) ;
-               m_currentPort = UMAGetWindowPort( window ) ;
-               theWindow->MacSetPortFocusParams( localOrigin, clipRect, window , rootwin ) ; 
-               m_ok = true ;
-       }
-}
-       
-wxMacFocusHelper::~wxMacFocusHelper() 
-{
-       if ( m_ok )
-       {
-               SetPort( m_currentPort ) ;
-               SetOrigin( 0 , 0 ) ;
-       }
-       if ( m_formerPort != m_currentPort )
-               SetPort( m_formerPort ) ;
-}
-*/
+
+
 wxMacDrawingHelper::wxMacDrawingHelper( wxWindow * theWindow ) 
 {
        m_ok = false ;
@@ -2334,43 +2305,12 @@ wxMacDrawingHelper::~wxMacDrawingHelper()
                Rect portRect ;
                GetPortBounds( m_currentPort , &portRect ) ;
                ClipRect( &portRect ) ;
+               wxDC::MacInvalidateSetup() ;    
        }
                
        if ( m_formerPort != m_currentPort )
                SetPort( m_formerPort ) ;
 }
-/*
-wxMacFocusClientHelper::wxMacFocusClientHelper( wxWindow * theWindow ) 
-{
-       m_ok = false ;
-       Point localOrigin ;
-       Rect clipRect ;
-       WindowRef window ;
-       wxWindow *rootwin ;
-       m_currentPort = NULL ;
-       
-       GetPort( &m_formerPort ) ;
-
-       if ( theWindow )
-       {
-               theWindow->MacGetPortClientParams( &localOrigin , &clipRect , &window , &rootwin) ;
-               m_currentPort = UMAGetWindowPort( window ) ;
-               theWindow->MacSetPortFocusParams( localOrigin, clipRect, window , rootwin ) ; 
-               m_ok = true ;
-       }
-}
-       
-wxMacFocusClientHelper::~wxMacFocusClientHelper() 
-{
-       if ( m_ok )
-       {
-               SetPort( m_currentPort ) ;
-               SetOrigin( 0 , 0 ) ;
-       }
-       if ( m_formerPort != m_currentPort )
-               SetPort( m_formerPort ) ;
-}
-*/
 
 wxMacDrawingClientHelper::wxMacDrawingClientHelper( wxWindow * theWindow ) 
 {
index 3e5679a826fe5876a508e810586a3a63e4019643..0953356de7d7f53f1ed4bc45d2387e22e4935e98 100644 (file)
@@ -623,6 +623,7 @@ void wxControl::MacRedrawControl()
                                
                                UMADrawControl( m_macControl ) ;
                                UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
+                               wxDC::MacInvalidateSetup() ;
                        }
                }
        }
@@ -664,6 +665,7 @@ void wxControl::OnPaint(wxPaintEvent& event)
                                
                                UMADrawControl( m_macControl ) ;
                                UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
+                               wxDC::MacInvalidateSetup() ;
                        }
                }
        }
index 23dd7761b54d9d582d47c0426c6a074e45449e16..752f71a8cc4d2264c9e18e8143bf85ddc84626e8 100644 (file)
@@ -536,6 +536,7 @@ void wxToolBar::OnPaint(wxPaintEvent& event)
                                }
                        }
                        UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
+                       wxDC::MacInvalidateSetup() ;
                }
        }
 }
index ada78751e77358e00532c012bb364d23ed2f0480..5974c8808e31505f4448cca2fe1e775eaa0a57b6 100644 (file)
@@ -295,6 +295,7 @@ void wxMacToolTip::Draw()
                                        
                ::DrawText( text , laststop , i - laststop ) ;
                ::TextMode( srcOr ) ;
+               wxDC::MacInvalidateSetup() ;
                
        //      DrawText( m_label , 0 , m_label.Length() ) ;
        }
@@ -329,6 +330,7 @@ void wxMacToolTip::Clear()
                DrawPicture(m_backpict, &m_rect);
                KillPicture(m_backpict);
                m_backpict = NULL ;
+               wxDC::MacInvalidateSetup() ;
        }
 }
 
index 5c1fbaddb1f3720f7727dfbfd1d07ddef850fdd8..78f6706ac3b50fcda36cd5f1040a8a2c5914d502 100644 (file)
@@ -834,6 +834,7 @@ OSErr UMASetKeyboardFocus                           (WindowPtr                              inWindow,
        }
 #endif
        SetPort( port ) ;
+       wxDC::MacInvalidateSetup() ;
        return err ;
 }
 
index 6c4f516f71d7b30ec7b8d950081303a60137f4f3..989141e74c63d9140bd6a23cfecc9a14a346b0d6 100644 (file)
@@ -2271,37 +2271,8 @@ long wxWindow::MacRemoveBordersFromStyle( long style )
 {
        return style & ~( wxDOUBLE_BORDER | wxSUNKEN_BORDER | wxRAISED_BORDER | wxBORDER | wxSTATIC_BORDER ) ;
 }
-/*
-wxMacFocusHelper::wxMacFocusHelper( wxWindow * theWindow ) 
-{
-       m_ok = false ;
-       Point localOrigin ;
-       Rect clipRect ;
-       WindowRef window ;
-       wxWindow *rootwin ;
-       m_currentPort = NULL ;
-       GetPort( &m_formerPort ) ;
-       if ( theWindow )
-       {
-       
-               theWindow->MacGetPortParams( &localOrigin , &clipRect , &window , &rootwin) ;
-               m_currentPort = UMAGetWindowPort( window ) ;
-               theWindow->MacSetPortFocusParams( localOrigin, clipRect, window , rootwin ) ; 
-               m_ok = true ;
-       }
-}
-       
-wxMacFocusHelper::~wxMacFocusHelper() 
-{
-       if ( m_ok )
-       {
-               SetPort( m_currentPort ) ;
-               SetOrigin( 0 , 0 ) ;
-       }
-       if ( m_formerPort != m_currentPort )
-               SetPort( m_formerPort ) ;
-}
-*/
+
+
 wxMacDrawingHelper::wxMacDrawingHelper( wxWindow * theWindow ) 
 {
        m_ok = false ;
@@ -2334,43 +2305,12 @@ wxMacDrawingHelper::~wxMacDrawingHelper()
                Rect portRect ;
                GetPortBounds( m_currentPort , &portRect ) ;
                ClipRect( &portRect ) ;
+               wxDC::MacInvalidateSetup() ;    
        }
                
        if ( m_formerPort != m_currentPort )
                SetPort( m_formerPort ) ;
 }
-/*
-wxMacFocusClientHelper::wxMacFocusClientHelper( wxWindow * theWindow ) 
-{
-       m_ok = false ;
-       Point localOrigin ;
-       Rect clipRect ;
-       WindowRef window ;
-       wxWindow *rootwin ;
-       m_currentPort = NULL ;
-       
-       GetPort( &m_formerPort ) ;
-
-       if ( theWindow )
-       {
-               theWindow->MacGetPortClientParams( &localOrigin , &clipRect , &window , &rootwin) ;
-               m_currentPort = UMAGetWindowPort( window ) ;
-               theWindow->MacSetPortFocusParams( localOrigin, clipRect, window , rootwin ) ; 
-               m_ok = true ;
-       }
-}
-       
-wxMacFocusClientHelper::~wxMacFocusClientHelper() 
-{
-       if ( m_ok )
-       {
-               SetPort( m_currentPort ) ;
-               SetOrigin( 0 , 0 ) ;
-       }
-       if ( m_formerPort != m_currentPort )
-               SetPort( m_formerPort ) ;
-}
-*/
 
 wxMacDrawingClientHelper::wxMacDrawingClientHelper( wxWindow * theWindow ) 
 {