1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: prntdlgg.h
|
|
|
|
// Purpose: wxGenericPrintDialog, wxGenericPrintSetupDialog,
|
|
|
|
// wxGenericPageSetupDialog
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c)
|
1999-03-29 15:49:05 -05:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __PRINTDLGH_G_
|
|
|
|
#define __PRINTDLGH_G_
|
|
|
|
|
2002-08-31 07:29:13 -04:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
1999-03-29 15:49:05 -05:00
|
|
|
#pragma interface "prntdlgg.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
1999-06-15 16:21:59 -04:00
|
|
|
|
|
|
|
#if wxUSE_PRINTING_ARCHITECTURE
|
|
|
|
|
1999-01-22 06:06:20 -05:00
|
|
|
#include "wx/dialog.h"
|
2002-08-05 14:00:55 -04:00
|
|
|
#include "wx/cmndata.h"
|
1999-01-22 06:06:20 -05:00
|
|
|
|
|
|
|
#if wxUSE_POSTSCRIPT
|
1999-03-29 15:49:05 -05:00
|
|
|
#include "wx/dcps.h"
|
1999-01-22 06:06:20 -05:00
|
|
|
#endif
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
class WXDLLEXPORT wxTextCtrl;
|
|
|
|
class WXDLLEXPORT wxButton;
|
|
|
|
class WXDLLEXPORT wxCheckBox;
|
1999-08-03 11:20:23 -04:00
|
|
|
class WXDLLEXPORT wxComboBox;
|
1998-05-20 10:01:55 -04:00
|
|
|
class WXDLLEXPORT wxStaticText;
|
|
|
|
class WXDLLEXPORT wxRadioBox;
|
1998-11-28 17:36:11 -05:00
|
|
|
class WXDLLEXPORT wxPrintSetupData;
|
2002-08-10 16:02:14 -04:00
|
|
|
class WXDLLEXPORT wxPageSetupData;
|
1999-03-29 15:49:05 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// constants
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1999-03-29 15:49:05 -05:00
|
|
|
// FIXME why all these enums start with 10 or 30?
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1999-03-29 15:49:05 -05:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
wxPRINTID_STATIC = 10,
|
|
|
|
wxPRINTID_RANGE,
|
|
|
|
wxPRINTID_FROM,
|
|
|
|
wxPRINTID_TO,
|
|
|
|
wxPRINTID_COPIES,
|
|
|
|
wxPRINTID_PRINTTOFILE,
|
|
|
|
wxPRINTID_SETUP
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
wxPRINTID_LEFTMARGIN = 30,
|
|
|
|
wxPRINTID_RIGHTMARGIN,
|
|
|
|
wxPRINTID_TOPMARGIN,
|
|
|
|
wxPRINTID_BOTTOMMARGIN
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
wxPRINTID_PRINTCOLOUR = 10,
|
|
|
|
wxPRINTID_ORIENTATION,
|
|
|
|
wxPRINTID_COMMAND,
|
|
|
|
wxPRINTID_OPTIONS,
|
|
|
|
wxPRINTID_PAPERSIZE
|
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Simulated Print and Print Setup dialogs for non-Windows platforms (and
|
|
|
|
// Windows using PostScript print/preview)
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1999-06-09 14:16:38 -04:00
|
|
|
#if wxUSE_POSTSCRIPT
|
1999-03-29 15:49:05 -05:00
|
|
|
class WXDLLEXPORT wxGenericPrintDialog : public wxDialog
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1999-03-25 18:06:01 -05:00
|
|
|
public:
|
1999-03-29 15:49:05 -05:00
|
|
|
wxGenericPrintDialog(wxWindow *parent,
|
|
|
|
wxPrintDialogData* data = (wxPrintDialogData*)NULL);
|
|
|
|
wxGenericPrintDialog(wxWindow *parent, wxPrintData* data);
|
|
|
|
|
|
|
|
virtual ~wxGenericPrintDialog();
|
1999-03-25 18:06:01 -05:00
|
|
|
|
|
|
|
void OnSetup(wxCommandEvent& event);
|
|
|
|
void OnRange(wxCommandEvent& event);
|
|
|
|
void OnOK(wxCommandEvent& event);
|
1999-03-29 15:49:05 -05:00
|
|
|
|
1999-03-25 18:06:01 -05:00
|
|
|
virtual bool TransferDataFromWindow();
|
|
|
|
virtual bool TransferDataToWindow();
|
|
|
|
|
|
|
|
virtual int ShowModal();
|
|
|
|
|
1999-03-29 15:49:05 -05:00
|
|
|
#if wxUSE_POSTSCRIPT
|
|
|
|
wxPrintData& GetPrintData()
|
|
|
|
{ return m_printDialogData.GetPrintData(); }
|
|
|
|
#endif // wxUSE_POSTSCRIPT
|
|
|
|
|
|
|
|
wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
|
1999-03-25 18:06:01 -05:00
|
|
|
wxDC *GetPrintDC();
|
|
|
|
|
|
|
|
public:
|
1999-04-04 07:24:51 -04:00
|
|
|
// wxStaticText* m_printerMessage;
|
1999-03-25 18:06:01 -05:00
|
|
|
wxButton* m_setupButton;
|
1999-04-04 07:24:51 -04:00
|
|
|
// wxButton* m_helpButton;
|
1999-03-25 18:06:01 -05:00
|
|
|
wxRadioBox* m_rangeRadioBox;
|
|
|
|
wxTextCtrl* m_fromText;
|
|
|
|
wxTextCtrl* m_toText;
|
|
|
|
wxTextCtrl* m_noCopiesText;
|
|
|
|
wxCheckBox* m_printToFileCheckBox;
|
1999-04-04 07:24:51 -04:00
|
|
|
// wxCheckBox* m_collateCopiesCheckBox;
|
1999-03-29 15:49:05 -05:00
|
|
|
|
1999-03-25 18:06:01 -05:00
|
|
|
wxPrintDialogData m_printDialogData;
|
1999-03-29 15:49:05 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void Init(wxWindow *parent);
|
|
|
|
|
|
|
|
private:
|
1999-03-25 18:06:01 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
2002-09-13 18:00:45 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
1999-03-29 15:49:05 -05:00
|
|
|
class WXDLLEXPORT wxGenericPrintSetupDialog : public wxDialog
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1999-03-25 18:06:01 -05:00
|
|
|
public:
|
|
|
|
// There are no configuration options for the dialog, so we
|
|
|
|
// just pass the wxPrintData object (no wxPrintSetupDialogData class needed)
|
|
|
|
wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data);
|
|
|
|
wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSetupData* data);
|
1999-03-29 15:49:05 -05:00
|
|
|
virtual ~wxGenericPrintSetupDialog();
|
1999-03-25 18:06:01 -05:00
|
|
|
|
|
|
|
void Init(wxPrintData* data);
|
|
|
|
|
|
|
|
virtual bool TransferDataFromWindow();
|
|
|
|
virtual bool TransferDataToWindow();
|
|
|
|
|
1999-08-03 11:20:23 -04:00
|
|
|
wxComboBox *CreatePaperTypeChoice(int* x, int* y);
|
1999-03-29 15:49:05 -05:00
|
|
|
|
1999-03-25 18:06:01 -05:00
|
|
|
public:
|
|
|
|
wxRadioBox* m_orientationRadioBox;
|
|
|
|
wxTextCtrl* m_printerCommandText;
|
|
|
|
wxTextCtrl* m_printerOptionsText;
|
|
|
|
wxCheckBox* m_colourCheckBox;
|
1999-08-03 11:20:23 -04:00
|
|
|
wxComboBox* m_paperTypeChoice;
|
1999-03-29 15:49:05 -05:00
|
|
|
|
1998-11-28 17:36:11 -05:00
|
|
|
#if wxUSE_POSTSCRIPT
|
1999-03-25 18:06:01 -05:00
|
|
|
wxPrintData m_printData;
|
1999-03-29 15:49:05 -05:00
|
|
|
wxPrintData& GetPrintData() { return m_printData; }
|
|
|
|
#endif // wxUSE_POSTSCRIPT
|
2002-09-13 18:00:45 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_CLASS(wxGenericPrintSetupDialog)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
1999-06-09 14:16:38 -04:00
|
|
|
#endif
|
|
|
|
// wxUSE_POSTSCRIPT
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1999-03-29 15:49:05 -05:00
|
|
|
class WXDLLEXPORT wxGenericPageSetupDialog : public wxDialog
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1999-03-25 18:06:01 -05:00
|
|
|
public:
|
2003-07-22 17:50:05 -04:00
|
|
|
wxGenericPageSetupDialog(wxWindow *parent = NULL,
|
|
|
|
wxPageSetupData* data = NULL);
|
1999-03-29 15:49:05 -05:00
|
|
|
virtual ~wxGenericPageSetupDialog();
|
1999-03-25 18:06:01 -05:00
|
|
|
|
|
|
|
virtual bool TransferDataFromWindow();
|
|
|
|
virtual bool TransferDataToWindow();
|
|
|
|
|
|
|
|
void OnPrinter(wxCommandEvent& event);
|
1999-03-29 15:49:05 -05:00
|
|
|
|
1999-08-03 11:20:23 -04:00
|
|
|
wxComboBox *CreatePaperTypeChoice(int* x, int* y);
|
1999-03-29 15:49:05 -05:00
|
|
|
wxPageSetupData& GetPageSetupData() { return m_pageData; }
|
1999-03-25 18:06:01 -05:00
|
|
|
|
|
|
|
public:
|
|
|
|
wxButton* m_printerButton;
|
|
|
|
wxRadioBox* m_orientationRadioBox;
|
|
|
|
wxTextCtrl* m_marginLeftText;
|
|
|
|
wxTextCtrl* m_marginTopText;
|
|
|
|
wxTextCtrl* m_marginRightText;
|
|
|
|
wxTextCtrl* m_marginBottomText;
|
1999-08-03 11:20:23 -04:00
|
|
|
wxComboBox* m_paperTypeChoice;
|
1999-03-29 15:49:05 -05:00
|
|
|
|
1999-03-25 18:06:01 -05:00
|
|
|
static bool m_pageSetupDialogCancelled;
|
1999-03-29 15:49:05 -05:00
|
|
|
|
1999-03-25 18:06:01 -05:00
|
|
|
wxPageSetupData m_pageData;
|
1999-03-29 15:49:05 -05:00
|
|
|
|
|
|
|
private:
|
1999-03-25 18:06:01 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
2003-07-22 17:50:05 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericPageSetupDialog)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
1999-06-15 16:21:59 -04:00
|
|
|
#endif
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
1999-03-25 18:06:01 -05:00
|
|
|
// __PRINTDLGH_G__
|