1
/* gtkmm example Copyright (C) 2006 gtkmm development team
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License version 2
5
* as published by the Free Software Foundation.
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
#ifndef GLOM_PRINT_OPERATION_PRINT_LAYOUT_H
18
#define GLOM_PRINT_OPERATION_PRINT_LAYOUT_H
20
#include <glom/mode_design/print_layouts/canvas_print_layout.h>
21
#include <gtkmm/printoperation.h>
27
//We derive our own class from PrintOperation,
28
//so we can put the actual print implementation here.
29
class PrintOperationPrintLayout : public Gtk::PrintOperation
32
static Glib::RefPtr<PrintOperationPrintLayout> create();
33
virtual ~PrintOperationPrintLayout();
35
void set_canvas(Canvas_PrintLayout* canvas);
38
PrintOperationPrintLayout();
40
//PrintOperation default signal handler overrides:
41
virtual bool on_paginate(const Glib::RefPtr<Gtk::PrintContext>& context); //Comment this out if GTK+ bug #345345 has not been fixed yet.
42
virtual void on_begin_print(const Glib::RefPtr<Gtk::PrintContext>& context);
43
virtual void on_draw_page(const Glib::RefPtr<Gtk::PrintContext>& context, int page_nr);
45
//Not owned by this instance:
46
Canvas_PrintLayout* m_canvas;
52
#endif // GLOM_PRINT_OPERATION_PRINT_LAYOUT_H