scprintengine_gdi.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef __SCPRINTENGINE_GDI_H__
00008 #define __SCPRINTENGINE_GDI_H__
00009
00010 #include <QByteArray>
00011 #include <QImage>
00012
00013 #include "scconfig.h"
00014 #include "scprintengine.h"
00015 #include "scribusdoc.h"
00016 #include "scribusstructs.h"
00017 #include <windows.h>
00018
00019 class SCRIBUS_API ScPrintEngine_GDI : public ScPrintEngine
00020 {
00021 protected:
00022
00023 bool m_forceGDI;
00024
00025 void resetData(void);
00026
00027 typedef bool (ScPrintEngine_GDI::*PrintPageFunc) ( ScribusDoc* doc, Page* page, PrintOptions& options, HDC printerDC, DEVMODEW* devMode );
00028
00039 bool printPages( ScribusDoc* doc, PrintOptions& options, HDC printerDC, DEVMODEW* devMode, QString& fileName );
00051 bool printPage_GDI ( ScribusDoc* doc, Page* page, PrintOptions& options, HDC printerDC, DEVMODEW* devMode );
00063 bool printPage_PS ( ScribusDoc* doc, Page* page, PrintOptions& options, HDC printerDC, DEVMODEW* devMode );
00073 bool sendPSFile ( QString filePath, HDC printerDC, int pageWidth, int pageHeight );
00080 void setDeviceParams ( ScribusDoc* doc, PrintOptions& options, DEVMODEW* devMode );
00087 int getPSPassthroughSupport( HDC printerDC );
00093 bool printerUseFilePort ( QString& printerName );
00099 bool isPostscriptPrinter( HDC dc );
00100
00101 public:
00102
00103 ScPrintEngine_GDI(void);
00104
00109 void setForceGDI(bool force);
00110
00117 virtual bool print(ScribusDoc& doc, PrintOptions& options);
00118
00128 bool gdiPrintPreview( ScribusDoc* doc, Page* page, QImage* image, PrintOptions& options, double scale = 1.0 );
00129
00134 static QString getDefaultPrinter( void );
00135 };
00136
00137 #endif