1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: printdlg.h
|
|
|
|
// Purpose: wxPrintDialog, wxPageSetupDialog classes
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 23:52:45 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 23:52:45 +00:00
|
|
|
#ifndef _WX_PRINTDLG_H_
|
|
|
|
#define _WX_PRINTDLG_H_
|
1998-05-20 14:12:05 +00:00
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1998-05-20 14:12:05 +00:00
|
|
|
#pragma interface "printdlg.h"
|
|
|
|
#endif
|
|
|
|
|
1999-06-13 22:54:04 +00:00
|
|
|
#if wxUSE_PRINTING_ARCHITECTURE
|
|
|
|
|
1998-05-20 14:12:05 +00:00
|
|
|
#include "wx/dialog.h"
|
|
|
|
#include "wx/cmndata.h"
|
2004-10-17 17:25:40 +00:00
|
|
|
#include "wx/prntbase.h"
|
2004-10-16 22:11:48 +00:00
|
|
|
#include "wx/printdlg.h"
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
class WXDLLEXPORT wxDC;
|
1999-04-02 22:30:56 +00:00
|
|
|
|
2004-10-17 17:25:40 +00:00
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// wxWindowsPrintNativeData
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxWindowsPrintNativeData: public wxPrintNativeDataBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxWindowsPrintNativeData();
|
|
|
|
virtual ~wxWindowsPrintNativeData();
|
|
|
|
|
2004-10-17 23:00:41 +00:00
|
|
|
virtual bool TransferTo( wxPrintData &data );
|
|
|
|
virtual bool TransferFrom( const wxPrintData &data );
|
2004-10-17 17:25:40 +00:00
|
|
|
|
|
|
|
virtual bool Ok() const;
|
|
|
|
|
2004-10-17 23:00:41 +00:00
|
|
|
void* GetDevMode() const { return m_devMode; }
|
|
|
|
void SetDevMode(void* data) { m_devMode = data; }
|
|
|
|
void* GetDevNames() const { return m_devNames; }
|
|
|
|
void SetDevNames(void* data) { m_devNames = data; }
|
2004-10-17 17:25:40 +00:00
|
|
|
|
|
|
|
private:
|
2004-10-17 23:00:41 +00:00
|
|
|
void* m_devMode;
|
|
|
|
void* m_devNames;
|
2004-10-17 17:25:40 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData)
|
|
|
|
};
|
|
|
|
|
1999-04-02 22:30:56 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// wxPrinterDialog: the common dialog for printing.
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2004-10-16 22:11:48 +00:00
|
|
|
class WXDLLEXPORT wxWindowsPrintDialog : public wxPrintDialogBase
|
1998-05-20 14:12:05 +00:00
|
|
|
{
|
1999-03-25 23:06:01 +00:00
|
|
|
public:
|
2004-10-16 22:11:48 +00:00
|
|
|
wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
|
|
|
|
wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data);
|
|
|
|
virtual ~wxWindowsPrintDialog();
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-04-02 22:30:56 +00:00
|
|
|
bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
|
|
|
|
virtual int ShowModal();
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-04-02 22:30:56 +00:00
|
|
|
wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
|
|
|
|
wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
|
|
|
|
virtual wxDC *GetPrintDC();
|
1999-03-25 23:06:01 +00:00
|
|
|
|
2004-10-31 16:34:02 +00:00
|
|
|
private:
|
1999-04-02 22:30:56 +00:00
|
|
|
wxPrintDialogData m_printDialogData;
|
|
|
|
wxDC* m_printerDC;
|
|
|
|
bool m_destroyDC;
|
|
|
|
wxWindow* m_dialogParent;
|
2004-10-31 16:34:02 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool ConvertToNative( wxPrintDialogData &data );
|
|
|
|
bool ConvertFromNative( wxPrintDialogData &data );
|
|
|
|
|
|
|
|
// holds MSW handle
|
|
|
|
void* m_printDlg;
|
2003-01-02 23:38:11 +00:00
|
|
|
|
2004-10-16 22:11:48 +00:00
|
|
|
private:
|
|
|
|
DECLARE_NO_COPY_CLASS(wxWindowsPrintDialog)
|
|
|
|
DECLARE_CLASS(wxWindowsPrintDialog)
|
1998-05-20 14:12:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxPageSetupDialog: public wxDialog
|
|
|
|
{
|
1999-04-02 22:30:56 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPageSetupDialog)
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-04-02 22:30:56 +00:00
|
|
|
public:
|
|
|
|
wxPageSetupDialog();
|
|
|
|
wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
|
|
|
|
virtual ~wxPageSetupDialog();
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
|
|
|
|
virtual int ShowModal();
|
2004-11-01 15:55:14 +00:00
|
|
|
bool ConvertToNative( wxPageSetupDialogData &data );
|
|
|
|
bool ConvertFromNative( wxPageSetupDialogData &data );
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-04-02 22:30:56 +00:00
|
|
|
wxPageSetupData& GetPageSetupData() { return m_pageSetupData; }
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-04-02 22:30:56 +00:00
|
|
|
private:
|
|
|
|
wxPageSetupData m_pageSetupData;
|
|
|
|
wxWindow* m_dialogParent;
|
2004-11-01 15:55:14 +00:00
|
|
|
void* m_pageDlg;
|
2003-01-02 23:38:11 +00:00
|
|
|
|
|
|
|
DECLARE_NO_COPY_CLASS(wxPageSetupDialog)
|
1998-05-20 14:12:05 +00:00
|
|
|
};
|
|
|
|
|
1999-06-13 22:54:04 +00:00
|
|
|
#endif // wxUSE_PRINTING_ARCHITECTURE
|
|
|
|
|
1998-05-20 14:12:05 +00:00
|
|
|
#endif
|
1998-08-07 23:52:45 +00:00
|
|
|
// _WX_PRINTDLG_H_
|