00001 /* AbiSource Application Framework 00002 * Copyright (C) 1998 AbiSource, Inc. 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00017 * 02111-1307, USA. 00018 */ 00019 00020 #ifndef XAP_UNIXDIALOG_PRINT_H 00021 #define XAP_UNIXDIALOG_PRINT_H 00022 00023 #include "xap_Dlg_Print.h" 00024 #include <gtk/gtk.h> 00025 #include <gtk/gtkprintunixdialog.h> 00026 00027 class FV_View; 00028 class FL_DocLayout; 00029 class XAP_Frane; 00030 00031 /*****************************************************************/ 00032 00033 class XAP_UnixDialog_Print : public XAP_Dialog_Print 00034 { 00035 public: 00036 XAP_UnixDialog_Print(XAP_DialogFactory * pDlgFactory, 00037 XAP_Dialog_Id id); 00038 virtual ~XAP_UnixDialog_Print(void); 00039 00040 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id); 00041 00042 virtual void runModal(XAP_Frame * pFrame); 00043 00044 virtual GR_Graphics * getPrinterGraphicsContext(void); 00045 virtual void releasePrinterGraphicsContext(GR_Graphics *); 00046 void setupPrint(void); 00047 void BeginPrint(GtkPrintContext * context); 00048 void PrintPage(gint iPage); 00049 virtual void setPreview(bool b); 00050 virtual void PrintDirectly(XAP_Frame * pFrame, const char * szFilename, const char * szPrinter); 00051 void cleanup(void); 00052 protected: 00053 GR_Graphics * m_pPrintGraphics; 00054 GR_Graphics::ColorSpace colorSpace; 00055 bool m_bIsPreview; 00056 GtkPageSetup * m_pPageSetup; 00057 GtkPaperSize * m_pGtkPageSize; 00058 GtkPrintOperation * m_pPO; 00059 FV_View * m_pView; 00060 gint m_iNumberPages; 00061 gint m_iCurrentPage; 00062 FL_DocLayout * m_pDL; 00063 FV_View * m_pPrintView; 00064 FL_DocLayout * m_pPrintLayout; 00065 bool m_bDidQuickPrint; 00066 bool m_bShowParagraphs; 00067 XAP_Frame * m_pFrame; 00068 }; 00069 00070 #endif /* XAP_UNIXDIALOG_PRINT_H */
1.7.1