1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPrintDialog, wxPageSetupDialog classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_PRINTDLG_H_
13 #define _WX_PRINTDLG_H_
15 #if wxUSE_PRINTING_ARCHITECTURE
17 #include "wx/dialog.h"
18 #include "wx/cmndata.h"
19 #include "wx/prntbase.h"
20 #include "wx/printdlg.h"
22 class WXDLLIMPEXP_FWD_CORE wxDC
;
24 //----------------------------------------------------------------------------
25 // wxWindowsPrintNativeData
26 //----------------------------------------------------------------------------
28 class WXDLLEXPORT wxWindowsPrintNativeData
: public wxPrintNativeDataBase
31 wxWindowsPrintNativeData();
32 virtual ~wxWindowsPrintNativeData();
34 virtual bool TransferTo( wxPrintData
&data
);
35 virtual bool TransferFrom( const wxPrintData
&data
);
37 virtual bool Ok() const { return IsOk(); }
38 virtual bool IsOk() const;
40 void* GetDevMode() const { return m_devMode
; }
41 void SetDevMode(void* data
) { m_devMode
= data
; }
42 void* GetDevNames() const { return m_devNames
; }
43 void SetDevNames(void* data
) { m_devNames
= data
; }
49 short m_customWindowsPaperId
;
52 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData
)
55 // ---------------------------------------------------------------------------
56 // wxWindowsPrintDialog: the MSW dialog for printing
57 // ---------------------------------------------------------------------------
59 class WXDLLEXPORT wxWindowsPrintDialog
: public wxPrintDialogBase
62 wxWindowsPrintDialog(wxWindow
*parent
, wxPrintDialogData
* data
= NULL
);
63 wxWindowsPrintDialog(wxWindow
*parent
, wxPrintData
* data
);
64 virtual ~wxWindowsPrintDialog();
66 bool Create(wxWindow
*parent
, wxPrintDialogData
* data
= NULL
);
67 virtual int ShowModal();
69 wxPrintDialogData
& GetPrintDialogData() { return m_printDialogData
; }
70 wxPrintData
& GetPrintData() { return m_printDialogData
.GetPrintData(); }
72 virtual wxDC
*GetPrintDC();
75 wxPrintDialogData m_printDialogData
;
76 wxPrinterDC
* m_printerDC
;
78 wxWindow
* m_dialogParent
;
81 bool ConvertToNative( wxPrintDialogData
&data
);
82 bool ConvertFromNative( wxPrintDialogData
&data
);
88 DECLARE_NO_COPY_CLASS(wxWindowsPrintDialog
)
89 DECLARE_CLASS(wxWindowsPrintDialog
)
92 // ---------------------------------------------------------------------------
93 // wxWindowsPageSetupDialog: the MSW page setup dialog
94 // ---------------------------------------------------------------------------
96 class WXDLLEXPORT wxWindowsPageSetupDialog
: public wxPageSetupDialogBase
99 wxWindowsPageSetupDialog();
100 wxWindowsPageSetupDialog(wxWindow
*parent
, wxPageSetupDialogData
*data
= NULL
);
101 virtual ~wxWindowsPageSetupDialog();
103 bool Create(wxWindow
*parent
, wxPageSetupDialogData
*data
= NULL
);
104 virtual int ShowModal();
105 bool ConvertToNative( wxPageSetupDialogData
&data
);
106 bool ConvertFromNative( wxPageSetupDialogData
&data
);
108 virtual wxPageSetupData
& GetPageSetupDialogData() { return m_pageSetupData
; }
111 wxPageSetupDialogData m_pageSetupData
;
112 wxWindow
* m_dialogParent
;
118 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog
)
121 #endif // wxUSE_PRINTING_ARCHITECTURE