]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/printfw.py
added functions to read/write several elements at once (patch 754986)
[wxWidgets.git] / wxPython / src / msw / printfw.py
index 191f6d9b9eae724849a223fd59798840d04a11d3..ba11c954283967458bf4954d4ae2c4de09a46d86 100644 (file)
@@ -7,6 +7,8 @@ from windows import *
 
 from gdi import *
 
+from fonts import *
+
 from clip_dnd import *
 
 from cmndlgs import *
@@ -23,9 +25,12 @@ class wxPrintDataPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,printfwc=printfwc):
-        if self.thisown == 1 :
-            printfwc.delete_wxPrintData(self)
+    def __del__(self, delfunc=printfwc.delete_wxPrintData):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def GetNoCopies(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrintData_GetNoCopies,(self,) + _args, _kwargs)
         return val
@@ -35,6 +40,9 @@ class wxPrintDataPtr(wxObjectPtr):
     def GetOrientation(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrintData_GetOrientation,(self,) + _args, _kwargs)
         return val
+    def Ok(self, *_args, **_kwargs):
+        val = apply(printfwc.wxPrintData_Ok,(self,) + _args, _kwargs)
+        return val
     def GetPrinterName(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrintData_GetPrinterName,(self,) + _args, _kwargs)
         return val
@@ -196,19 +204,17 @@ class wxPostScriptDC(wxPostScriptDCPtr):
 
 
 
-def wxPostScriptDC2(*_args,**_kwargs):
-    val = wxPostScriptDCPtr(apply(printfwc.new_wxPostScriptDC2,_args,_kwargs))
-    val.thisown = 1
-    return val
-
 
 class wxPageSetupDialogDataPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,printfwc=printfwc):
-        if self.thisown == 1 :
-            printfwc.delete_wxPageSetupDialogData(self)
+    def __del__(self, delfunc=printfwc.delete_wxPageSetupDialogData):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def EnableHelp(self, *_args, **_kwargs):
         val = apply(printfwc.wxPageSetupDialogData_EnableHelp,(self,) + _args, _kwargs)
         return val
@@ -272,6 +278,9 @@ class wxPageSetupDialogDataPtr(wxObjectPtr):
         val = apply(printfwc.wxPageSetupDialogData_GetPrintData,(self,) + _args, _kwargs)
         if val: val = wxPrintDataPtr(val) ; val.thisown = 1
         return val
+    def Ok(self, *_args, **_kwargs):
+        val = apply(printfwc.wxPageSetupDialogData_Ok,(self,) + _args, _kwargs)
+        return val
     def SetDefaultInfo(self, *_args, **_kwargs):
         val = apply(printfwc.wxPageSetupDialogData_SetDefaultInfo,(self,) + _args, _kwargs)
         return val
@@ -335,9 +344,12 @@ class wxPrintDialogDataPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,printfwc=printfwc):
-        if self.thisown == 1 :
-            printfwc.delete_wxPrintDialogData(self)
+    def __del__(self, delfunc=printfwc.delete_wxPrintDialogData):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def EnableHelp(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrintDialogData_EnableHelp,(self,) + _args, _kwargs)
         return val
@@ -378,6 +390,9 @@ class wxPrintDialogDataPtr(wxObjectPtr):
     def GetToPage(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrintDialogData_GetToPage,(self,) + _args, _kwargs)
         return val
+    def Ok(self, *_args, **_kwargs):
+        val = apply(printfwc.wxPrintDialogData_Ok,(self,) + _args, _kwargs)
+        return val
     def SetCollate(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrintDialogData_SetCollate,(self,) + _args, _kwargs)
         return val
@@ -504,9 +519,12 @@ class wxPrinterPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,printfwc=printfwc):
-        if self.thisown == 1 :
-            printfwc.delete_wxPrinter(self)
+    def __del__(self, delfunc=printfwc.delete_wxPrinter):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def CreateAbortWindow(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrinter_CreateAbortWindow,(self,) + _args, _kwargs)
         return val