new style flags for wxBufferedDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d02ea46cad
commit
67a5217c4f
@ -53,7 +53,7 @@ class MyCanvas(wx.ScrolledWindow):
|
||||
# wx.PaintDC and then blit the bitmap to it when dc is
|
||||
# deleted. Since we don't need to draw anything else
|
||||
# here that's all there is to it.
|
||||
dc = wx.BufferedPaintDC(self, self.buffer)
|
||||
dc = wx.BufferedPaintDC(self, self.buffer, wx.BUFFER_VIRTUAL_AREA)
|
||||
else:
|
||||
dc = wx.PaintDC(self)
|
||||
self.PrepareDC(dc)
|
||||
|
@ -217,6 +217,9 @@ a temporary 'fix' until properly fixed before 2.6.
|
||||
wxMac: Toolbar is now more native looking with borderless toolbar
|
||||
buttons.
|
||||
|
||||
wxMac: Switched wx.Bitmap to use newer Quartz object types and APIs
|
||||
internally. This results in faster display and better alpha support.
|
||||
|
||||
Added wx.DatePickerCtrl.
|
||||
|
||||
wx.html.HtmlWindow now supports background images.
|
||||
@ -252,6 +255,15 @@ the Python version in the wx.lib.ogl package instead.
|
||||
The wx.iewin module is no longer built by default. You can use the
|
||||
wx.lib.iewin version instead.
|
||||
|
||||
Fixed wx.BufferedPaintDC for scrolled windows to work whether the
|
||||
buffer is covering only the client area or the full virtual area of
|
||||
the scrolled window. By default it will assume that only the client
|
||||
area is covered. This is different than the old behavior, to indicate
|
||||
that the entire virtual area is covered then add a
|
||||
style=wx.BUFFER_VIRTUAL_AREA parameter.
|
||||
|
||||
wx.gizmos.TreeListCtrl: Add support for the EVT_TREE_ITEM_GETTOOLTIP
|
||||
event.
|
||||
|
||||
|
||||
|
||||
|
@ -1223,6 +1223,10 @@ destroyed safely.", "");
|
||||
#include <wx/dcbuffer.h>
|
||||
%}
|
||||
|
||||
enum {
|
||||
wxBUFFER_VIRTUAL_AREA,
|
||||
wxBUFFER_CLIENT_AREA
|
||||
};
|
||||
|
||||
MustHaveApp(wxBufferedDC);
|
||||
|
||||
@ -1264,19 +1268,18 @@ public:
|
||||
also requires more memory as the bitmap is never freed. The
|
||||
bitmap should have appropriate size, anything drawn outside of
|
||||
its bounds is clipped.
|
||||
|
||||
:param style: The style parameter indicates whether the supplied buffer is
|
||||
intended to cover the entire virtual size of a `wx.ScrolledWindow` or
|
||||
if it only covers the client area. Acceptable values are
|
||||
``wx.BUFFER_VIRTUAL_AREA`` and ``wx.BUFFER_CLIENT_AREA``.
|
||||
|
||||
");
|
||||
wxBufferedDC( wxDC *dc, const wxBitmap &buffer );
|
||||
wxBufferedDC( wxDC *dc, const wxSize &area );
|
||||
wxBufferedDC( wxDC *dc, const wxBitmap &buffer, int style = wxBUFFER_CLIENT_AREA );
|
||||
wxBufferedDC( wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA );
|
||||
|
||||
|
||||
|
||||
// // TODO: Keep this one too?
|
||||
// %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area )
|
||||
// "val.__dc = args[0] # save a ref so the other dc will not be deleted before self";
|
||||
// %RenameCtor(BufferedDCInternalBuffer, wxBufferedDC( wxDC *dc, const wxSize &area ));
|
||||
|
||||
|
||||
// The buffer is blit to the real DC when the BufferedDC is destroyed.
|
||||
DocCtorStr(
|
||||
~wxBufferedDC(),
|
||||
"Copies everything drawn on the DC so far to the underlying DC
|
||||
@ -1314,6 +1317,8 @@ automatically when it is destroyed. For example::
|
||||
dc = wx.BufferedPaintDC(self, self.buffer)
|
||||
|
||||
|
||||
|
||||
|
||||
", "");
|
||||
|
||||
class wxBufferedPaintDC : public wxBufferedDC
|
||||
@ -1321,7 +1326,9 @@ class wxBufferedPaintDC : public wxBufferedDC
|
||||
public:
|
||||
|
||||
DocCtorStr(
|
||||
wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer = wxNullBitmap ),
|
||||
wxBufferedPaintDC( wxWindow *window,
|
||||
const wxBitmap &buffer = wxNullBitmap,
|
||||
int style = wxBUFFER_CLIENT_AREA),
|
||||
"Create a buffered paint DC. As with `wx.BufferedDC`, you may either
|
||||
provide the bitmap to be used for buffering or let this object create
|
||||
one internally (in the latter case, the size of the client part of the
|
||||
|
Loading…
Reference in New Issue
Block a user