1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/printdlg.h
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
;
25 //----------------------------------------------------------------------------
26 // wxWindowsPrintNativeData
27 //----------------------------------------------------------------------------
29 class WXDLLIMPEXP_CORE wxWindowsPrintNativeData
: public wxPrintNativeDataBase
32 wxWindowsPrintNativeData();
33 virtual ~wxWindowsPrintNativeData();
35 virtual bool TransferTo( wxPrintData
&data
);
36 virtual bool TransferFrom( const wxPrintData
&data
);
38 virtual bool Ok() const { return IsOk(); }
39 virtual bool IsOk() const;
41 void InitializeDevMode(const wxString
&printerName
= wxEmptyString
, WinPrinter
* printer
= NULL
);
42 void* GetDevMode() const { return m_devMode
; }
43 void SetDevMode(void* data
) { m_devMode
= data
; }
44 void* GetDevNames() const { return m_devNames
; }
45 void SetDevNames(void* data
) { m_devNames
= data
; }
51 short m_customWindowsPaperId
;
54 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData
)
57 // ---------------------------------------------------------------------------
58 // wxWindowsPrintDialog: the MSW dialog for printing
59 // ---------------------------------------------------------------------------
61 class WXDLLIMPEXP_CORE wxWindowsPrintDialog
: public wxPrintDialogBase
64 wxWindowsPrintDialog(wxWindow
*parent
, wxPrintDialogData
* data
= NULL
);
65 wxWindowsPrintDialog(wxWindow
*parent
, wxPrintData
* data
);
66 virtual ~wxWindowsPrintDialog();
68 bool Create(wxWindow
*parent
, wxPrintDialogData
* data
= NULL
);
69 virtual int ShowModal();
71 wxPrintDialogData
& GetPrintDialogData() { return m_printDialogData
; }
72 wxPrintData
& GetPrintData() { return m_printDialogData
.GetPrintData(); }
74 virtual wxDC
*GetPrintDC();
77 wxPrintDialogData m_printDialogData
;
78 wxPrinterDC
* m_printerDC
;
80 wxWindow
* m_dialogParent
;
83 bool ConvertToNative( wxPrintDialogData
&data
);
84 bool ConvertFromNative( wxPrintDialogData
&data
);
90 wxDECLARE_NO_COPY_CLASS(wxWindowsPrintDialog
);
91 DECLARE_CLASS(wxWindowsPrintDialog
)
94 // ---------------------------------------------------------------------------
95 // wxWindowsPageSetupDialog: the MSW page setup dialog
96 // ---------------------------------------------------------------------------
98 class WXDLLIMPEXP_CORE wxWindowsPageSetupDialog
: public wxPageSetupDialogBase
101 wxWindowsPageSetupDialog();
102 wxWindowsPageSetupDialog(wxWindow
*parent
, wxPageSetupDialogData
*data
= NULL
);
103 virtual ~wxWindowsPageSetupDialog();
105 bool Create(wxWindow
*parent
, wxPageSetupDialogData
*data
= NULL
);
106 virtual int ShowModal();
107 bool ConvertToNative( wxPageSetupDialogData
&data
);
108 bool ConvertFromNative( wxPageSetupDialogData
&data
);
110 virtual wxPageSetupDialogData
& GetPageSetupDialogData() { return m_pageSetupData
; }
113 wxPageSetupDialogData m_pageSetupData
;
114 wxWindow
* m_dialogParent
;
120 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog
)
123 #endif // wxUSE_PRINTING_ARCHITECTURE