]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/printdlg.h
added wxGetWinVersion()
[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 short m_customWindowsPaperId;
53
54 private:
55 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData)
56 };
57
58 // ---------------------------------------------------------------------------
59 // wxWindowsPrintDialog: the MSW dialog for printing
60 // ---------------------------------------------------------------------------
61
62 class WXDLLEXPORT wxWindowsPrintDialog : public wxPrintDialogBase
63 {
64 public:
65 wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
66 wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data);
67 virtual ~wxWindowsPrintDialog();
68
69 bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
70 virtual int ShowModal();
71
72 wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
73 wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
74 virtual wxDC *GetPrintDC();
75
76 private:
77 wxPrintDialogData m_printDialogData;
78 wxDC* m_printerDC;
79 bool m_destroyDC;
80 wxWindow* m_dialogParent;
81
82 private:
83 bool ConvertToNative( wxPrintDialogData &data );
84 bool ConvertFromNative( wxPrintDialogData &data );
85
86 // holds MSW handle
87 void* m_printDlg;
88
89 private:
90 DECLARE_NO_COPY_CLASS(wxWindowsPrintDialog)
91 DECLARE_CLASS(wxWindowsPrintDialog)
92 };
93
94 // ---------------------------------------------------------------------------
95 // wxWindowsPageSetupDialog: the MSW page setup dialog
96 // ---------------------------------------------------------------------------
97
98 class WXDLLEXPORT wxWindowsPageSetupDialog: public wxPageSetupDialogBase
99 {
100 public:
101 wxWindowsPageSetupDialog();
102 wxWindowsPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
103 virtual ~wxWindowsPageSetupDialog();
104
105 bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
106 virtual int ShowModal();
107 bool ConvertToNative( wxPageSetupDialogData &data );
108 bool ConvertFromNative( wxPageSetupDialogData &data );
109
110 virtual wxPageSetupData& GetPageSetupDialogData() { return m_pageSetupData; }
111
112 private:
113 wxPageSetupDialogData m_pageSetupData;
114 wxWindow* m_dialogParent;
115
116 // holds MSW handle
117 void* m_pageDlg;
118
119 private:
120 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog)
121 };
122
123 #endif // wxUSE_PRINTING_ARCHITECTURE
124
125 #endif
126 // _WX_PRINTDLG_H_