]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/printdlg.h
add IsOk() to all classes having Ok() method (patch 1570985)
[wxWidgets.git] / include / wx / msw / printdlg.h
CommitLineData
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
d427503c
VZ
15#if wxUSE_PRINTING_ARCHITECTURE
16
2bda0e17
KB
17#include "wx/dialog.h"
18#include "wx/cmndata.h"
8850cbd3 19#include "wx/prntbase.h"
c061373d 20#include "wx/printdlg.h"
2bda0e17 21
2bda0e17 22class WXDLLEXPORT wxDC;
103aec29 23
8850cbd3
RR
24//----------------------------------------------------------------------------
25// wxWindowsPrintNativeData
26//----------------------------------------------------------------------------
27
28class WXDLLEXPORT wxWindowsPrintNativeData: public wxPrintNativeDataBase
29{
30public:
31 wxWindowsPrintNativeData();
32 virtual ~wxWindowsPrintNativeData();
33
fd64de59
RR
34 virtual bool TransferTo( wxPrintData &data );
35 virtual bool TransferFrom( const wxPrintData &data );
8850cbd3 36
b7cacb43
VZ
37 virtual bool Ok() const { return IsOk(); }
38 virtual bool IsOk() const;
8850cbd3 39
fd64de59
RR
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; }
aa96f01c 44
8850cbd3 45private:
fd64de59
RR
46 void* m_devMode;
47 void* m_devNames;
8850cbd3 48
3168b4c3
JS
49 short m_customWindowsPaperId;
50
8850cbd3
RR
51private:
52 DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData)
53};
54
103aec29 55// ---------------------------------------------------------------------------
08680429 56// wxWindowsPrintDialog: the MSW dialog for printing
103aec29
VZ
57// ---------------------------------------------------------------------------
58
c061373d 59class WXDLLEXPORT wxWindowsPrintDialog : public wxPrintDialogBase
2bda0e17 60{
7bcb11d3 61public:
c061373d
RR
62 wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
63 wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data);
64 virtual ~wxWindowsPrintDialog();
2bda0e17 65
103aec29
VZ
66 bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
67 virtual int ShowModal();
2bda0e17 68
103aec29
VZ
69 wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
70 wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
71 virtual wxDC *GetPrintDC();
7bcb11d3 72
93c2f401 73private:
103aec29
VZ
74 wxPrintDialogData m_printDialogData;
75 wxDC* m_printerDC;
76 bool m_destroyDC;
77 wxWindow* m_dialogParent;
93c2f401
RR
78
79private:
80 bool ConvertToNative( wxPrintDialogData &data );
81 bool ConvertFromNative( wxPrintDialogData &data );
82
83 // holds MSW handle
84 void* m_printDlg;
22f3361e 85
c061373d
RR
86private:
87 DECLARE_NO_COPY_CLASS(wxWindowsPrintDialog)
88 DECLARE_CLASS(wxWindowsPrintDialog)
2bda0e17
KB
89};
90
08680429
RR
91// ---------------------------------------------------------------------------
92// wxWindowsPageSetupDialog: the MSW page setup dialog
93// ---------------------------------------------------------------------------
2bda0e17 94
08680429
RR
95class WXDLLEXPORT wxWindowsPageSetupDialog: public wxPageSetupDialogBase
96{
103aec29 97public:
08680429
RR
98 wxWindowsPageSetupDialog();
99 wxWindowsPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
100 virtual ~wxWindowsPageSetupDialog();
103aec29 101
08680429 102 bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
103aec29 103 virtual int ShowModal();
23fba686
JS
104 bool ConvertToNative( wxPageSetupDialogData &data );
105 bool ConvertFromNative( wxPageSetupDialogData &data );
2bda0e17 106
08680429 107 virtual wxPageSetupData& GetPageSetupDialogData() { return m_pageSetupData; }
2bda0e17 108
103aec29 109private:
08680429
RR
110 wxPageSetupDialogData m_pageSetupData;
111 wxWindow* m_dialogParent;
112
113 // holds MSW handle
114 void* m_pageDlg;
22f3361e 115
08680429
RR
116private:
117 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog)
2bda0e17
KB
118};
119
d427503c
VZ
120#endif // wxUSE_PRINTING_ARCHITECTURE
121
2bda0e17 122#endif
bbcdf8bc 123 // _WX_PRINTDLG_H_