git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67494
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxWindow *m_wndEditor;
wxWindow *m_wndEditor2;
wxWindow *m_wndEditor;
wxWindow *m_wndEditor2;
wxBitmap *m_doubleBuffer;
wxBitmap *m_doubleBuffer;
/** Local time ms when control was created. */
wxLongLong m_timeCreated;
/** Local time ms when control was created. */
wxLongLong m_timeCreated;
#undef wxPG_FL_INITIALIZED
#undef wxPG_FL_ACTIVATION_BY_CLICK
#undef wxPG_SUPPORT_TOOLTIPS
#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
#undef wxPG_ICON_WIDTH
#undef wxPG_USE_RENDERER_NATIVE
// Following are needed by the manager headers
// 1 if wxRendererNative should be employed
#define wxPG_USE_RENDERER_NATIVE 0
// 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
// Enable tooltips
#define wxPG_SUPPORT_TOOLTIPS 1
// 1 if wxRendererNative should be employed
#define wxPG_USE_RENDERER_NATIVE 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 1
-
// Enable tooltips
#define wxPG_SUPPORT_TOOLTIPS 1
// Enable tooltips
#define wxPG_SUPPORT_TOOLTIPS 1
// 1 if wxRendererNative should be employed
#define wxPG_USE_RENDERER_NATIVE 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
// Enable tooltips
#define wxPG_SUPPORT_TOOLTIPS 1
// 1 if wxRendererNative should be employed
#define wxPG_USE_RENDERER_NATIVE 0
// 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
// Enable tooltips
#define wxPG_SUPPORT_TOOLTIPS 0
#if defined(__WXWINCE__)
#define wxPG_SMALL_SCREEN 1
#if defined(__WXWINCE__)
#define wxPG_SMALL_SCREEN 1
- #undef wxPG_DOUBLE_BUFFER
- #define wxPG_DOUBLE_BUFFER 0
#else
#define wxPG_SMALL_SCREEN 0
#endif
#else
#define wxPG_SMALL_SCREEN 0
#endif
m_coloursCustomized = 0;
m_frozen = 0;
m_coloursCustomized = 0;
m_frozen = 0;
#ifndef wxPG_ICON_WIDTH
m_expandbmp = NULL;
#ifndef wxPG_ICON_WIDTH
m_expandbmp = NULL;
wxS("Close(false).)") );
}
wxS("Close(false).)") );
}
if ( m_doubleBuffer )
delete m_doubleBuffer;
if ( m_doubleBuffer )
delete m_doubleBuffer;
if ( m_iFlags & wxPG_FL_CREATEDSTATE )
delete m_pState;
if ( m_iFlags & wxPG_FL_CREATEDSTATE )
delete m_pState;
wxDELETE(m_doubleBuffer);
wxDELETE(m_doubleBuffer);
wxDC* dcPtr = &dc;
bool isBuffered = false;
wxDC* dcPtr = &dc;
bool isBuffered = false;
wxMemoryDC* bufferDC = NULL;
if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
wxMemoryDC* bufferDC = NULL;
if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
if ( bufferDC )
{
dc.Blit( drawRect.x, drawRect.y, drawRect.width,
if ( bufferDC )
{
dc.Blit( drawRect.x, drawRect.y, drawRect.width,
bufferDC, 0, 0, wxCOPY );
delete bufferDC;
}
bufferDC, 0, 0, wxCOPY );
delete bufferDC;
}
- // 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
//
// - buffer's y = 0, so align itemsRect and coordinates to that
//
+ // TODO: In future use wxAutoBufferedPaintDC (for example)
+ //
int yRelMod = 0;
wxRect cr2;
int yRelMod = 0;
wxRect cr2;
firstItemTopY -= yRelMod;
lastItemBottomY -= yRelMod;
}
firstItemTopY -= yRelMod;
lastItemBottomY -= yRelMod;
}
-#else
- wxUnusedVar(isBuffered);
-#endif
int x = m_marginWidth - xRelMod;
int x = m_marginWidth - xRelMod;
m_width = width;
m_height = height;
m_width = width;
m_height = height;
if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
{
int dblh = (m_lineHeight*2);
if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
{
int dblh = (m_lineHeight*2);
m_pState->OnClientWidthChange( width, event.GetSize().x - m_ncWidth, true );
m_ncWidth = event.GetSize().x;
m_pState->OnClientWidthChange( width, event.GetSize().x - m_ncWidth, true );
m_ncWidth = event.GetSize().x;