re-enable wxDrawWindowOnDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,6 +15,7 @@ testItems = [
|
|||||||
"GenericDirCtrl",
|
"GenericDirCtrl",
|
||||||
"ListBox",
|
"ListBox",
|
||||||
"ListCtrl",
|
"ListCtrl",
|
||||||
|
"ListCtrl With GridLines",
|
||||||
"RadioBox",
|
"RadioBox",
|
||||||
"RadioButton",
|
"RadioButton",
|
||||||
"ScrollBar",
|
"ScrollBar",
|
||||||
@@ -103,9 +104,9 @@ class Frame(wx.Frame):
|
|||||||
widget.Update()
|
widget.Update()
|
||||||
self.Update()
|
self.Update()
|
||||||
|
|
||||||
self.GetBMP(1)
|
##self.GetBMP(1)
|
||||||
self.GetBMP(2)
|
self.GetBMP(2)
|
||||||
self.GetBMP(4)
|
##self.GetBMP(4)
|
||||||
|
|
||||||
# make it visible again for the user to compare
|
# make it visible again for the user to compare
|
||||||
widget.SetPosition(visiblePos)
|
widget.SetPosition(visiblePos)
|
||||||
@@ -125,7 +126,8 @@ class Frame(wx.Frame):
|
|||||||
wdc = wx.WindowDC(w)
|
wdc = wx.WindowDC(w)
|
||||||
dc.Blit(0,0, sz.width, sz.height, wdc, 0, 0)
|
dc.Blit(0,0, sz.width, sz.height, wdc, 0, 0)
|
||||||
else:
|
else:
|
||||||
wx.DrawWindowOnDC(w, dc, method)
|
##wx.DrawWindowOnDC(w, dc, method)
|
||||||
|
wx.DrawWindowOnDC(w, dc)
|
||||||
|
|
||||||
dc.SelectObject(wx.NullBitmap)
|
dc.SelectObject(wx.NullBitmap)
|
||||||
bmp.SetMaskColour(maskClr)
|
bmp.SetMaskColour(maskClr)
|
||||||
@@ -181,8 +183,11 @@ class Frame(wx.Frame):
|
|||||||
w.SetSelection(2)
|
w.SetSelection(2)
|
||||||
self.DoWidget(w)
|
self.DoWidget(w)
|
||||||
|
|
||||||
def TestListCtrl(self, p):
|
def TestListCtrl(self, p, useGridLines=False):
|
||||||
w = wx.ListCtrl(p, -1, size=(250, 100), style=wx.LC_REPORT)
|
style=wx.LC_REPORT
|
||||||
|
if useGridLines:
|
||||||
|
style = style | wx.LC_HRULES | wx.LC_VRULES
|
||||||
|
w = wx.ListCtrl(p, -1, size=(250, 100), style=style)
|
||||||
w.InsertColumn(0, "Col 1")
|
w.InsertColumn(0, "Col 1")
|
||||||
w.InsertColumn(1, "Col 2")
|
w.InsertColumn(1, "Col 2")
|
||||||
w.InsertColumn(2, "Col 3")
|
w.InsertColumn(2, "Col 3")
|
||||||
@@ -192,6 +197,9 @@ class Frame(wx.Frame):
|
|||||||
w.SetStringItem(x, 2, str(x))
|
w.SetStringItem(x, 2, str(x))
|
||||||
self.DoWidget(w)
|
self.DoWidget(w)
|
||||||
|
|
||||||
|
def TestListCtrl_With_GridLines(self, p):
|
||||||
|
self.TestListCtrl(p, True)
|
||||||
|
|
||||||
def TestRadioBox(self, p):
|
def TestRadioBox(self, p):
|
||||||
w = wx.RadioBox(p, -1, "RadioBox",
|
w = wx.RadioBox(p, -1, "RadioBox",
|
||||||
choices=testChoices2, majorDimension=3)
|
choices=testChoices2, majorDimension=3)
|
||||||
|
@@ -169,6 +169,7 @@
|
|||||||
%rename(StopWatch) wxStopWatch;
|
%rename(StopWatch) wxStopWatch;
|
||||||
%rename(FileHistory) wxFileHistory;
|
%rename(FileHistory) wxFileHistory;
|
||||||
%rename(SingleInstanceChecker) wxSingleInstanceChecker;
|
%rename(SingleInstanceChecker) wxSingleInstanceChecker;
|
||||||
|
%rename(DrawWindowOnDC) wxDrawWindowOnDC;
|
||||||
%rename(TipProvider) wxTipProvider;
|
%rename(TipProvider) wxTipProvider;
|
||||||
%rename(PyTipProvider) wxPyTipProvider;
|
%rename(PyTipProvider) wxPyTipProvider;
|
||||||
%rename(ShowTip) wxShowTip;
|
%rename(ShowTip) wxShowTip;
|
||||||
|
@@ -209,8 +209,6 @@ public:
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Experimental...
|
// Experimental...
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
#include <wx/msw/private.h>
|
#include <wx/msw/private.h>
|
||||||
@@ -221,10 +219,14 @@ public:
|
|||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method)
|
bool wxDrawWindowOnDC(wxWindow* window, const wxDC& dc
|
||||||
|
#if 0
|
||||||
|
, int method
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
|
#if 0
|
||||||
switch (method)
|
switch (method)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
@@ -236,11 +238,14 @@ void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
// This one works much better, except for on XP. On Win2k nearly
|
#endif
|
||||||
// all widgets and their children are captured correctly[**]. On
|
// This one works much better, nearly all widgets and their
|
||||||
// XP with Themes activated most native widgets draw only
|
// children are captured correctly[**]. Prior to the big
|
||||||
// partially, if at all. Without themes it works just like on
|
// background erase changes that Vadim did in 2004-2005 this
|
||||||
// Win2k.
|
// method failed badly on XP with Themes activated, most native
|
||||||
|
// widgets draw only partially, if at all. Without themes it
|
||||||
|
// worked just like on Win2k. After those changes this method
|
||||||
|
// works very well.
|
||||||
//
|
//
|
||||||
// ** For example the radio buttons in a wxRadioBox are not its
|
// ** For example the radio buttons in a wxRadioBox are not its
|
||||||
// children by default, but you can capture it via the panel
|
// children by default, but you can capture it via the panel
|
||||||
@@ -248,6 +253,8 @@ void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method)
|
|||||||
::SendMessage(GetHwndOf(window), WM_PRINT, (long)GetHdcOf(dc),
|
::SendMessage(GetHwndOf(window), WM_PRINT, (long)GetHdcOf(dc),
|
||||||
PRF_CLIENT | PRF_NONCLIENT | PRF_CHILDREN |
|
PRF_CLIENT | PRF_NONCLIENT | PRF_CHILDREN |
|
||||||
PRF_ERASEBKGND | PRF_OWNED );
|
PRF_ERASEBKGND | PRF_OWNED );
|
||||||
|
return true;
|
||||||
|
#if 0
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
@@ -292,12 +299,14 @@ void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method)
|
|||||||
PRF_ERASEBKGND | PRF_OWNED );
|
PRF_ERASEBKGND | PRF_OWNED );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif // 0
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif // __WXMSW__
|
||||||
}
|
}
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user