]>
git.saurik.com Git - wxWidgets.git/blob - src/motif/printdlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPrintDialog, wxPageSetupDialog
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
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 #if !USE_SHARED_LIBRARY
24 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
25 IMPLEMENT_CLASS(wxPageSetupDialog
, wxDialog
)
28 wxPrintDialog::wxPrintDialog():
31 m_dialogParent
= NULL
;
35 wxPrintDialog::wxPrintDialog(wxWindow
*p
, wxPrintData
* data
):
41 bool wxPrintDialog::Create(wxWindow
*p
, wxPrintData
* data
)
52 wxPrintDialog::~wxPrintDialog()
58 int wxPrintDialog::ShowModal()
64 wxDC
*wxPrintDialog::GetPrintDC()
68 wxDC
* dc
= m_printerDC
;
80 wxPageSetupDialog::wxPageSetupDialog():
83 m_dialogParent
= NULL
;
86 wxPageSetupDialog::wxPageSetupDialog(wxWindow
*p
, wxPageSetupData
*data
):
92 bool wxPageSetupDialog::Create(wxWindow
*p
, wxPageSetupData
*data
)
97 m_pageSetupData
= (*data
);
102 wxPageSetupDialog::~wxPageSetupDialog()
106 int wxPageSetupDialog::ShowModal()
108 // Uses generic page setup dialog
109 wxGenericPageSetupDialog
*genericPageSetupDialog
= new wxGenericPageSetupDialog(GetParent(), & m_pageSetupData
);
110 int ret
= genericPageSetupDialog
->ShowModal();
111 m_pageSetupData
= genericPageSetupDialog
->GetPageSetupData();
112 genericPageSetupDialog
->Close(TRUE
);