Merge pull request #1064 from RobinD42/fix-issue1060

Ensure sip knows the pure virtuals are present in wx.html.HtmlPrintout

(cherry picked from commit 17f52dfd14)
This commit is contained in:
Robin Dunn
2018-10-29 19:57:51 -07:00
parent 882401e9d9
commit 653d91b372
3 changed files with 13 additions and 0 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()
#---------------------------------------------------------------------------