]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/printdlg.h
Remove wxTextCtrl::OnEnabled() hack from wxGTK.
[wxWidgets.git] / include / wx / msw / printdlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/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 WXDLLIMPEXP_FWD_CORE wxDC;
23 class WinPrinter;
24
25 //----------------------------------------------------------------------------
26 // wxWindowsPrintNativeData
27 //----------------------------------------------------------------------------
28
29 class WXDLLIMPEXP_CORE wxWindowsPrintNativeData: public wxPrintNativeDataBase
30 {
31 public:
32 wxWindowsPrintNativeData();
33 virtual ~wxWindowsPrintNativeData();
34
35 virtual bool TransferTo( wxPrintData &data );
36 virtual bool TransferFrom( const wxPrintData &data );
37
38 virtual bool Ok() const { return IsOk(); }
39 virtual bool IsOk() const;
40
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; }
46
47 private:
48 void* m_devMode;
49 void* m_devNames;
50
51 short m_customWindowsPaperId;
52
53 private:
54 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData)
55 };
56
57 // ---------------------------------------------------------------------------
58 // wxWindowsPrintDialog: the MSW dialog for printing
59 // ---------------------------------------------------------------------------
60
61 class WXDLLIMPEXP_CORE wxWindowsPrintDialog : public wxPrintDialogBase
62 {
63 public:
64 wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
65 wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data);
66 virtual ~wxWindowsPrintDialog();
67
68 bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
69 virtual int ShowModal();
70
71 wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
72 wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
73
74 virtual wxDC *GetPrintDC();
75
76 private:
77 wxPrintDialogData m_printDialogData;
78 wxPrinterDC* 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 wxDECLARE_NO_COPY_CLASS(wxWindowsPrintDialog);
91 DECLARE_CLASS(wxWindowsPrintDialog)
92 };
93
94 // ---------------------------------------------------------------------------
95 // wxWindowsPageSetupDialog: the MSW page setup dialog
96 // ---------------------------------------------------------------------------
97
98 class WXDLLIMPEXP_CORE 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 wxPageSetupDialogData& 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_