// Purpose: interface of wxBufferedDC
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@class wxBufferedDC
This class provides a simple way to avoid flicker: when drawing on it,
- everything is in fact first drawn on an in-memory buffer (a wxBitmap) and
+ everything is infact first drawn on an in-memory buffer (a wxBitmap) and
then copied to the screen, using the associated wxDC, only once, when this
object is destroyed. wxBufferedDC itself is typically associated with
wxClientDC, if you want to use it in your @c EVT_PAINT handler, you should
*/
wxBufferedDC();
- //@{
/**
- Creates a buffer for the provided @dc. Init() must not be called when
+ Creates a buffer for the provided @a dc. Init() must not be called when
using this constructor.
@param dc
@param area
The size of the bitmap to be used for buffering (this bitmap is
created internally when it is not given explicitly).
+ @param style
+ wxBUFFER_CLIENT_AREA to indicate that just the client area of the
+ window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the
+ buffer bitmap covers the virtual area.
+ */
+ wxBufferedDC(wxDC* dc, const wxSize& area,
+ int style = wxBUFFER_CLIENT_AREA);
+
+ /**
+ Creates a buffer for the provided dc. Init() must not be called when
+ using this constructor.
+
+ @param dc
+ The underlying DC: everything drawn to this object will be flushed
+ to this DC when this object is destroyed. You may pass @NULL in
+ order to just initialize the buffer, and not flush it.
@param buffer
Explicitly provided bitmap to be used for buffering: this is the
most efficient solution as the bitmap doesn't have to be recreated
window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the
buffer bitmap covers the virtual area.
*/
- wxBufferedDC(wxDC* dc, const wxSize& area,
+ wxBufferedDC(wxDC* dc, wxBitmap& buffer = wxNullBitmap,
int style = wxBUFFER_CLIENT_AREA);
- wxBufferedDC(wxDC* dc, wxBitmap& buffer,
- int style = wxBUFFER_CLIENT_AREA);
- //@}
/**
Copies everything drawn on the DC so far to the underlying DC
associated with this object, if any.
*/
- ~wxBufferedDC();
+ virtual ~wxBufferedDC();
//@{
/**
*/
void Init(wxDC* dc, const wxSize& area,
int style = wxBUFFER_CLIENT_AREA);
- void Init(wxDC* dc, wxBitmap& buffer,
+ void Init(wxDC* dc, wxBitmap& buffer = wxNullBitmap,
int style = wxBUFFER_CLIENT_AREA);
//@}
};
Copies everything drawn on the DC so far to the window associated with
this object, using a wxPaintDC.
*/
- ~wxBufferedPaintDC();
+ virtual ~wxBufferedPaintDC();
};