]> git.saurik.com Git - wxWidgets.git/commitdiff
Readded deprec. constructor.
authorRobert Roebling <robert@roebling.de>
Wed, 11 Sep 2002 22:03:29 +0000 (22:03 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 11 Sep 2002 22:03:29 +0000 (22:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/dcpsg.h
src/generic/dcpsg.cpp

index b17f6b6ae4822bc9ebb9f032263bf29215b4a0cc..d0bf5a34fcec4b4a23d8624938ca5ad7e08b75fe 100644 (file)
@@ -42,9 +42,15 @@ public:
 
   // Recommended constructor
   wxPostScriptDC(const wxPrintData& printData);
-
+  
   ~wxPostScriptDC();
 
+#if WXWIN_COMPATIBILITY_2_2
+  wxPostScriptDC( const wxString &output, bool interactive = FALSE, wxWindow *parent = NULL )
+      { Create( output, interactive, parent ); }
+  bool Create ( const wxString &output, bool interactive = FALSE, wxWindow *parent = NULL );
+#endif
+
   virtual bool Ok() const;
 
   virtual void BeginDrawing() {}
index 1e6d11c6198e20d3d84af661fea132aaef4ef3a5..5e61da75f681a5e5df1377bc3cd3f9c4c2d405fe 100644 (file)
@@ -318,6 +318,31 @@ wxPostScriptDC::~wxPostScriptDC ()
     }
 }
 
+#if WXWIN_COMPATIBILITY_2_2
+bool wxPostScriptDC::Create( const wxString &output, bool interactive, wxWindow *parent )
+{
+    wxPrintData data;
+    data.SetFilename( output );
+    data.SetPrintMode( wxPRINT_MODE_FILE );
+    
+    if (interactive)
+    {
+        wxPrintDialogData ddata( data );
+        wxPrintDialog dialog( parent, &data );
+        dialog.GetPrintDialogData().SetSetupDialog(TRUE);
+        if (dialog.ShowModal() != wxID_OK)
+        {
+            m_ok = FALSE;
+            return FALSE;
+        }
+        data = dialog.GetPrintDialogData().GetPrintData();
+    }
+    
+    return TRUE;
+}
+#endif
+
+
 bool wxPostScriptDC::Ok() const
 {
   return m_ok;