Changes to how overridable C++ methods are virtualized for Python.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-02-07 03:56:44 +00:00
parent e4c37d10dd
commit a7a0141800
25 changed files with 890 additions and 766 deletions

View File

@@ -15,38 +15,38 @@ class MyPrintout(wx.Printout):
self.log = log
def OnBeginDocument(self, start, end):
self.log.WriteText("wx.Printout.OnBeginDocument\n")
return self.base_OnBeginDocument(start, end)
self.log.WriteText("MyPrintout.OnBeginDocument\n")
return super(MyPrintout, self).OnBeginDocument(start, end)
def OnEndDocument(self):
self.log.WriteText("wx.Printout.OnEndDocument\n")
self.base_OnEndDocument()
self.log.WriteText("MyPrintout.OnEndDocument\n")
super(MyPrintout, self).OnEndDocument()
def OnBeginPrinting(self):
self.log.WriteText("wx.Printout.OnBeginPrinting\n")
self.base_OnBeginPrinting()
self.log.WriteText("MyPrintout.OnBeginPrinting\n")
super(MyPrintout, self).OnBeginPrinting()
def OnEndPrinting(self):
self.log.WriteText("wx.Printout.OnEndPrinting\n")
self.base_OnEndPrinting()
self.log.WriteText("MyPrintout.OnEndPrinting\n")
super(MyPrintout, self).OnEndPrinting()
def OnPreparePrinting(self):
self.log.WriteText("wx.Printout.OnPreparePrinting\n")
self.base_OnPreparePrinting()
self.log.WriteText("MyPrintout.OnPreparePrinting\n")
super(MyPrintout, self).OnPreparePrinting()
def HasPage(self, page):
self.log.WriteText("wx.Printout.HasPage: %d\n" % page)
self.log.WriteText("MyPrintout.HasPage: %d\n" % page)
if page <= 2:
return True
else:
return False
def GetPageInfo(self):
self.log.WriteText("wx.Printout.GetPageInfo\n")
self.log.WriteText("MyPrintout.GetPageInfo\n")
return (1, 2, 1, 2)
def OnPrintPage(self, page):
self.log.WriteText("wx.Printout.OnPrintPage: %d\n" % page)
self.log.WriteText("MyPrintout.OnPrintPage: %d\n" % page)
dc = self.GetDC()
#-------------------------------------------
@@ -128,7 +128,7 @@ class TestPrintPanel(wx.Panel):
def OnPrintSetup(self, event):
data = wx.PrintDialogData(self.printData)
printerDialog = wx.PrintDialog(self, data)
printerDialog.GetPrintDialogData().SetSetupDialog(True)
#printerDialog.GetPrintDialogData().SetSetupDialog(True)
printerDialog.ShowModal();
# this makes a copy of the wx.PrintData instead of just saving