]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
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$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
65571936 | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_PRINTDLG_H_ |
13 | #define _WX_PRINTDLG_H_ | |
2bda0e17 | 14 | |
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
2bda0e17 KB |
16 | #pragma interface "printdlg.h" |
17 | #endif | |
18 | ||
d427503c VZ |
19 | #if wxUSE_PRINTING_ARCHITECTURE |
20 | ||
2bda0e17 KB |
21 | #include "wx/dialog.h" |
22 | #include "wx/cmndata.h" | |
8850cbd3 | 23 | #include "wx/prntbase.h" |
c061373d | 24 | #include "wx/printdlg.h" |
2bda0e17 | 25 | |
2bda0e17 | 26 | class WXDLLEXPORT wxDC; |
103aec29 | 27 | |
8850cbd3 RR |
28 | //---------------------------------------------------------------------------- |
29 | // wxWindowsPrintNativeData | |
30 | //---------------------------------------------------------------------------- | |
31 | ||
32 | class WXDLLEXPORT wxWindowsPrintNativeData: public wxPrintNativeDataBase | |
33 | { | |
34 | public: | |
35 | wxWindowsPrintNativeData(); | |
36 | virtual ~wxWindowsPrintNativeData(); | |
37 | ||
fd64de59 RR |
38 | virtual bool TransferTo( wxPrintData &data ); |
39 | virtual bool TransferFrom( const wxPrintData &data ); | |
8850cbd3 RR |
40 | |
41 | virtual bool Ok() const; | |
42 | ||
fd64de59 RR |
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; } | |
8850cbd3 RR |
47 | |
48 | private: | |
fd64de59 RR |
49 | void* m_devMode; |
50 | void* m_devNames; | |
8850cbd3 RR |
51 | |
52 | private: | |
53 | DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData) | |
54 | }; | |
55 | ||
103aec29 VZ |
56 | // --------------------------------------------------------------------------- |
57 | // wxPrinterDialog: the common dialog for printing. | |
58 | // --------------------------------------------------------------------------- | |
59 | ||
c061373d | 60 | class WXDLLEXPORT wxWindowsPrintDialog : public wxPrintDialogBase |
2bda0e17 | 61 | { |
7bcb11d3 | 62 | public: |
c061373d RR |
63 | wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); |
64 | wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data); | |
65 | virtual ~wxWindowsPrintDialog(); | |
2bda0e17 | 66 | |
103aec29 VZ |
67 | bool Create(wxWindow *parent, wxPrintDialogData* data = NULL); |
68 | virtual int ShowModal(); | |
2bda0e17 | 69 | |
103aec29 VZ |
70 | wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; } |
71 | wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); } | |
72 | virtual wxDC *GetPrintDC(); | |
7bcb11d3 | 73 | |
93c2f401 | 74 | private: |
103aec29 VZ |
75 | wxPrintDialogData m_printDialogData; |
76 | wxDC* m_printerDC; | |
77 | bool m_destroyDC; | |
78 | wxWindow* m_dialogParent; | |
93c2f401 RR |
79 | |
80 | private: | |
81 | bool ConvertToNative( wxPrintDialogData &data ); | |
82 | bool ConvertFromNative( wxPrintDialogData &data ); | |
83 | ||
84 | // holds MSW handle | |
85 | void* m_printDlg; | |
22f3361e | 86 | |
c061373d RR |
87 | private: |
88 | DECLARE_NO_COPY_CLASS(wxWindowsPrintDialog) | |
89 | DECLARE_CLASS(wxWindowsPrintDialog) | |
2bda0e17 KB |
90 | }; |
91 | ||
92 | class WXDLLEXPORT wxPageSetupDialog: public wxDialog | |
93 | { | |
103aec29 | 94 | DECLARE_DYNAMIC_CLASS(wxPageSetupDialog) |
2bda0e17 | 95 | |
103aec29 VZ |
96 | public: |
97 | wxPageSetupDialog(); | |
98 | wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL); | |
99 | virtual ~wxPageSetupDialog(); | |
100 | ||
101 | bool Create(wxWindow *parent, wxPageSetupData *data = NULL); | |
102 | virtual int ShowModal(); | |
23fba686 JS |
103 | bool ConvertToNative( wxPageSetupDialogData &data ); |
104 | bool ConvertFromNative( wxPageSetupDialogData &data ); | |
2bda0e17 | 105 | |
103aec29 | 106 | wxPageSetupData& GetPageSetupData() { return m_pageSetupData; } |
2bda0e17 | 107 | |
103aec29 VZ |
108 | private: |
109 | wxPageSetupData m_pageSetupData; | |
110 | wxWindow* m_dialogParent; | |
23fba686 | 111 | void* m_pageDlg; |
22f3361e VZ |
112 | |
113 | DECLARE_NO_COPY_CLASS(wxPageSetupDialog) | |
2bda0e17 KB |
114 | }; |
115 | ||
d427503c VZ |
116 | #endif // wxUSE_PRINTING_ARCHITECTURE |
117 | ||
2bda0e17 | 118 | #endif |
bbcdf8bc | 119 | // _WX_PRINTDLG_H_ |