2007-09-05 17:34:08 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/gtk/print.h
|
|
|
|
// Author: Anthony Bretaudeau
|
|
|
|
// Purpose: GTK printing support
|
|
|
|
// Created: 2007-08-25
|
2007-09-06 13:24:59 -04:00
|
|
|
// Copyright: (c) Anthony Bretaudeau
|
2007-09-05 17:34:08 -04:00
|
|
|
// Licence: wxWindows Licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_GTK_PRINT_H_
|
|
|
|
#define _WX_GTK_PRINT_H_
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
|
|
|
|
#if wxUSE_GTKPRINT
|
|
|
|
|
|
|
|
#include "wx/print.h"
|
|
|
|
#include "wx/printdlg.h"
|
|
|
|
#include "wx/prntbase.h"
|
|
|
|
#include "wx/dc.h"
|
|
|
|
|
|
|
|
typedef struct _GtkPrintOperation GtkPrintOperation;
|
|
|
|
typedef struct _GtkPrintContext GtkPrintContext;
|
|
|
|
typedef struct _GtkPrintSettings GtkPrintSettings;
|
|
|
|
typedef struct _GtkPageSetup GtkPageSetup;
|
|
|
|
|
|
|
|
typedef struct _cairo cairo_t;
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// wxGtkPrintFactory
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxGtkPrintFactory: public wxPrintFactory
|
|
|
|
{
|
|
|
|
public:
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data ) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
|
|
|
wxPrintout *printout = NULL,
|
2014-03-29 20:02:23 -04:00
|
|
|
wxPrintDialogData *data = NULL ) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
|
|
|
wxPrintout *printout,
|
2014-03-29 20:02:23 -04:00
|
|
|
wxPrintData *data ) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
2014-03-29 20:02:23 -04:00
|
|
|
wxPrintDialogData *data = NULL ) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
2014-03-29 20:02:23 -04:00
|
|
|
wxPrintData *data ) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
|
2014-03-29 20:02:23 -04:00
|
|
|
wxPageSetupDialogData * data = NULL ) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual bool HasPrintSetupDialog() wxOVERRIDE;
|
|
|
|
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ) wxOVERRIDE;
|
|
|
|
virtual bool HasOwnPrintToFile() wxOVERRIDE;
|
|
|
|
virtual bool HasPrinterLine() wxOVERRIDE;
|
|
|
|
virtual wxString CreatePrinterLine() wxOVERRIDE;
|
|
|
|
virtual bool HasStatusLine() wxOVERRIDE;
|
|
|
|
virtual wxString CreateStatusLine() wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual wxPrintNativeDataBase *CreatePrintNativeData() wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// wxGtkPrintDialog
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxGtkPrintDialog: public wxPrintDialogBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxGtkPrintDialog( wxWindow *parent,
|
|
|
|
wxPrintDialogData* data = NULL );
|
|
|
|
wxGtkPrintDialog( wxWindow *parent, wxPrintData* data);
|
|
|
|
virtual ~wxGtkPrintDialog();
|
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
wxPrintData& GetPrintData() wxOVERRIDE
|
2007-09-05 17:34:08 -04:00
|
|
|
{ return m_printDialogData.GetPrintData(); }
|
2014-03-29 20:02:23 -04:00
|
|
|
wxPrintDialogData& GetPrintDialogData() wxOVERRIDE
|
2007-09-05 17:34:08 -04:00
|
|
|
{ return m_printDialogData; }
|
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
wxDC *GetPrintDC() wxOVERRIDE { return m_dc; }
|
2007-09-05 17:34:08 -04:00
|
|
|
void SetPrintDC(wxDC * printDC) { m_dc = printDC; }
|
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual int ShowModal() wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual bool Validate() wxOVERRIDE { return true; }
|
|
|
|
virtual bool TransferDataToWindow() wxOVERRIDE { return true; }
|
|
|
|
virtual bool TransferDataFromWindow() wxOVERRIDE { return true; }
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
void SetShowDialog(bool show) { m_showDialog = show; }
|
|
|
|
bool GetShowDialog() { return m_showDialog; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Implement some base class methods to do nothing to avoid asserts and
|
|
|
|
// GTK warnings, since this is not a real wxDialog.
|
|
|
|
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
|
|
|
int WXUNUSED(width), int WXUNUSED(height),
|
2014-03-29 20:02:23 -04:00
|
|
|
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) wxOVERRIDE {}
|
2007-09-05 17:34:08 -04:00
|
|
|
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
2014-03-29 20:02:23 -04:00
|
|
|
int WXUNUSED(width), int WXUNUSED(height)) wxOVERRIDE {}
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxPrintDialogData m_printDialogData;
|
|
|
|
wxWindow *m_parent;
|
|
|
|
bool m_showDialog;
|
|
|
|
wxDC *m_dc;
|
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGtkPrintDialog)
|
|
|
|
};
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// wxGtkPageSetupDialog
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxGtkPageSetupDialog: public wxPageSetupDialogBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxGtkPageSetupDialog( wxWindow *parent,
|
|
|
|
wxPageSetupDialogData* data = NULL );
|
|
|
|
virtual ~wxGtkPageSetupDialog();
|
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual wxPageSetupDialogData& GetPageSetupDialogData() wxOVERRIDE { return m_pageDialogData; }
|
2007-09-05 17:34:08 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual int ShowModal() wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual bool Validate() wxOVERRIDE { return true; }
|
|
|
|
virtual bool TransferDataToWindow() wxOVERRIDE { return true; }
|
|
|
|
virtual bool TransferDataFromWindow() wxOVERRIDE { return true; }
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// Implement some base class methods to do nothing to avoid asserts and
|
|
|
|
// GTK warnings, since this is not a real wxDialog.
|
|
|
|
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
|
|
|
int WXUNUSED(width), int WXUNUSED(height),
|
2014-03-29 20:02:23 -04:00
|
|
|
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) wxOVERRIDE {}
|
2007-09-05 17:34:08 -04:00
|
|
|
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
2014-03-29 20:02:23 -04:00
|
|
|
int WXUNUSED(width), int WXUNUSED(height)) wxOVERRIDE {}
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxPageSetupDialogData m_pageDialogData;
|
|
|
|
wxWindow *m_parent;
|
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGtkPageSetupDialog)
|
|
|
|
};
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// wxGtkPrinter
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxGtkPrinter : public wxPrinterBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxGtkPrinter(wxPrintDialogData *data = NULL);
|
|
|
|
virtual ~wxGtkPrinter();
|
|
|
|
|
|
|
|
virtual bool Print(wxWindow *parent,
|
|
|
|
wxPrintout *printout,
|
2014-03-29 20:02:23 -04:00
|
|
|
bool prompt = true) wxOVERRIDE;
|
|
|
|
virtual wxDC* PrintDialog(wxWindow *parent) wxOVERRIDE;
|
|
|
|
virtual bool Setup(wxWindow *parent) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
GtkPrintContext *GetPrintContext() { return m_gpc; }
|
|
|
|
void SetPrintContext(GtkPrintContext *context) {m_gpc = context;}
|
|
|
|
void BeginPrint(wxPrintout *printout, GtkPrintOperation *operation, GtkPrintContext *context);
|
|
|
|
void DrawPage(wxPrintout *printout, GtkPrintOperation *operation, GtkPrintContext *context, int page_nr);
|
|
|
|
|
|
|
|
private:
|
|
|
|
GtkPrintContext *m_gpc;
|
|
|
|
wxDC *m_dc;
|
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGtkPrinter)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxGtkPrinter);
|
2007-09-05 17:34:08 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// wxGtkPrintNativeData
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxGtkPrintNativeData : public wxPrintNativeDataBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxGtkPrintNativeData();
|
|
|
|
virtual ~wxGtkPrintNativeData();
|
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual bool TransferTo( wxPrintData &data ) wxOVERRIDE;
|
|
|
|
virtual bool TransferFrom( const wxPrintData &data ) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual bool Ok() const wxOVERRIDE { return IsOk(); }
|
|
|
|
virtual bool IsOk() const wxOVERRIDE { return true; }
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
GtkPrintSettings* GetPrintConfig() { return m_config; }
|
|
|
|
void SetPrintConfig( GtkPrintSettings * config );
|
|
|
|
|
|
|
|
GtkPrintOperation* GetPrintJob() { return m_job; }
|
2012-10-08 08:09:37 -04:00
|
|
|
void SetPrintJob(GtkPrintOperation *job) { m_job = job; }
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
GtkPrintContext *GetPrintContext() { return m_context; }
|
|
|
|
void SetPrintContext(GtkPrintContext *context) {m_context = context; }
|
|
|
|
|
|
|
|
|
|
|
|
GtkPageSetup* GetPageSetupFromSettings(GtkPrintSettings* settings);
|
|
|
|
void SetPageSetupToSettings(GtkPrintSettings* settings, GtkPageSetup* page_setup);
|
|
|
|
|
|
|
|
private:
|
2012-10-08 08:09:37 -04:00
|
|
|
// NB: m_config is created and owned by us, but the other objects are not
|
|
|
|
// and their accessors don't change their ref count.
|
2007-09-05 17:34:08 -04:00
|
|
|
GtkPrintSettings *m_config;
|
|
|
|
GtkPrintOperation *m_job;
|
|
|
|
GtkPrintContext *m_context;
|
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGtkPrintNativeData)
|
|
|
|
};
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-11-13 08:20:15 -05:00
|
|
|
// wxGtkPrinterDC
|
2007-09-05 17:34:08 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-11-30 08:48:22 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxGtkPrinterDCImpl : public wxDCImpl
|
2007-09-05 17:34:08 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-11-30 08:48:22 -05:00
|
|
|
wxGtkPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
|
|
|
|
virtual ~wxGtkPrinterDCImpl();
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
bool Ok() const { return IsOk(); }
|
2014-03-29 20:02:23 -04:00
|
|
|
bool IsOk() const wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual void* GetCairoContext() const wxOVERRIDE;
|
|
|
|
virtual void* GetHandle() const wxOVERRIDE;
|
2012-07-28 15:31:18 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
bool CanDrawBitmap() const wxOVERRIDE { return true; }
|
|
|
|
void Clear() wxOVERRIDE;
|
|
|
|
void SetFont( const wxFont& font ) wxOVERRIDE;
|
|
|
|
void SetPen( const wxPen& pen ) wxOVERRIDE;
|
|
|
|
void SetBrush( const wxBrush& brush ) wxOVERRIDE;
|
|
|
|
void SetLogicalFunction( wxRasterOperationMode function ) wxOVERRIDE;
|
|
|
|
void SetBackground( const wxBrush& brush ) wxOVERRIDE;
|
|
|
|
void DestroyClippingRegion() wxOVERRIDE;
|
|
|
|
bool StartDoc(const wxString& message) wxOVERRIDE;
|
|
|
|
void EndDoc() wxOVERRIDE;
|
|
|
|
void StartPage() wxOVERRIDE;
|
|
|
|
void EndPage() wxOVERRIDE;
|
|
|
|
wxCoord GetCharHeight() const wxOVERRIDE;
|
|
|
|
wxCoord GetCharWidth() const wxOVERRIDE;
|
|
|
|
bool CanGetTextExtent() const wxOVERRIDE { return true; }
|
|
|
|
wxSize GetPPI() const wxOVERRIDE;
|
|
|
|
virtual int GetDepth() const wxOVERRIDE { return 24; }
|
|
|
|
void SetBackgroundMode(int mode) wxOVERRIDE;
|
|
|
|
void SetPalette(const wxPalette& WXUNUSED(palette)) wxOVERRIDE { }
|
2007-09-10 17:35:45 -04:00
|
|
|
void SetResolution(int ppi);
|
2008-11-15 06:10:34 -05:00
|
|
|
|
2011-03-22 10:17:38 -04:00
|
|
|
// overridden for wxPrinterDC Impl
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual int GetResolution() const wxOVERRIDE;
|
|
|
|
virtual wxRect GetPaperRect() const wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
protected:
|
2009-08-21 06:41:26 -04:00
|
|
|
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col,
|
2014-03-29 20:02:23 -04:00
|
|
|
wxFloodFillStyle style=wxFLOOD_SURFACE ) wxOVERRIDE;
|
|
|
|
void DoGradientFillConcentric(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, const wxPoint& circleCenter) wxOVERRIDE;
|
|
|
|
void DoGradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, wxDirection nDirection = wxEAST) wxOVERRIDE;
|
|
|
|
bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const wxOVERRIDE;
|
|
|
|
void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) wxOVERRIDE;
|
|
|
|
void DoCrossHair(wxCoord x, wxCoord y) wxOVERRIDE;
|
|
|
|
void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc) wxOVERRIDE;
|
|
|
|
void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea) wxOVERRIDE;
|
|
|
|
void DoDrawPoint(wxCoord x, wxCoord y) wxOVERRIDE;
|
|
|
|
void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0) wxOVERRIDE;
|
|
|
|
void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE) wxOVERRIDE;
|
|
|
|
void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE) wxOVERRIDE;
|
|
|
|
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE;
|
|
|
|
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0) wxOVERRIDE;
|
|
|
|
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
#if wxUSE_SPLINES
|
2014-03-29 20:02:23 -04:00
|
|
|
void DoDrawSpline(const wxPointList *points) wxOVERRIDE;
|
2007-11-13 08:20:15 -05:00
|
|
|
#endif
|
2007-09-05 17:34:08 -04:00
|
|
|
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
2009-08-21 06:41:26 -04:00
|
|
|
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
2009-01-08 09:21:53 -05:00
|
|
|
wxRasterOperationMode rop = wxCOPY, bool useMask = false,
|
2014-03-29 20:02:23 -04:00
|
|
|
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) wxOVERRIDE;
|
|
|
|
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y ) wxOVERRIDE;
|
|
|
|
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false ) wxOVERRIDE;
|
|
|
|
void DoDrawText(const wxString& text, wxCoord x, wxCoord y ) wxOVERRIDE;
|
|
|
|
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle) wxOVERRIDE;
|
|
|
|
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE;
|
|
|
|
void DoSetDeviceClippingRegion( const wxRegion &WXUNUSED(clip) ) wxOVERRIDE
|
2008-06-07 21:45:56 -04:00
|
|
|
{
|
|
|
|
wxFAIL_MSG( "not implemented" );
|
|
|
|
}
|
2007-09-05 17:34:08 -04:00
|
|
|
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
|
2009-01-19 08:55:27 -05:00
|
|
|
wxCoord *descent = NULL,
|
|
|
|
wxCoord *externalLeading = NULL,
|
2014-03-29 20:02:23 -04:00
|
|
|
const wxFont *theFont = NULL ) const wxOVERRIDE;
|
|
|
|
void DoGetSize(int* width, int* height) const wxOVERRIDE;
|
|
|
|
void DoGetSizeMM(int *width, int *height) const wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
wxPrintData& GetPrintData() { return m_printData; }
|
|
|
|
void SetPrintData(const wxPrintData& data);
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxPrintData m_printData;
|
|
|
|
PangoContext *m_context;
|
|
|
|
PangoLayout *m_layout;
|
|
|
|
PangoFontDescription *m_fontdesc;
|
|
|
|
cairo_t *m_cairo;
|
|
|
|
|
|
|
|
unsigned char m_currentRed;
|
|
|
|
unsigned char m_currentGreen;
|
|
|
|
unsigned char m_currentBlue;
|
|
|
|
unsigned char m_currentAlpha;
|
|
|
|
|
2007-09-10 17:35:45 -04:00
|
|
|
GtkPrintContext *m_gpc;
|
|
|
|
int m_resolution;
|
|
|
|
double m_PS2DEV;
|
|
|
|
double m_DEV2PS;
|
|
|
|
|
2007-11-30 08:48:22 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxGtkPrinterDCImpl)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxGtkPrinterDCImpl);
|
2007-09-05 17:34:08 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxGtkPrintPreview: programmer creates an object of this class to preview a
|
|
|
|
// wxPrintout.
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxGtkPrintPreview : public wxPrintPreviewBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxGtkPrintPreview(wxPrintout *printout,
|
2009-01-19 08:55:27 -05:00
|
|
|
wxPrintout *printoutForPrinting = NULL,
|
|
|
|
wxPrintDialogData *data = NULL);
|
2007-09-05 17:34:08 -04:00
|
|
|
wxGtkPrintPreview(wxPrintout *printout,
|
|
|
|
wxPrintout *printoutForPrinting,
|
|
|
|
wxPrintData *data);
|
|
|
|
|
|
|
|
virtual ~wxGtkPrintPreview();
|
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual bool Print(bool interactive) wxOVERRIDE;
|
|
|
|
virtual void DetermineScaling() wxOVERRIDE;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
private:
|
2008-01-03 17:21:04 -05:00
|
|
|
void Init(wxPrintout *printout,
|
|
|
|
wxPrintout *printoutForPrinting,
|
|
|
|
wxPrintData *data);
|
|
|
|
|
|
|
|
// resolution to use in DPI
|
|
|
|
int m_resolution;
|
2007-09-05 17:34:08 -04:00
|
|
|
|
|
|
|
DECLARE_CLASS(wxGtkPrintPreview)
|
|
|
|
};
|
|
|
|
|
2008-01-03 17:21:04 -05:00
|
|
|
#endif // wxUSE_GTKPRINT
|
2007-09-05 17:34:08 -04:00
|
|
|
|
2008-01-03 17:21:04 -05:00
|
|
|
#endif // _WX_GTK_PRINT_H_
|