]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/printdlg.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[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 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_PRINTDLG_H_
12 #define _WX_PRINTDLG_H_
13
14 #if wxUSE_PRINTING_ARCHITECTURE
15
16 #include "wx/dialog.h"
17 #include "wx/cmndata.h"
18 #include "wx/prntbase.h"
19 #include "wx/printdlg.h"
20
21 class WXDLLIMPEXP_FWD_CORE wxDC;
22 class WinPrinter;
23
24 //----------------------------------------------------------------------------
25 // wxWindowsPrintNativeData
26 //----------------------------------------------------------------------------
27
28 class WXDLLIMPEXP_CORE 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 InitializeDevMode(const wxString &printerName = wxEmptyString, WinPrinter* printer = NULL);
41 void* GetDevMode() const { return m_devMode; }
42 void SetDevMode(void* data) { m_devMode = data; }
43 void* GetDevNames() const { return m_devNames; }
44 void SetDevNames(void* data) { m_devNames = data; }
45
46 private:
47 void* m_devMode;
48 void* m_devNames;
49
50 short m_customWindowsPaperId;
51
52 private:
53 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData)
54 };
55
56 // ---------------------------------------------------------------------------
57 // wxWindowsPrintDialog: the MSW dialog for printing
58 // ---------------------------------------------------------------------------
59
60 class WXDLLIMPEXP_CORE wxWindowsPrintDialog : public wxPrintDialogBase
61 {
62 public:
63 wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
64 wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data);
65 virtual ~wxWindowsPrintDialog();
66
67 bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
68 virtual int ShowModal();
69
70 wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
71 wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
72
73 virtual wxDC *GetPrintDC();
74
75 private:
76 wxPrintDialogData m_printDialogData;
77 wxPrinterDC* m_printerDC;
78 bool m_destroyDC;
79 wxWindow* m_dialogParent;
80
81 private:
82 bool ConvertToNative( wxPrintDialogData &data );
83 bool ConvertFromNative( wxPrintDialogData &data );
84
85 // holds MSW handle
86 void* m_printDlg;
87
88 private:
89 wxDECLARE_NO_COPY_CLASS(wxWindowsPrintDialog);
90 DECLARE_CLASS(wxWindowsPrintDialog)
91 };
92
93 // ---------------------------------------------------------------------------
94 // wxWindowsPageSetupDialog: the MSW page setup dialog
95 // ---------------------------------------------------------------------------
96
97 class WXDLLIMPEXP_CORE wxWindowsPageSetupDialog: public wxPageSetupDialogBase
98 {
99 public:
100 wxWindowsPageSetupDialog();
101 wxWindowsPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
102 virtual ~wxWindowsPageSetupDialog();
103
104 bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
105 virtual int ShowModal();
106 bool ConvertToNative( wxPageSetupDialogData &data );
107 bool ConvertFromNative( wxPageSetupDialogData &data );
108
109 virtual wxPageSetupDialogData& GetPageSetupDialogData() { return m_pageSetupData; }
110
111 private:
112 wxPageSetupDialogData m_pageSetupData;
113 wxWindow* m_dialogParent;
114
115 // holds MSW handle
116 void* m_pageDlg;
117
118 private:
119 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog)
120 };
121
122 #endif // wxUSE_PRINTING_ARCHITECTURE
123
124 #endif
125 // _WX_PRINTDLG_H_