added wxWindow::IsDoubleBuffered() and improve wxBufferedDC (patch 1565330)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-09 16:39:34 +00:00
parent af86380553
commit 2e992e06a7
29 changed files with 827 additions and 142 deletions

View File

@@ -35,7 +35,6 @@
#include "wx/timer.h"
#endif
#include "wx/dcbuffer.h"
#include "wx/tooltip.h"
#include "wx/combo.h"
@@ -610,9 +609,6 @@ END_EVENT_TABLE()
IMPLEMENT_ABSTRACT_CLASS(wxComboCtrlBase, wxControl)
// Have global double buffer - should be enough for multiple combos
static wxBitmap* gs_doubleBuffer = (wxBitmap*) NULL;
void wxComboCtrlBase::Init()
{
m_winPopup = (wxWindow *)NULL;
@@ -737,9 +733,6 @@ wxComboCtrlBase::~wxComboCtrlBase()
if ( HasCapture() )
ReleaseMouse();
delete gs_doubleBuffer;
gs_doubleBuffer = (wxBitmap*) NULL;
#if INSTALL_TOPLEV_HANDLER
delete ((wxComboFrameEventHandler*)m_toplevEvtHandler);
m_toplevEvtHandler = (wxEvtHandler*) NULL;
@@ -1238,19 +1231,6 @@ void wxComboCtrlBase::RecalcAndRefresh()
}
}
wxBitmap& wxComboCtrlBase::GetBufferBitmap( const wxSize& sz ) const
{
// If size is larger, recalculate double buffer bitmap
if ( !gs_doubleBuffer ||
sz.x > gs_doubleBuffer->GetWidth() ||
sz.y > gs_doubleBuffer->GetHeight() )
{
delete gs_doubleBuffer;
gs_doubleBuffer = new wxBitmap(sz.x+25,sz.y);
}
return *gs_doubleBuffer;
}
// ----------------------------------------------------------------------------
// miscellaneous event handlers
// ----------------------------------------------------------------------------