]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/printdlg.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / msw / printdlg.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/msw/printdlg.h
2bda0e17
KB
3// Purpose: wxPrintDialog, wxPageSetupDialog classes
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
bbcdf8bc 7// Copyright: (c) Julian Smart
65571936 8// Licence: wxWindows licence
2bda0e17
KB
9/////////////////////////////////////////////////////////////////////////////
10
bbcdf8bc
JS
11#ifndef _WX_PRINTDLG_H_
12#define _WX_PRINTDLG_H_
2bda0e17 13
d427503c
VZ
14#if wxUSE_PRINTING_ARCHITECTURE
15
2bda0e17
KB
16#include "wx/dialog.h"
17#include "wx/cmndata.h"
8850cbd3 18#include "wx/prntbase.h"
c061373d 19#include "wx/printdlg.h"
2bda0e17 20
b5dbe15d 21class WXDLLIMPEXP_FWD_CORE wxDC;
6c797d8f 22class WinPrinter;
103aec29 23
8850cbd3
RR
24//----------------------------------------------------------------------------
25// wxWindowsPrintNativeData
26//----------------------------------------------------------------------------
27
53a2db12 28class WXDLLIMPEXP_CORE wxWindowsPrintNativeData: public wxPrintNativeDataBase
8850cbd3
RR
29{
30public:
31 wxWindowsPrintNativeData();
32 virtual ~wxWindowsPrintNativeData();
03647350 33
fd64de59
RR
34 virtual bool TransferTo( wxPrintData &data );
35 virtual bool TransferFrom( const wxPrintData &data );
03647350 36
b7cacb43
VZ
37 virtual bool Ok() const { return IsOk(); }
38 virtual bool IsOk() const;
03647350 39
6c797d8f 40 void InitializeDevMode(const wxString &printerName = wxEmptyString, WinPrinter* printer = NULL);
fd64de59
RR
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; }
03647350 45
8850cbd3 46private:
fd64de59
RR
47 void* m_devMode;
48 void* m_devNames;
8850cbd3 49
3168b4c3
JS
50 short m_customWindowsPaperId;
51
8850cbd3
RR
52private:
53 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData)
54};
03647350 55
103aec29 56// ---------------------------------------------------------------------------
08680429 57// wxWindowsPrintDialog: the MSW dialog for printing
103aec29
VZ
58// ---------------------------------------------------------------------------
59
53a2db12 60class WXDLLIMPEXP_CORE wxWindowsPrintDialog : public wxPrintDialogBase
2bda0e17 61{
7bcb11d3 62public:
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(); }
f415cab9 72
103aec29 73 virtual wxDC *GetPrintDC();
7bcb11d3 74
93c2f401 75private:
103aec29 76 wxPrintDialogData m_printDialogData;
f415cab9 77 wxPrinterDC* m_printerDC;
103aec29
VZ
78 bool m_destroyDC;
79 wxWindow* m_dialogParent;
03647350 80
93c2f401
RR
81private:
82 bool ConvertToNative( wxPrintDialogData &data );
83 bool ConvertFromNative( wxPrintDialogData &data );
03647350 84
93c2f401
RR
85 // holds MSW handle
86 void* m_printDlg;
22f3361e 87
c061373d 88private:
c0c133e1 89 wxDECLARE_NO_COPY_CLASS(wxWindowsPrintDialog);
c061373d 90 DECLARE_CLASS(wxWindowsPrintDialog)
2bda0e17
KB
91};
92
08680429 93// ---------------------------------------------------------------------------
03647350 94// wxWindowsPageSetupDialog: the MSW page setup dialog
08680429 95// ---------------------------------------------------------------------------
2bda0e17 96
53a2db12 97class WXDLLIMPEXP_CORE wxWindowsPageSetupDialog: public wxPageSetupDialogBase
08680429 98{
103aec29 99public:
08680429
RR
100 wxWindowsPageSetupDialog();
101 wxWindowsPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
102 virtual ~wxWindowsPageSetupDialog();
103aec29 103
08680429 104 bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
103aec29 105 virtual int ShowModal();
23fba686
JS
106 bool ConvertToNative( wxPageSetupDialogData &data );
107 bool ConvertFromNative( wxPageSetupDialogData &data );
2bda0e17 108
7193abfb 109 virtual wxPageSetupDialogData& GetPageSetupDialogData() { return m_pageSetupData; }
2bda0e17 110
103aec29 111private:
08680429
RR
112 wxPageSetupDialogData m_pageSetupData;
113 wxWindow* m_dialogParent;
03647350 114
08680429
RR
115 // holds MSW handle
116 void* m_pageDlg;
22f3361e 117
08680429
RR
118private:
119 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog)
2bda0e17
KB
120};
121
d427503c
VZ
122#endif // wxUSE_PRINTING_ARCHITECTURE
123
2bda0e17 124#endif
bbcdf8bc 125 // _WX_PRINTDLG_H_