]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/printdlg.h
Deallocate wxThreadSpecificInfo when wxThread ends.
[wxWidgets.git] / include / wx / osx / printdlg.h
CommitLineData
49b3c4df 1/////////////////////////////////////////////////////////////////////////////
233f5738 2// Name: wx/osx/printdlg.h
49b3c4df
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
49b3c4df
SC
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"
03647350 20
49b3c4df
SC
21/*
22 * wxMacPrintDialog
23 * The Mac dialog for printing
24 */
25
26class WXDLLIMPEXP_FWD_CORE wxDC;
27class WXDLLIMPEXP_CORE wxMacPrintDialog: public wxPrintDialogBase
28{
29public:
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
42private:
43 wxPrintDialogData m_printDialogData;
44 wxDC* m_printerDC;
45 bool m_destroyDC;
46 wxWindow* m_dialogParent;
03647350 47
49b3c4df
SC
48private:
49 DECLARE_DYNAMIC_CLASS(wxPrintDialog)
50};
51
52/*
53 * wxMacPageSetupDialog
54 * The Mac page setup dialog
55 */
56
57class WXDLLIMPEXP_CORE wxMacPageSetupDialog: public wxPageSetupDialogBase
58{
59public:
7193abfb 60 wxMacPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
49b3c4df
SC
61 virtual ~wxMacPageSetupDialog();
62
7193abfb 63 virtual wxPageSetupDialogData& GetPageSetupDialogData();
03647350 64
7193abfb 65 bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
49b3c4df 66 virtual int ShowModal();
03647350 67
49b3c4df 68private:
7193abfb 69 wxPageSetupDialogData m_pageSetupData;
49b3c4df 70 wxWindow* m_dialogParent;
03647350 71
49b3c4df
SC
72private:
73 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageSetupDialog)
74};
75
76class 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
84class WXDLLIMPEXP_CORE wxMacPageMarginsDialog : public wxDialog
85{
86public:
7193abfb 87 wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupDialogData* data);
49b3c4df
SC
88 bool TransferToWindow();
89 bool TransferDataFromWindow();
90
7193abfb 91 virtual wxPageSetupDialogData& GetPageSetupDialogData() { return *m_pageSetupDialogData; }
49b3c4df
SC
92
93private:
7193abfb 94 wxPageSetupDialogData* m_pageSetupDialogData;
03647350 95
49b3c4df
SC
96 wxPoint m_MinMarginTopLeft;
97 wxPoint m_MinMarginBottomRight;
98 wxTextCtrl *m_LeftMargin;
99 wxTextCtrl *m_TopMargin;
100 wxTextCtrl *m_RightMargin;
101 wxTextCtrl *m_BottomMargin;
03647350 102
49b3c4df
SC
103 void GetMinMargins();
104 bool CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name);
03647350 105
49b3c4df
SC
106private:
107 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog)
108};
109
110
111#endif // _WX_PRINTDLG_H_