]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/printdlg.h
The rounded corners look really dumb at this size.
[wxWidgets.git] / include / wx / osx / printdlg.h
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
7 // Modified by:
8 // Created: 1998-01-01
9 // Copyright: (c) Stefan Csomor
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_PRINTDLG_H_
14 #define _WX_PRINTDLG_H_
15
16 #include "wx/dialog.h"
17 #include "wx/cmndata.h"
18 #include "wx/printdlg.h"
19 #include "wx/prntbase.h"
20
21 /*
22 * wxMacPrintDialog
23 * The Mac dialog for printing
24 */
25
26 class WXDLLIMPEXP_FWD_CORE wxDC;
27 class WXDLLIMPEXP_CORE wxMacPrintDialog: public wxPrintDialogBase
28 {
29 public:
30 wxMacPrintDialog();
31 wxMacPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
32 wxMacPrintDialog(wxWindow *parent, wxPrintData* data );
33 virtual ~wxMacPrintDialog();
34
35 bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
36 virtual int ShowModal();
37
38 virtual wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
39 virtual wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
40 virtual wxDC *GetPrintDC();
41
42 private:
43 wxPrintDialogData m_printDialogData;
44 wxDC* m_printerDC;
45 bool m_destroyDC;
46 wxWindow* m_dialogParent;
47
48 private:
49 DECLARE_DYNAMIC_CLASS(wxPrintDialog)
50 };
51
52 /*
53 * wxMacPageSetupDialog
54 * The Mac page setup dialog
55 */
56
57 class WXDLLIMPEXP_CORE wxMacPageSetupDialog: public wxPageSetupDialogBase
58 {
59 public:
60 wxMacPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
61 virtual ~wxMacPageSetupDialog();
62
63 virtual wxPageSetupDialogData& GetPageSetupDialogData();
64
65 bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
66 virtual int ShowModal();
67
68 private:
69 wxPageSetupDialogData m_pageSetupData;
70 wxWindow* m_dialogParent;
71
72 private:
73 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageSetupDialog)
74 };
75
76 class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
77
78 /*
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.
82 */
83
84 class WXDLLIMPEXP_CORE wxMacPageMarginsDialog : public wxDialog
85 {
86 public:
87 wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupDialogData* data);
88 bool TransferToWindow();
89 bool TransferDataFromWindow();
90
91 virtual wxPageSetupDialogData& GetPageSetupDialogData() { return *m_pageSetupDialogData; }
92
93 private:
94 wxPageSetupDialogData* m_pageSetupDialogData;
95
96 wxPoint m_MinMarginTopLeft;
97 wxPoint m_MinMarginBottomRight;
98 wxTextCtrl *m_LeftMargin;
99 wxTextCtrl *m_TopMargin;
100 wxTextCtrl *m_RightMargin;
101 wxTextCtrl *m_BottomMargin;
102
103 void GetMinMargins();
104 bool CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name);
105
106 private:
107 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog)
108 };
109
110
111 #endif // _WX_PRINTDLG_H_