1998-05-20 14:01:55 +00: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 20:49:05 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __PRINTDLGH_G_
|
|
|
|
#define __PRINTDLGH_G_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
1999-03-29 20:49:05 +00:00
|
|
|
#pragma interface "prntdlgg.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
1999-06-15 20:21:59 +00:00
|
|
|
|
|
|
|
#if wxUSE_PRINTING_ARCHITECTURE
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#include "wx/dialog.h"
|
1999-01-22 11:06:20 +00:00
|
|
|
#include "wx/dialog.h"
|
|
|
|
|
|
|
|
#if wxUSE_POSTSCRIPT
|
1999-03-29 20:49:05 +00:00
|
|
|
#include "wx/dcps.h"
|
1999-01-22 11:06:20 +00:00
|
|
|
#endif
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
class WXDLLEXPORT wxTextCtrl;
|
|
|
|
class WXDLLEXPORT wxButton;
|
|
|
|
class WXDLLEXPORT wxCheckBox;
|
1999-08-03 15:20:23 +00:00
|
|
|
class WXDLLEXPORT wxComboBox;
|
1998-05-20 14:01:55 +00:00
|
|
|
class WXDLLEXPORT wxStaticText;
|
|
|
|
class WXDLLEXPORT wxRadioBox;
|
1998-11-28 22:36:11 +00:00
|
|
|
class WXDLLEXPORT wxPrintSetupData;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-03-29 20:49:05 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// constants
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-03-29 20:49:05 +00:00
|
|
|
// FIXME why all these enums start with 10 or 30?
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-03-29 20:49:05 +00: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 18:16:38 +00:00
|
|
|
#if wxUSE_POSTSCRIPT
|
1999-03-29 20:49:05 +00:00
|
|
|
class WXDLLEXPORT wxGenericPrintDialog : public wxDialog
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-03-25 23:06:01 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog)
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1999-03-25 23:06:01 +00:00
|
|
|
public:
|
1999-03-29 20:49:05 +00:00
|
|
|
wxGenericPrintDialog(wxWindow *parent,
|
|
|
|
wxPrintDialogData* data = (wxPrintDialogData*)NULL);
|
|
|
|
wxGenericPrintDialog(wxWindow *parent, wxPrintData* data);
|
|
|
|
|
|
|
|
virtual ~wxGenericPrintDialog();
|
1999-03-25 23:06:01 +00:00
|
|
|
|
|
|
|
void OnSetup(wxCommandEvent& event);
|
|
|
|
void OnRange(wxCommandEvent& event);
|
|
|
|
void OnOK(wxCommandEvent& event);
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1999-03-25 23:06:01 +00:00
|
|
|
virtual bool TransferDataFromWindow();
|
|
|
|
virtual bool TransferDataToWindow();
|
|
|
|
|
|
|
|
virtual int ShowModal();
|
|
|
|
|
1999-03-29 20:49:05 +00:00
|
|
|
#if wxUSE_POSTSCRIPT
|
|
|
|
wxPrintData& GetPrintData()
|
|
|
|
{ return m_printDialogData.GetPrintData(); }
|
|
|
|
#endif // wxUSE_POSTSCRIPT
|
|
|
|
|
|
|
|
wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
|
1999-03-25 23:06:01 +00:00
|
|
|
wxDC *GetPrintDC();
|
|
|
|
|
|
|
|
public:
|
1999-04-04 11:24:51 +00:00
|
|
|
// wxStaticText* m_printerMessage;
|
1999-03-25 23:06:01 +00:00
|
|
|
wxButton* m_setupButton;
|
1999-04-04 11:24:51 +00:00
|
|
|
// wxButton* m_helpButton;
|
1999-03-25 23:06:01 +00:00
|
|
|
wxRadioBox* m_rangeRadioBox;
|
|
|
|
wxTextCtrl* m_fromText;
|
|
|
|
wxTextCtrl* m_toText;
|
|
|
|
wxTextCtrl* m_noCopiesText;
|
|
|
|
wxCheckBox* m_printToFileCheckBox;
|
1999-04-04 11:24:51 +00:00
|
|
|
// wxCheckBox* m_collateCopiesCheckBox;
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1999-03-25 23:06:01 +00:00
|
|
|
wxPrintDialogData m_printDialogData;
|
1999-03-29 20:49:05 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void Init(wxWindow *parent);
|
|
|
|
|
|
|
|
private:
|
1999-03-25 23:06:01 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
1999-03-29 20:49:05 +00:00
|
|
|
class WXDLLEXPORT wxGenericPrintSetupDialog : public wxDialog
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-03-25 23:06:01 +00:00
|
|
|
DECLARE_CLASS(wxGenericPrintSetupDialog)
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1999-03-25 23:06:01 +00: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 20:49:05 +00:00
|
|
|
virtual ~wxGenericPrintSetupDialog();
|
1999-03-25 23:06:01 +00:00
|
|
|
|
|
|
|
void Init(wxPrintData* data);
|
|
|
|
|
|
|
|
virtual bool TransferDataFromWindow();
|
|
|
|
virtual bool TransferDataToWindow();
|
|
|
|
|
1999-08-03 15:20:23 +00:00
|
|
|
wxComboBox *CreatePaperTypeChoice(int* x, int* y);
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1999-03-25 23:06:01 +00:00
|
|
|
public:
|
|
|
|
wxRadioBox* m_orientationRadioBox;
|
|
|
|
wxTextCtrl* m_printerCommandText;
|
|
|
|
wxTextCtrl* m_printerOptionsText;
|
|
|
|
wxCheckBox* m_colourCheckBox;
|
1999-08-03 15:20:23 +00:00
|
|
|
wxComboBox* m_paperTypeChoice;
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1998-11-28 22:36:11 +00:00
|
|
|
#if wxUSE_POSTSCRIPT
|
1999-03-25 23:06:01 +00:00
|
|
|
wxPrintData m_printData;
|
1999-03-29 20:49:05 +00:00
|
|
|
wxPrintData& GetPrintData() { return m_printData; }
|
|
|
|
#endif // wxUSE_POSTSCRIPT
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
1999-06-09 18:16:38 +00:00
|
|
|
#endif
|
|
|
|
// wxUSE_POSTSCRIPT
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-03-29 20:49:05 +00:00
|
|
|
class WXDLLEXPORT wxGenericPageSetupDialog : public wxDialog
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-03-25 23:06:01 +00:00
|
|
|
DECLARE_CLASS(wxGenericPageSetupDialog)
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1999-03-25 23:06:01 +00:00
|
|
|
public:
|
|
|
|
wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL);
|
1999-03-29 20:49:05 +00:00
|
|
|
virtual ~wxGenericPageSetupDialog();
|
1999-03-25 23:06:01 +00:00
|
|
|
|
|
|
|
virtual bool TransferDataFromWindow();
|
|
|
|
virtual bool TransferDataToWindow();
|
|
|
|
|
|
|
|
void OnPrinter(wxCommandEvent& event);
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1999-08-03 15:20:23 +00:00
|
|
|
wxComboBox *CreatePaperTypeChoice(int* x, int* y);
|
1999-03-29 20:49:05 +00:00
|
|
|
wxPageSetupData& GetPageSetupData() { return m_pageData; }
|
1999-03-25 23:06:01 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
wxButton* m_printerButton;
|
|
|
|
wxRadioBox* m_orientationRadioBox;
|
|
|
|
wxTextCtrl* m_marginLeftText;
|
|
|
|
wxTextCtrl* m_marginTopText;
|
|
|
|
wxTextCtrl* m_marginRightText;
|
|
|
|
wxTextCtrl* m_marginBottomText;
|
1999-08-03 15:20:23 +00:00
|
|
|
wxComboBox* m_paperTypeChoice;
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1999-03-25 23:06:01 +00:00
|
|
|
static bool m_pageSetupDialogCancelled;
|
1999-03-29 20:49:05 +00:00
|
|
|
|
1999-03-25 23:06:01 +00:00
|
|
|
wxPageSetupData m_pageData;
|
1999-03-29 20:49:05 +00:00
|
|
|
|
|
|
|
private:
|
1999-03-25 23:06:01 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
1999-06-15 20:21:59 +00:00
|
|
|
#endif
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
1999-03-25 23:06:01 +00:00
|
|
|
// __PRINTDLGH_G__
|