]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_printfw.i
ComputeScaleAndOrigin not protected anymore
[wxWidgets.git] / wxPython / src / _printfw.i
index d6a702a12c4d8a4fdcad35f746e9335d0aaad3f3..43c734854a1a55ca578988a9bd530bdfeb92f235 100644 (file)
@@ -223,10 +223,13 @@ class wxPageSetupDialog : public wxObject
 {
 public:
     wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);
-
+    ~wxPageSetupDialog();
+    
     wxPageSetupDialogData& GetPageSetupData();
     wxPageSetupDialogData& GetPageSetupDialogData();
     int ShowModal();
+
+    %pythoncode { def Destroy(self): pass }
 };
 
 //---------------------------------------------------------------------------
@@ -299,6 +302,8 @@ public:
     wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
 
     // TODO?: wxPrintDialog(wxWindow *parent, wxPrintData* data);
+
+    ~wxPrintDialog();
     
     virtual int ShowModal();
 
@@ -308,6 +313,7 @@ public:
     %newobject GetPrintDC;
     virtual wxDC *GetPrintDC();
 
+    %pythoncode { def Destroy(self): pass }
 };
 
 
@@ -341,6 +347,7 @@ public:
 
     bool GetAbort();
     static wxPrinterError GetLastError();
+
 };
 
 
@@ -414,10 +421,14 @@ MustHaveApp(wxPyPrintout);
 class wxPyPrintout  : public wxObject {
 public:
     %pythonAppend wxPyPrintout   "self._setCallbackInfo(self, Printout)"
+    %typemap(out) wxPyPrintout*;    // turn off this typemap
 
     wxPyPrintout(const wxString& title = wxPyPrintoutTitleStr);
-    //~wxPyPrintout();      wxPrintPreview object takes ownership...
+    ~wxPyPrintout();      
     
+    // Turn it back on again
+    %typemap(out) wxPyPrintout* { $result = wxPyMake_wxObject($1, $owner); }
+
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
     
@@ -491,14 +502,17 @@ MustHaveApp(wxPreviewFrame);
 
 class wxPreviewFrame : public wxFrame {
 public:
+    %disownarg(wxPrintPreview*);
+    
     %pythonAppend wxPreviewFrame   "self._setOORInfo(self)"
-
     wxPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title,
                    const wxPoint& pos = wxDefaultPosition,
                    const wxSize&  size = wxDefaultSize,
                    long style = wxDEFAULT_FRAME_STYLE,
                    const wxString& name = wxPyFrameNameStr);
 
+    %cleardisown(wxPrintPreview*);
+
     void Initialize();
     void CreateControlBar();
     void CreateCanvas();
@@ -562,6 +576,8 @@ MustHaveApp(wxPrintPreview);
 
 class wxPrintPreview : public wxObject {
 public:
+    %disownarg(wxPyPrintout*);
+    
     %nokwargs wxPrintPreview;
     wxPrintPreview(wxPyPrintout* printout,
                    wxPyPrintout* printoutForPrinting,
@@ -570,6 +586,8 @@ public:
                   wxPyPrintout* printoutForPrinting,
                   wxPrintData* data);
 
+    ~wxPrintPreview();
+    
     virtual bool SetCurrentPage(int pageNum);
     int GetCurrentPage();
 
@@ -577,6 +595,8 @@ public:
     wxPyPrintout *GetPrintout();
     wxPyPrintout *GetPrintoutForPrinting();
 
+    %cleardisown(wxPyPrintout*);
+    
     void SetFrame(wxFrame *frame);
     void SetCanvas(wxPreviewCanvas *canvas);
 
@@ -695,6 +715,8 @@ MustHaveApp(wxPyPrintPreview);
 class wxPyPrintPreview : public wxPrintPreview
 {
 public:
+    %disownarg(wxPyPrintout*);
+
     %pythonAppend wxPyPrintPreview   "self._setCallbackInfo(self, PyPrintPreview)"
     %nokwargs wxPyPrintPreview;
     wxPyPrintPreview(wxPyPrintout* printout,
@@ -704,6 +726,8 @@ public:
                      wxPyPrintout* printoutForPrinting,
                      wxPrintData* data);
 
+    %cleardisown(wxPyPrintout*);
+    
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     
     bool SetCurrentPage(int pageNum);