Add wxWindowBase::SetDoubleBuffered() stub

This method was already provided by wxGTK and wxMSW, but not wxOSX nor
any other ports.

Provide a stub for it in wxWindowBase to allow user code to call it on
all platforms, there is no harm in that even if it doesn't (and can't)
do anything under macOS.
This commit is contained in:
Vadim Zeitlin 2017-11-11 11:47:56 +01:00
parent 7a7f715160
commit c98fa0ca98
3 changed files with 5 additions and 5 deletions

View File

@ -122,8 +122,7 @@ public:
virtual bool DoIsExposed( int x, int y ) const wxOVERRIDE;
virtual bool DoIsExposed( int x, int y, int w, int h ) const wxOVERRIDE;
// currently wxGTK2-only
void SetDoubleBuffered(bool on);
virtual void SetDoubleBuffered(bool on) wxOVERRIDE;
virtual bool IsDoubleBuffered() const wxOVERRIDE;
// SetLabel(), which does nothing in wxWindow

View File

@ -532,11 +532,9 @@ public:
// check if mouse is in the window
bool IsMouseInWindow() const;
// check if a native double-buffering applies for this window
virtual void SetDoubleBuffered(bool on) wxOVERRIDE;
virtual bool IsDoubleBuffered() const wxOVERRIDE;
void SetDoubleBuffered(bool on);
// synthesize a wxEVT_LEAVE_WINDOW event and set m_mouseInWindow to false
void GenerateMouseLeave();

View File

@ -1065,6 +1065,9 @@ public:
// adjust DC for drawing on this window
virtual void PrepareDC( wxDC & WXUNUSED(dc) ) { }
// enable or disable double buffering
virtual void SetDoubleBuffered(bool WXUNUSED(on)) { }
// return true if the window contents is double buffered by the system
virtual bool IsDoubleBuffered() const { return false; }