Merge pull request #376 from RobinD42/fix-issue374

Add wrappers for wxPrintData::[GS]etPaperSize
This commit is contained in:
Robin Dunn
2017-05-31 20:19:53 -07:00
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -59,6 +59,9 @@ def run():
assert isinstance(c, etgtools.ClassDef)
tools.removeVirtuals(c)
c.addCppMethod('wxSize*', 'GetPaperSize', '()', 'return new wxSize(self->GetPaperSize());')
c.addCppMethod('void', 'SetPaperSize', '(const wxSize* sz)', 'self->SetPaperSize(*sz);')
c.addCppMethod('int', '__nonzero__', '()', """\
return self->IsOk();
""")

View File

@@ -46,6 +46,14 @@ class cmndata_tests(wtc.WidgetTestCase):
pd.__nonzero__()
pdd.__nonzero__()
def test_PD_PaperSize(self):
pd = wx.PrintData()
pd.GetPaperSize()
pd.SetPaperSize( wx.Size(8.5*300, 11*300) )
pd.PaperSize
#---------------------------------------------------------------------------