]>
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/object.h"
17 #include "wx/stubs/printdlg.h"
18 #include "wx/dcprint.h"
20 // Use generic page setup dialog: use your own native one if one exists.
21 #include "wx/generic/prntdlgg.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
24 IMPLEMENT_CLASS(wxPageSetupDialog
, wxDialog
)
26 wxPrintDialog::wxPrintDialog():
29 m_dialogParent
= NULL
;
33 wxPrintDialog::wxPrintDialog(wxWindow
*p
, wxPrintData
* data
):
39 bool wxPrintDialog::Create(wxWindow
*p
, wxPrintData
* data
)
50 wxPrintDialog::~wxPrintDialog()
56 int wxPrintDialog::ShowModal()
62 wxDC
*wxPrintDialog::GetPrintDC()
66 wxDC
* dc
= m_printerDC
;
78 wxPageSetupDialog::wxPageSetupDialog():
81 m_dialogParent
= NULL
;
84 wxPageSetupDialog::wxPageSetupDialog(wxWindow
*p
, wxPageSetupData
*data
):
90 bool wxPageSetupDialog::Create(wxWindow
*p
, wxPageSetupData
*data
)
95 m_pageSetupData
= (*data
);
100 wxPageSetupDialog::~wxPageSetupDialog()
104 int wxPageSetupDialog::ShowModal()
106 // Uses generic page setup dialog
107 wxGenericPageSetupDialog
*genericPageSetupDialog
= new wxGenericPageSetupDialog(GetParent(), & m_pageSetupData
);
108 int ret
= genericPageSetupDialog
->ShowModal();
109 m_pageSetupData
= genericPageSetupDialog
->GetPageSetupData();
110 genericPageSetupDialog
->Close(TRUE
);