diff --git a/CHANGES.rst b/CHANGES.rst index fccaf9bd..b75b8d7a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -164,6 +164,9 @@ Changes in this release include the following: * wxWidgets for Mac includes the wxJoystick class now, also update the demo. (#997) +* Fix wx.html.HtmlPrintout to not be seen as an abstract class, so it can be + instantiated. (#1060) + diff --git a/etg/htmlprint.py b/etg/htmlprint.py index 5e15d905..e0c30cb0 100644 --- a/etg/htmlprint.py +++ b/etg/htmlprint.py @@ -52,6 +52,14 @@ def run(): c.addPrivateCopyCtor() tools.fixHtmlSetFonts(c) + # Ensure sip knows these virtuals are present in this class. + c.addItem(etgtools.WigCode("""\ + bool OnPrintPage(int page); + bool HasPage(int page); + void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); + bool OnBeginDocument(int startPage, int endPage); + void OnPreparePrinting(); + """)) #----------------------------------------------------------------- tools.doCommonTweaks(module) diff --git a/unittests/test_htmlprint.py b/unittests/test_htmlprint.py index 65c33a70..25bc9fef 100644 --- a/unittests/test_htmlprint.py +++ b/unittests/test_htmlprint.py @@ -24,6 +24,8 @@ class htmlprint_Tests(wtc.WidgetTestCase): hep = wx.html.HtmlEasyPrinting(parentWindow=self.frame) hep.SetFonts('', '', [7,8,10,12,16,22,30]) + def test_htmlprint3(self): + po = wx.html.HtmlPrintout() #---------------------------------------------------------------------------