1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/printdlg.h
3 // Purpose: wxPrintDialog, wxPageSetupDialog classes.
4 // Use generic, PostScript version if no
5 // platform-specific implementation.
6 // Author: Stefan Csomor
9 // Copyright: (c) Stefan Csomor
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_PRINTDLG_H_
14 #define _WX_PRINTDLG_H_
16 #include "wx/dialog.h"
17 #include "wx/cmndata.h"
18 #include "wx/printdlg.h"
19 #include "wx/prntbase.h"
23 * The Mac dialog for printing
26 class WXDLLIMPEXP_FWD_CORE wxDC
;
27 class WXDLLIMPEXP_CORE wxMacPrintDialog
: public wxPrintDialogBase
31 wxMacPrintDialog(wxWindow
*parent
, wxPrintDialogData
* data
= NULL
);
32 wxMacPrintDialog(wxWindow
*parent
, wxPrintData
* data
);
33 virtual ~wxMacPrintDialog();
35 bool Create(wxWindow
*parent
, wxPrintDialogData
* data
= NULL
);
36 virtual int ShowModal();
38 virtual wxPrintDialogData
& GetPrintDialogData() { return m_printDialogData
; }
39 virtual wxPrintData
& GetPrintData() { return m_printDialogData
.GetPrintData(); }
40 virtual wxDC
*GetPrintDC();
43 wxPrintDialogData m_printDialogData
;
46 wxWindow
* m_dialogParent
;
49 DECLARE_DYNAMIC_CLASS(wxPrintDialog
)
53 * wxMacPageSetupDialog
54 * The Mac page setup dialog
57 class WXDLLIMPEXP_CORE wxMacPageSetupDialog
: public wxPageSetupDialogBase
60 wxMacPageSetupDialog(wxWindow
*parent
, wxPageSetupDialogData
*data
= NULL
);
61 virtual ~wxMacPageSetupDialog();
63 virtual wxPageSetupDialogData
& GetPageSetupDialogData();
65 bool Create(wxWindow
*parent
, wxPageSetupDialogData
*data
= NULL
);
66 virtual int ShowModal();
69 wxPageSetupDialogData m_pageSetupData
;
70 wxWindow
* m_dialogParent
;
73 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageSetupDialog
)
76 class WXDLLIMPEXP_FWD_CORE wxTextCtrl
;
79 * wxMacPageMarginsDialog
80 * A Mac dialog for setting the page margins separately from page setup since
81 * (native) wxMacPageSetupDialog doesn't let you set margins.
84 class WXDLLIMPEXP_CORE wxMacPageMarginsDialog
: public wxDialog
87 wxMacPageMarginsDialog(wxFrame
* parent
, wxPageSetupDialogData
* data
);
88 bool TransferToWindow();
89 bool TransferDataFromWindow();
91 virtual wxPageSetupDialogData
& GetPageSetupDialogData() { return *m_pageSetupDialogData
; }
94 wxPageSetupDialogData
* m_pageSetupDialogData
;
96 wxPoint m_MinMarginTopLeft
;
97 wxPoint m_MinMarginBottomRight
;
98 wxTextCtrl
*m_LeftMargin
;
99 wxTextCtrl
*m_TopMargin
;
100 wxTextCtrl
*m_RightMargin
;
101 wxTextCtrl
*m_BottomMargin
;
103 void GetMinMargins();
104 bool CheckValue(wxTextCtrl
* textCtrl
, int *value
, int minValue
, const wxString
& name
);
107 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog
)
111 #endif // _WX_PRINTDLG_H_