1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/printdlg.h
3 // Purpose: wxPrintDialog, wxPageSetupDialog classes
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_PRINTDLG_H_
12 #define _WX_PRINTDLG_H_
14 #if wxUSE_PRINTING_ARCHITECTURE
16 #include "wx/dialog.h"
17 #include "wx/cmndata.h"
18 #include "wx/prntbase.h"
19 #include "wx/printdlg.h"
21 class WXDLLIMPEXP_FWD_CORE wxDC
;
24 //----------------------------------------------------------------------------
25 // wxWindowsPrintNativeData
26 //----------------------------------------------------------------------------
28 class WXDLLIMPEXP_CORE 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 InitializeDevMode(const wxString
&printerName
= wxEmptyString
, WinPrinter
* printer
= NULL
);
41 void* GetDevMode() const { return m_devMode
; }
42 void SetDevMode(void* data
) { m_devMode
= data
; }
43 void* GetDevNames() const { return m_devNames
; }
44 void SetDevNames(void* data
) { m_devNames
= data
; }
50 short m_customWindowsPaperId
;
53 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData
)
56 // ---------------------------------------------------------------------------
57 // wxWindowsPrintDialog: the MSW dialog for printing
58 // ---------------------------------------------------------------------------
60 class WXDLLIMPEXP_CORE wxWindowsPrintDialog
: public wxPrintDialogBase
63 wxWindowsPrintDialog(wxWindow
*parent
, wxPrintDialogData
* data
= NULL
);
64 wxWindowsPrintDialog(wxWindow
*parent
, wxPrintData
* data
);
65 virtual ~wxWindowsPrintDialog();
67 bool Create(wxWindow
*parent
, wxPrintDialogData
* data
= NULL
);
68 virtual int ShowModal();
70 wxPrintDialogData
& GetPrintDialogData() { return m_printDialogData
; }
71 wxPrintData
& GetPrintData() { return m_printDialogData
.GetPrintData(); }
73 virtual wxDC
*GetPrintDC();
76 wxPrintDialogData m_printDialogData
;
77 wxPrinterDC
* m_printerDC
;
79 wxWindow
* m_dialogParent
;
82 bool ConvertToNative( wxPrintDialogData
&data
);
83 bool ConvertFromNative( wxPrintDialogData
&data
);
89 wxDECLARE_NO_COPY_CLASS(wxWindowsPrintDialog
);
90 DECLARE_CLASS(wxWindowsPrintDialog
)
93 // ---------------------------------------------------------------------------
94 // wxWindowsPageSetupDialog: the MSW page setup dialog
95 // ---------------------------------------------------------------------------
97 class WXDLLIMPEXP_CORE wxWindowsPageSetupDialog
: public wxPageSetupDialogBase
100 wxWindowsPageSetupDialog();
101 wxWindowsPageSetupDialog(wxWindow
*parent
, wxPageSetupDialogData
*data
= NULL
);
102 virtual ~wxWindowsPageSetupDialog();
104 bool Create(wxWindow
*parent
, wxPageSetupDialogData
*data
= NULL
);
105 virtual int ShowModal();
106 bool ConvertToNative( wxPageSetupDialogData
&data
);
107 bool ConvertFromNative( wxPageSetupDialogData
&data
);
109 virtual wxPageSetupDialogData
& GetPageSetupDialogData() { return m_pageSetupData
; }
112 wxPageSetupDialogData m_pageSetupData
;
113 wxWindow
* m_dialogParent
;
119 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog
)
122 #endif // wxUSE_PRINTING_ARCHITECTURE