]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/classic/printdlg.h
compilation fix: wxGenericCollapsiblePane needs wxButton and wxStaticLine
[wxWidgets.git] / include / wx / mac / classic / printdlg.h
CommitLineData
52479aef
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: 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
65571936 11// Licence: wxWindows licence
52479aef
SC
12/////////////////////////////////////////////////////////////////////////////
13
14#ifndef _WX_PRINTDLG_H_
15#define _WX_PRINTDLG_H_
16
52479aef
SC
17#include "wx/dialog.h"
18#include "wx/cmndata.h"
19
20/*
21 * wxPrinterDialog
22 * The common dialog for printing.
23 */
24
25class WXDLLEXPORT wxDC;
26class WXDLLEXPORT wxPrintDialog: public wxDialog
27{
28 DECLARE_DYNAMIC_CLASS(wxPrintDialog)
29
30 public:
31 wxPrintDialog();
32 wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
33 wxPrintDialog(wxWindow *parent, wxPrintData* data );
d3c7fc99 34 virtual ~wxPrintDialog();
52479aef
SC
35
36 bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
37 virtual int ShowModal();
38
39 wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
40 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
50class WXDLLEXPORT wxPageSetupDialog: public wxDialog
51{
52 DECLARE_DYNAMIC_CLASS(wxPageSetupDialog)
53
54 public:
55 wxPageSetupDialog();
56 wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
d3c7fc99 57 virtual ~wxPageSetupDialog();
52479aef
SC
58
59 bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
60 virtual int ShowModal();
61
f415cab9 62 virtual wxPageSetupData& GetPageSetupDialogData() { return m_pageSetupData; }
52479aef
SC
63 private:
64 wxPageSetupData m_pageSetupData;
65 wxWindow* m_dialogParent;
66};
67
f415cab9
JS
68
69/*
70* wxMacPageMarginsDialog
71* A Mac dialog for setting the page margins separately from page setup since
72* (native) wxMacPageSetupDialog doesn't let you set margins.
73*/
74
75class WXDLLEXPORT wxMacPageMarginsDialog : public wxDialog
76{
77public:
78 wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupData* data);
79 bool TransferToWindow();
80 bool TransferDataFromWindow();
81 virtual wxPageSetupData& GetPageSetupDialogData() { return *m_pageSetupDialogData; }
82
83private:
84 wxPageSetupData* m_pageSetupDialogData;
85
86 wxPoint m_MinMarginTopLeft;
87 wxPoint m_MinMarginBottomRight;
88 wxTextCtrl *m_LeftMargin;
89 wxTextCtrl *m_TopMargin;
90 wxTextCtrl *m_RightMargin;
91 wxTextCtrl *m_BottomMargin;
92
93 void GetMinMargins();
94 bool CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name);
95
96private:
97 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog)
98};
99
100
101#endif // _WX_PRINTDLG_H_