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