]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/printdlg.h
cleanup
[wxWidgets.git] / include / wx / mac / carbon / printdlg.h
CommitLineData
8cf73271 1/////////////////////////////////////////////////////////////////////////////
f415cab9 2// Name: wx/mac/carbon/printdlg.h
8cf73271
SC
3// Purpose: wxPrintDialog, wxPageSetupDialog classes.
4// Use generic, PostScript version if no
5// platform-specific implementation.
6// Author: Stefan Csomor
7// Modified by:
8// Created: 1998-01-01
9// RCS-ID: $Id$
10// Copyright: (c) Stefan Csomor
65571936 11// Licence: wxWindows licence
8cf73271
SC
12/////////////////////////////////////////////////////////////////////////////
13
14#ifndef _WX_PRINTDLG_H_
15#define _WX_PRINTDLG_H_
16
8cf73271
SC
17#include "wx/dialog.h"
18#include "wx/cmndata.h"
c061373d 19#include "wx/printdlg.h"
8850cbd3 20#include "wx/prntbase.h"
8850cbd3 21
8cf73271 22/*
08680429
RR
23 * wxMacPrintDialog
24 * The Mac dialog for printing
8cf73271
SC
25 */
26
b5dbe15d 27class WXDLLIMPEXP_FWD_CORE wxDC;
c061373d 28class WXDLLEXPORT wxMacPrintDialog: public wxPrintDialogBase
8cf73271 29{
c061373d
RR
30public:
31 wxMacPrintDialog();
32 wxMacPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
33 wxMacPrintDialog(wxWindow *parent, wxPrintData* data );
d3c7fc99 34 virtual ~wxMacPrintDialog();
8cf73271
SC
35
36 bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
c061373d 37 virtual int ShowModal();
8cf73271 38
c061373d
RR
39 virtual wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
40 virtual wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
41 virtual wxDC *GetPrintDC();
8cf73271 42
c061373d
RR
43private:
44 wxPrintDialogData m_printDialogData;
45 wxDC* m_printerDC;
46 bool m_destroyDC;
47 wxWindow* m_dialogParent;
48
49private:
50 DECLARE_DYNAMIC_CLASS(wxPrintDialog)
8cf73271
SC
51};
52
08680429
RR
53/*
54 * wxMacPageSetupDialog
55 * The Mac page setup dialog
56 */
8cf73271 57
08680429
RR
58class WXDLLEXPORT wxMacPageSetupDialog: public wxPageSetupDialogBase
59{
60public:
f415cab9 61 wxMacPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
d3c7fc99 62 virtual ~wxMacPageSetupDialog();
8cf73271 63
08680429
RR
64 virtual wxPageSetupData& GetPageSetupDialogData();
65
f415cab9 66 bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
08680429
RR
67 virtual int ShowModal();
68
69private:
f415cab9 70 wxPageSetupData m_pageSetupData;
08680429
RR
71 wxWindow* m_dialogParent;
72
73private:
74 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageSetupDialog)
8cf73271
SC
75};
76
b5dbe15d 77class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
f415cab9
JS
78
79/*
80* wxMacPageMarginsDialog
81* A Mac dialog for setting the page margins separately from page setup since
82* (native) wxMacPageSetupDialog doesn't let you set margins.
83*/
84
85class WXDLLEXPORT wxMacPageMarginsDialog : public wxDialog
86{
87public:
88 wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupData* data);
89 bool TransferToWindow();
90 bool TransferDataFromWindow();
91
92 virtual wxPageSetupData& GetPageSetupDialogData() { return *m_pageSetupDialogData; }
93
94private:
95 wxPageSetupData* m_pageSetupDialogData;
96
97 wxPoint m_MinMarginTopLeft;
98 wxPoint m_MinMarginBottomRight;
99 wxTextCtrl *m_LeftMargin;
100 wxTextCtrl *m_TopMargin;
101 wxTextCtrl *m_RightMargin;
102 wxTextCtrl *m_BottomMargin;
103
104 void GetMinMargins();
105 bool CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name);
106
107private:
108 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog)
109};
110
111
112#endif // _WX_PRINTDLG_H_