]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/mac/carbon/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 | // RCS-ID: $Id$ | |
10 | // Copyright: (c) Stefan Csomor | |
11 | // Licence: wxWindows licence | |
12 | ///////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #ifndef _WX_PRINTDLG_H_ | |
15 | #define _WX_PRINTDLG_H_ | |
16 | ||
17 | #include "wx/dialog.h" | |
18 | #include "wx/cmndata.h" | |
19 | #include "wx/printdlg.h" | |
20 | #include "wx/prntbase.h" | |
21 | ||
22 | /* | |
23 | * wxMacPrintDialog | |
24 | * The Mac dialog for printing | |
25 | */ | |
26 | ||
27 | class WXDLLEXPORT wxDC; | |
28 | class WXDLLEXPORT wxMacPrintDialog: public wxPrintDialogBase | |
29 | { | |
30 | public: | |
31 | wxMacPrintDialog(); | |
32 | wxMacPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); | |
33 | wxMacPrintDialog(wxWindow *parent, wxPrintData* data ); | |
34 | virtual ~wxMacPrintDialog(); | |
35 | ||
36 | bool Create(wxWindow *parent, wxPrintDialogData* data = NULL); | |
37 | virtual int ShowModal(); | |
38 | ||
39 | virtual wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; } | |
40 | virtual wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); } | |
41 | virtual wxDC *GetPrintDC(); | |
42 | ||
43 | private: | |
44 | wxPrintDialogData m_printDialogData; | |
45 | wxDC* m_printerDC; | |
46 | bool m_destroyDC; | |
47 | wxWindow* m_dialogParent; | |
48 | ||
49 | private: | |
50 | DECLARE_DYNAMIC_CLASS(wxPrintDialog) | |
51 | }; | |
52 | ||
53 | /* | |
54 | * wxMacPageSetupDialog | |
55 | * The Mac page setup dialog | |
56 | */ | |
57 | ||
58 | class WXDLLEXPORT wxMacPageSetupDialog: public wxPageSetupDialogBase | |
59 | { | |
60 | public: | |
61 | wxMacPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL); | |
62 | virtual ~wxMacPageSetupDialog(); | |
63 | ||
64 | virtual wxPageSetupData& GetPageSetupDialogData(); | |
65 | ||
66 | bool Create(wxWindow *parent, wxPageSetupData *data = NULL); | |
67 | virtual int ShowModal(); | |
68 | ||
69 | private: | |
70 | wxPageSetupData m_pageSetupData; | |
71 | wxWindow* m_dialogParent; | |
72 | ||
73 | private: | |
74 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageSetupDialog) | |
75 | }; | |
76 | ||
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 WXDLLEXPORT wxMacPageMarginsDialog : public wxDialog | |
85 | { | |
86 | public: | |
87 | wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupData* data); | |
88 | bool TransferToWindow(); | |
89 | bool TransferDataFromWindow(); | |
90 | ||
91 | virtual wxPageSetupData& GetPageSetupDialogData() { return *m_pageSetupDialogData; } | |
92 | ||
93 | private: | |
94 | wxPageSetupData* 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_ |