]>
git.saurik.com Git - wxWidgets.git/blob - src/stubs/printdlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPrintDialog, wxPageSetupDialog
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "printdlg.h"
16 #include "wx/printdlg.h"
17 #include "wx/dcprint.h"
19 // Use generic page setup dialog: use your own native one if one exists.
20 #include "wx/generic/prntdlgg.h"
22 #if !USE_SHARED_LIBRARY
23 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
24 IMPLEMENT_CLASS(wxPageSetupDialog
, wxDialog
)
27 wxPrintDialog::wxPrintDialog():
38 wxPrintDialog::wxPrintDialog(wxWindow
*p
, wxPrintData
* data
):
44 bool wxPrintDialog::Create(wxWindow
*p
, wxPrintData
* data
)
59 wxPrintDialog::~wxPrintDialog()
61 if (destroyDC
&& printerDC
)
63 if (deviceName
) delete[] deviceName
;
64 if (driverName
) delete[] driverName
;
65 if (portName
) delete[] portName
;
68 int wxPrintDialog::ShowModal()
74 wxDC
*wxPrintDialog::GetPrintDC()
89 wxPageSetupDialog::wxPageSetupDialog():
92 m_dialogParent
= NULL
;
95 wxPageSetupDialog::wxPageSetupDialog(wxWindow
*p
, wxPageSetupData
*data
):
101 bool wxPageSetupDialog::Create(wxWindow
*p
, wxPageSetupData
*data
)
106 m_pageSetupData
= (*data
);
111 wxPageSetupDialog::~wxPageSetupDialog()
115 int wxPageSetupDialog::ShowModal()
117 // Uses generic page setup dialog
118 wxGenericPageSetupDialog
*genericPageSetupDialog
= new wxGenericPageSetupDialog(GetParent(), & m_pageSetupData
);
119 int ret
= genericPageSetupDialog
->ShowModal();
120 m_pageSetupData
= genericPageSetupDialog
->GetPageSetupData();
121 genericPageSetupDialog
->Close(TRUE
);