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