Debian Codegraph @

src/af/xap/gtk/xap_UnixDlg_Print.h

raw
1 /* AbiSource Application Framework
2 * Copyright (C) 1998 AbiSource, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20 #ifndef XAP_UNIXDIALOG_PRINT_H
21 #define XAP_UNIXDIALOG_PRINT_H
22
23 #include "xap_Dlg_Print.h"
24 #include <gtk/gtk.h>
25
26 class FV_View;
27 class FL_DocLayout;
28 class XAP_Frane;
29
30 /*****************************************************************/
31
32 class XAP_UnixDialog_Print : public XAP_Dialog_Print
33 {
34 public:
35 XAP_UnixDialog_Print(XAP_DialogFactory * pDlgFactory,
36 XAP_Dialog_Id id);
37 virtual ~XAP_UnixDialog_Print(void);
38
39 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
40
41 virtual void runModal(XAP_Frame * pFrame);
42
43 virtual GR_Graphics * getPrinterGraphicsContext(void);
44 virtual void releasePrinterGraphicsContext(GR_Graphics *);
45 void setupPrint(void);
46 void BeginPrint(GtkPrintContext * context);
47 void PrintPage(gint iPage);
48 virtual void setPreview(bool b);
49 virtual void PrintDirectly(XAP_Frame * pFrame, const char * szFilename, const char * szPrinter);
50 void cleanup(void);
51 protected:
52 GR_Graphics * m_pPrintGraphics;
53 GR_Graphics::ColorSpace colorSpace;
54 bool m_bIsPreview;
55 GtkPageSetup * m_pPageSetup;
56 GtkPaperSize * m_pGtkPageSize;
57 GtkPrintOperation * m_pPO;
58 FV_View * m_pView;
59 gint m_iNumberPages;
60 gint m_iCurrentPage;
61 FL_DocLayout * m_pDL;
62 FV_View * m_pPrintView;
63 FL_DocLayout * m_pPrintLayout;
64 bool m_bDidQuickPrint;
65 bool m_bShowParagraphs;
66 XAP_Frame * m_pFrame;
67 };
68
69 #endif /* XAP_UNIXDIALOG_PRINT_H */