Scribus
Open source desktop publishing at your fingertips
scprintengine_gdi.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef __SCPRINTENGINE_GDI_H__
8 #define __SCPRINTENGINE_GDI_H__
9 
10 #include <QByteArray>
11 #include <QImage>
12 
13 #include "scconfig.h"
14 #include "scprintengine.h"
15 #include "scribusdoc.h"
16 #include "scribusstructs.h"
17 
18 #include <cairo.h>
19 #include <windows.h>
20 
21 class SCRIBUS_API ScPrintEngine_GDI : public ScPrintEngine
22 {
23 protected:
24 
25  bool m_forceGDI;
26 
27  void resetData(void);
28 
29  typedef bool (ScPrintEngine_GDI::*PrintPageFunc) ( ScribusDoc* doc, ScPage* page, PrintOptions& options, HDC printerDC, cairo_t* context );
30 
40  bool printPages( ScribusDoc* doc, PrintOptions& options, HDC printerDC, DEVMODEW* devMode, QString& fileName );
51  bool printPage_GDI ( ScribusDoc* doc, ScPage* page, PrintOptions& options, HDC printerDC, cairo_t* context );
62  bool printPage_PS ( ScribusDoc* doc, ScPage* page, PrintOptions& options, HDC printerDC, cairo_t* context );
73  bool printPage_PS_Sep ( ScribusDoc* doc, ScPage* page, PrintOptions& options, HDC printerDC, cairo_t* context );
84  bool sendPSFile ( QString filePath, HDC printerDC, int pageWidth, int pageHeight, bool landscape );
91  void setDeviceParams ( ScribusDoc* doc, PrintOptions& options, DEVMODEW* devMode );
98  int getPSPassthroughSupport( HDC printerDC );
104  bool printerUseFilePort ( QString& printerName );
110  bool isPostscriptPrinter( HDC dc );
111 
112 public:
113 
114  ScPrintEngine_GDI(void);
115 
120  void setForceGDI(bool force);
121 
128  virtual bool print(ScribusDoc& doc, PrintOptions& options);
129 
139  bool gdiPrintPreview( ScribusDoc* doc, ScPage* page, QImage* image, PrintOptions& options, double scale = 1.0 );
140 
145  static QString getDefaultPrinter( void );
146 };
147 
148 #endif
Definition: scprintengine_gdi.h:21
Definition: scpage.h:46
Definition: scprintengine.h:15
the Document Class
Definition: scribusdoc.h:90
Definition: scribusstructs.h:213