X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/93cf77c076b699e8e0b3b0049bd4f80de15997dd..399b60a0ad232265cd74ce8bf6a53a1f2cc57ff2:/src/stubs/printdlg.cpp diff --git a/src/stubs/printdlg.cpp b/src/stubs/printdlg.cpp index 4a78ae47e0..c6438e083c 100644 --- a/src/stubs/printdlg.cpp +++ b/src/stubs/printdlg.cpp @@ -13,26 +13,21 @@ #pragma implementation "printdlg.h" #endif -#include "wx/printdlg.h" +#include "wx/object.h" +#include "wx/stubs/printdlg.h" #include "wx/dcprint.h" // Use generic page setup dialog: use your own native one if one exists. #include "wx/generic/prntdlgg.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) IMPLEMENT_CLASS(wxPageSetupDialog, wxDialog) -#endif wxPrintDialog::wxPrintDialog(): wxDialog() { - dialogParent = NULL; - printerDC = NULL; - destroyDC = TRUE; - deviceName = NULL; - driverName = NULL; - portName = NULL; + m_dialogParent = NULL; + m_printerDC = NULL; } wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data): @@ -43,26 +38,19 @@ wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data): bool wxPrintDialog::Create(wxWindow *p, wxPrintData* data) { - dialogParent = p; - printerDC = NULL; - destroyDC = TRUE; - deviceName = NULL; - driverName = NULL; - portName = NULL; + m_dialogParent = p; + m_printerDC = NULL; if ( data ) - printData = *data; + m_printData = *data; return TRUE; } wxPrintDialog::~wxPrintDialog() { - if (destroyDC && printerDC) - delete printerDC; - if (deviceName) delete[] deviceName; - if (driverName) delete[] driverName; - if (portName) delete[] portName; + if (m_printerDC) + delete m_printerDC; } int wxPrintDialog::ShowModal() @@ -73,10 +61,11 @@ int wxPrintDialog::ShowModal() wxDC *wxPrintDialog::GetPrintDC() { - if (printerDC) + if (m_printerDC) { - destroyDC = FALSE; - return printerDC; + wxDC* dc = m_printerDC; + m_printerDC = NULL; + return dc; } else return NULL;