]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/printdlg.h
fixing CW 8 builds for all targets
[wxWidgets.git] / include / wx / msw / printdlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: printdlg.h
3 // Purpose: wxPrintDialog, wxPageSetupDialog classes
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_PRINTDLG_H_
13 #define _WX_PRINTDLG_H_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "printdlg.h"
17 #endif
18
19 #if wxUSE_PRINTING_ARCHITECTURE
20
21 #include "wx/dialog.h"
22 #include "wx/cmndata.h"
23 #include "wx/prntbase.h"
24 #include "wx/printdlg.h"
25
26 class WXDLLEXPORT wxDC;
27
28 //----------------------------------------------------------------------------
29 // wxWindowsPrintNativeData
30 //----------------------------------------------------------------------------
31
32 class WXDLLEXPORT wxWindowsPrintNativeData: public wxPrintNativeDataBase
33 {
34 public:
35 wxWindowsPrintNativeData();
36 virtual ~wxWindowsPrintNativeData();
37
38 virtual bool TransferTo( wxPrintData &data );
39 virtual bool TransferFrom( const wxPrintData &data );
40
41 virtual bool Ok() const;
42
43 void* GetDevMode() const { return m_devMode; }
44 void SetDevMode(void* data) { m_devMode = data; }
45 void* GetDevNames() const { return m_devNames; }
46 void SetDevNames(void* data) { m_devNames = data; }
47
48 private:
49 void* m_devMode;
50 void* m_devNames;
51
52 private:
53 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData)
54 };
55
56 // ---------------------------------------------------------------------------
57 // wxWindowsPrintDialog: the MSW dialog for printing
58 // ---------------------------------------------------------------------------
59
60 class WXDLLEXPORT wxWindowsPrintDialog : public wxPrintDialogBase
61 {
62 public:
63 wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
64 wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data);
65 virtual ~wxWindowsPrintDialog();
66
67 bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
68 virtual int ShowModal();
69
70 wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
71 wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
72 virtual wxDC *GetPrintDC();
73
74 private:
75 wxPrintDialogData m_printDialogData;
76 wxDC* m_printerDC;
77 bool m_destroyDC;
78 wxWindow* m_dialogParent;
79
80 private:
81 bool ConvertToNative( wxPrintDialogData &data );
82 bool ConvertFromNative( wxPrintDialogData &data );
83
84 // holds MSW handle
85 void* m_printDlg;
86
87 private:
88 DECLARE_NO_COPY_CLASS(wxWindowsPrintDialog)
89 DECLARE_CLASS(wxWindowsPrintDialog)
90 };
91
92 // ---------------------------------------------------------------------------
93 // wxWindowsPageSetupDialog: the MSW page setup dialog
94 // ---------------------------------------------------------------------------
95
96 class WXDLLEXPORT wxWindowsPageSetupDialog: public wxPageSetupDialogBase
97 {
98 public:
99 wxWindowsPageSetupDialog();
100 wxWindowsPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
101 virtual ~wxWindowsPageSetupDialog();
102
103 bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
104 virtual int ShowModal();
105 bool ConvertToNative( wxPageSetupDialogData &data );
106 bool ConvertFromNative( wxPageSetupDialogData &data );
107
108 virtual wxPageSetupData& GetPageSetupDialogData() { return m_pageSetupData; }
109
110 private:
111 wxPageSetupDialogData m_pageSetupData;
112 wxWindow* m_dialogParent;
113
114 // holds MSW handle
115 void* m_pageDlg;
116
117 private:
118 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog)
119 };
120
121 #endif // wxUSE_PRINTING_ARCHITECTURE
122
123 #endif
124 // _WX_PRINTDLG_H_