2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-10-27 09:07:40 -04:00
|
|
|
// Name: wx/mac/carbon/printdlg.h
|
2004-03-23 12:35:05 -05:00
|
|
|
// Purpose: wxPrintDialog, wxPageSetupDialog classes.
|
|
|
|
// Use generic, PostScript version if no
|
|
|
|
// platform-specific implementation.
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 1998-01-01
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Stefan Csomor
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_PRINTDLG_H_
|
|
|
|
#define _WX_PRINTDLG_H_
|
|
|
|
|
|
|
|
#include "wx/dialog.h"
|
|
|
|
#include "wx/cmndata.h"
|
2004-10-16 18:11:48 -04:00
|
|
|
#include "wx/printdlg.h"
|
2004-10-17 13:25:40 -04:00
|
|
|
#include "wx/prntbase.h"
|
|
|
|
|
2004-03-23 12:35:05 -05:00
|
|
|
/*
|
2004-11-20 09:46:25 -05:00
|
|
|
* wxMacPrintDialog
|
|
|
|
* The Mac dialog for printing
|
2004-03-23 12:35:05 -05:00
|
|
|
*/
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxDC;
|
2004-10-16 18:11:48 -04:00
|
|
|
class WXDLLEXPORT wxMacPrintDialog: public wxPrintDialogBase
|
2004-03-23 12:35:05 -05:00
|
|
|
{
|
2004-10-16 18:11:48 -04:00
|
|
|
public:
|
|
|
|
wxMacPrintDialog();
|
|
|
|
wxMacPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
|
|
|
|
wxMacPrintDialog(wxWindow *parent, wxPrintData* data );
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxMacPrintDialog();
|
2004-03-23 12:35:05 -05:00
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
|
2004-10-16 18:11:48 -04:00
|
|
|
virtual int ShowModal();
|
2004-03-23 12:35:05 -05:00
|
|
|
|
2004-10-16 18:11:48 -04:00
|
|
|
virtual wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
|
|
|
|
virtual wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
|
|
|
|
virtual wxDC *GetPrintDC();
|
2004-03-23 12:35:05 -05:00
|
|
|
|
2004-10-16 18:11:48 -04:00
|
|
|
private:
|
|
|
|
wxPrintDialogData m_printDialogData;
|
|
|
|
wxDC* m_printerDC;
|
|
|
|
bool m_destroyDC;
|
|
|
|
wxWindow* m_dialogParent;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPrintDialog)
|
2004-03-23 12:35:05 -05:00
|
|
|
};
|
|
|
|
|
2004-11-20 09:46:25 -05:00
|
|
|
/*
|
|
|
|
* wxMacPageSetupDialog
|
|
|
|
* The Mac page setup dialog
|
|
|
|
*/
|
2004-03-23 12:35:05 -05:00
|
|
|
|
2004-11-20 09:46:25 -05:00
|
|
|
class WXDLLEXPORT wxMacPageSetupDialog: public wxPageSetupDialogBase
|
|
|
|
{
|
|
|
|
public:
|
2006-10-27 09:07:40 -04:00
|
|
|
wxMacPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxMacPageSetupDialog();
|
2004-03-23 12:35:05 -05:00
|
|
|
|
2004-11-20 09:46:25 -05:00
|
|
|
virtual wxPageSetupData& GetPageSetupDialogData();
|
|
|
|
|
2006-10-27 09:07:40 -04:00
|
|
|
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
|
2004-11-20 09:46:25 -05:00
|
|
|
virtual int ShowModal();
|
|
|
|
|
|
|
|
private:
|
2006-10-27 09:07:40 -04:00
|
|
|
wxPageSetupData m_pageSetupData;
|
2004-11-20 09:46:25 -05:00
|
|
|
wxWindow* m_dialogParent;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageSetupDialog)
|
2004-03-23 12:35:05 -05:00
|
|
|
};
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
|
2006-10-27 09:07:40 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* wxMacPageMarginsDialog
|
|
|
|
* A Mac dialog for setting the page margins separately from page setup since
|
|
|
|
* (native) wxMacPageSetupDialog doesn't let you set margins.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxMacPageMarginsDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupData* data);
|
|
|
|
bool TransferToWindow();
|
|
|
|
bool TransferDataFromWindow();
|
|
|
|
|
|
|
|
virtual wxPageSetupData& GetPageSetupDialogData() { return *m_pageSetupDialogData; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxPageSetupData* m_pageSetupDialogData;
|
|
|
|
|
|
|
|
wxPoint m_MinMarginTopLeft;
|
|
|
|
wxPoint m_MinMarginBottomRight;
|
|
|
|
wxTextCtrl *m_LeftMargin;
|
|
|
|
wxTextCtrl *m_TopMargin;
|
|
|
|
wxTextCtrl *m_RightMargin;
|
|
|
|
wxTextCtrl *m_BottomMargin;
|
|
|
|
|
|
|
|
void GetMinMargins();
|
|
|
|
bool CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name);
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog)
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _WX_PRINTDLG_H_
|