]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/printdlg.h
[ 1492053 ] Add wxVListBox style callbacks to wxOwnerDrawnComboBox.
[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 wxUSE_PRINTING_ARCHITECTURE
16
17 #include "wx/dialog.h"
18 #include "wx/cmndata.h"
19 #include "wx/prntbase.h"
20 #include "wx/printdlg.h"
21
22 class WXDLLEXPORT wxDC;
23
24 //----------------------------------------------------------------------------
25 // wxWindowsPrintNativeData
26 //----------------------------------------------------------------------------
27
28 class WXDLLEXPORT wxWindowsPrintNativeData: public wxPrintNativeDataBase
29 {
30 public:
31 wxWindowsPrintNativeData();
32 virtual ~wxWindowsPrintNativeData();
33
34 virtual bool TransferTo( wxPrintData &data );
35 virtual bool TransferFrom( const wxPrintData &data );
36
37 virtual bool Ok() const;
38
39 void* GetDevMode() const { return m_devMode; }
40 void SetDevMode(void* data) { m_devMode = data; }
41 void* GetDevNames() const { return m_devNames; }
42 void SetDevNames(void* data) { m_devNames = data; }
43
44 private:
45 void* m_devMode;
46 void* m_devNames;
47
48 short m_customWindowsPaperId;
49
50 private:
51 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData)
52 };
53
54 // ---------------------------------------------------------------------------
55 // wxWindowsPrintDialog: the MSW dialog for printing
56 // ---------------------------------------------------------------------------
57
58 class WXDLLEXPORT wxWindowsPrintDialog : public wxPrintDialogBase
59 {
60 public:
61 wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
62 wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data);
63 virtual ~wxWindowsPrintDialog();
64
65 bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
66 virtual int ShowModal();
67
68 wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
69 wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
70 virtual wxDC *GetPrintDC();
71
72 private:
73 wxPrintDialogData m_printDialogData;
74 wxDC* m_printerDC;
75 bool m_destroyDC;
76 wxWindow* m_dialogParent;
77
78 private:
79 bool ConvertToNative( wxPrintDialogData &data );
80 bool ConvertFromNative( wxPrintDialogData &data );
81
82 // holds MSW handle
83 void* m_printDlg;
84
85 private:
86 DECLARE_NO_COPY_CLASS(wxWindowsPrintDialog)
87 DECLARE_CLASS(wxWindowsPrintDialog)
88 };
89
90 // ---------------------------------------------------------------------------
91 // wxWindowsPageSetupDialog: the MSW page setup dialog
92 // ---------------------------------------------------------------------------
93
94 class WXDLLEXPORT wxWindowsPageSetupDialog: public wxPageSetupDialogBase
95 {
96 public:
97 wxWindowsPageSetupDialog();
98 wxWindowsPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
99 virtual ~wxWindowsPageSetupDialog();
100
101 bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
102 virtual int ShowModal();
103 bool ConvertToNative( wxPageSetupDialogData &data );
104 bool ConvertFromNative( wxPageSetupDialogData &data );
105
106 virtual wxPageSetupData& GetPageSetupDialogData() { return m_pageSetupData; }
107
108 private:
109 wxPageSetupDialogData m_pageSetupData;
110 wxWindow* m_dialogParent;
111
112 // holds MSW handle
113 void* m_pageDlg;
114
115 private:
116 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog)
117 };
118
119 #endif // wxUSE_PRINTING_ARCHITECTURE
120
121 #endif
122 // _WX_PRINTDLG_H_