+%pythoncode {
+ if 'wxMac' in wx.PlatformInfo or 'gtk2' in wx.PlatformInfo:
+ _AutoBufferedPaintDCBase = PaintDC
+ else:
+ _AutoBufferedPaintDCBase = BufferedPaintDC
+
+ class AutoBufferedPaintDC(_AutoBufferedPaintDCBase):
+ """
+ If the current platform double buffers by default then this DC is the
+ same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
+
+ :see: `wx.AutoBufferedPaintDCFactory`
+ """
+ def __init__(self, window):
+ _AutoBufferedPaintDCBase.__init__(self, window)
+}
+
+
+%newobject wxAutoBufferedPaintDCFactory;
+DocDeclStr(
+ wxDC* , wxAutoBufferedPaintDCFactory(wxWindow* window),
+ "Checks if the window is natively double buffered and will return a
+`wx.PaintDC` if it is, a `wx.BufferedPaintDC` otherwise. The
+advantage of this function over `wx.AutoBufferedPaintDC` is that this
+function will check if the the specified window supports has
+double-buffering enabled rather than just going by platform defaults.", "");
+