]> git.saurik.com Git - wxWidgets.git/commitdiff
Removed wxPG_DOUBLE_BUFFER constant. Now all wxPG rendering is done double-buffered...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 15 Apr 2011 09:23:23 +0000 (09:23 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 15 Apr 2011 09:23:23 +0000 (09:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/propgrid/propgrid.h
include/wx/propgrid/propgriddefs.h
src/propgrid/propgrid.cpp

index bf12c402b049dafcb9fdedad4d1841a4edaf3e0d..96bd76b787153644e6737450d5a1e27bc105adc9 100644 (file)
@@ -1795,9 +1795,7 @@ protected:
     wxWindow            *m_wndEditor;
     wxWindow            *m_wndEditor2;
 
-#if wxPG_DOUBLE_BUFFER
     wxBitmap            *m_doubleBuffer;
-#endif
 
     /** Local time ms when control was created. */
     wxLongLong          m_timeCreated;
@@ -2687,7 +2685,6 @@ protected:
     #undef wxPG_FL_INITIALIZED
     #undef wxPG_FL_ACTIVATION_BY_CLICK
     #undef wxPG_SUPPORT_TOOLTIPS
-    #undef wxPG_DOUBLE_BUFFER
     #undef wxPG_ICON_WIDTH
     #undef wxPG_USE_RENDERER_NATIVE
 // Following are needed by the manager headers
index faea41128d5741b699dfda38a81ad834992b14a7..0049da3d800238e3c232f557031dae3a9d88985f 100644 (file)
@@ -43,9 +43,6 @@
     // 1 if wxRendererNative should be employed
     #define wxPG_USE_RENDERER_NATIVE    0
 
-    // 1 to use double-buffer that guarantees flicker-free painting
-    #define wxPG_DOUBLE_BUFFER          1
-
     // Enable tooltips
     #define wxPG_SUPPORT_TOOLTIPS       1
 
@@ -79,9 +76,6 @@
     // 1 if wxRendererNative should be employed
     #define wxPG_USE_RENDERER_NATIVE    1
 
-    // 1 to use double-buffer that guarantees flicker-free painting
-    #define wxPG_DOUBLE_BUFFER          1
-
     // Enable tooltips
     #define wxPG_SUPPORT_TOOLTIPS       1
 
     // 1 if wxRendererNative should be employed
     #define wxPG_USE_RENDERER_NATIVE    1
 
-    // 1 to use double-buffer that guarantees flicker-free painting
-    #define wxPG_DOUBLE_BUFFER          0
-
     // Enable tooltips
     #define wxPG_SUPPORT_TOOLTIPS       1
 
     // 1 if wxRendererNative should be employed
     #define wxPG_USE_RENDERER_NATIVE    0
 
-    // 1 to use double-buffer that guarantees flicker-free painting
-    #define wxPG_DOUBLE_BUFFER          0
-
     // Enable tooltips
     #define wxPG_SUPPORT_TOOLTIPS       0
 
 
 #if defined(__WXWINCE__)
     #define wxPG_SMALL_SCREEN       1
-    #undef wxPG_DOUBLE_BUFFER
-    #define wxPG_DOUBLE_BUFFER      0
 #else
     #define wxPG_SMALL_SCREEN       0
 #endif
index 863581ae7617f9d218c6a471569da93d7dde0f2c..26a550223a3fd8b616109d8ded2222536a1a9b00 100644 (file)
@@ -375,9 +375,7 @@ void wxPropertyGrid::Init1()
     m_coloursCustomized = 0;
     m_frozen = 0;
 
-#if wxPG_DOUBLE_BUFFER
     m_doubleBuffer = NULL;
-#endif
 
 #ifndef wxPG_ICON_WIDTH
     m_expandbmp = NULL;
@@ -544,10 +542,8 @@ wxPropertyGrid::~wxPropertyGrid()
                       wxS("Close(false).)") );
     }
 
-#if wxPG_DOUBLE_BUFFER
     if ( m_doubleBuffer )
         delete m_doubleBuffer;
-#endif
 
     if ( m_iFlags & wxPG_FL_CREATEDSTATE )
         delete m_pState;
@@ -1127,9 +1123,7 @@ void wxPropertyGrid::SetExtraStyle( long exStyle )
         }
         else
         {
-        #if wxPG_DOUBLE_BUFFER
             wxDELETE(m_doubleBuffer);
-        #endif
         }
     }
 
@@ -1965,7 +1959,6 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
         wxDC* dcPtr = &dc;
         bool isBuffered = false;
 
-    #if wxPG_DOUBLE_BUFFER
         wxMemoryDC* bufferDC = NULL;
 
         if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
@@ -1986,7 +1979,6 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
                 isBuffered = true;
             }
         }
-    #endif
 
         if ( dcPtr )
         {
@@ -2005,7 +1997,6 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
             }
         }
 
-    #if wxPG_DOUBLE_BUFFER
         if ( bufferDC )
         {
             dc.Blit( drawRect.x, drawRect.y, drawRect.width,
@@ -2013,7 +2004,6 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
                      bufferDC, 0, 0, wxCOPY );
             delete bufferDC;
         }
-    #endif
     }
     else
     {
@@ -2085,10 +2075,11 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
     int xRelMod = 0;
 
     //
-    // With wxPG_DOUBLE_BUFFER, do double buffering
+    // For now, do some manual calculation for double buffering
     // - buffer's y = 0, so align itemsRect and coordinates to that
     //
-#if wxPG_DOUBLE_BUFFER
+    // TODO: In future use wxAutoBufferedPaintDC (for example)
+    //
     int yRelMod = 0;
 
     wxRect cr2;
@@ -2107,9 +2098,6 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
         firstItemTopY -= yRelMod;
         lastItemBottomY -= yRelMod;
     }
-#else
-    wxUnusedVar(isBuffered);
-#endif
 
     int x = m_marginWidth - xRelMod;
 
@@ -4619,7 +4607,6 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
     m_width = width;
     m_height = height;
 
-#if wxPG_DOUBLE_BUFFER
     if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
     {
         int dblh = (m_lineHeight*2);
@@ -4647,8 +4634,6 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
         }
     }
 
-#endif
-
     m_pState->OnClientWidthChange( width, event.GetSize().x - m_ncWidth, true );
     m_ncWidth = event.GetSize().x;