Code

Sync to release 0.48 branch
[inkscape.git] / src / ui / dialog / print.h
1 /** @file
2  * @brief Print dialog
3  */
4 /* Authors:
5  *   Kees Cook <kees@outflux.net>
6  *
7  * Copyright (C) 2007 Kees Cook
8  * Released under GNU GPL.  Read the file 'COPYING' for more information.
9  */
11 #ifndef INKSCAPE_UI_DIALOG_PRINT_H
12 #define INKSCAPE_UI_DIALOG_PRINT_H
14 #include <glibmm/i18n.h>
15 #include <gtkmm/printoperation.h> // GtkMM
16 #include <gtk/gtkprintoperation.h> // Gtk
18 #include "desktop.h"
19 #include "sp-item.h"
21 #include "ui/widget/rendering-options.h"
23 /*
24  * gtk 2.12.0 has a bug (http://bugzilla.gnome.org/show_bug.cgi?id=482089)
25  * where it fails to correctly deal with gtkmm signal management.  As a result
26  * we have call gtk directly instead of doing a much cleaner version of
27  * this printing dialog, using full gtkmmification.  (The bug was fixed
28  * in 2.12.1, so when the Inkscape gtk minimum version is bumped there,
29  * we can revert Inkscape commit 16865.
30  */
31 struct workaround_gtkmm
32 {
33     SPDocument *_doc;
34     SPItem     *_base;
35     Inkscape::UI::Widget::RenderingOptions *_tab;
36 };
38 namespace Inkscape {
39 namespace UI {
40 namespace Dialog {
42 class Print {
43 public:
44     Print(SPDocument *doc, SPItem *base);
45     Gtk::PrintOperationResult run(Gtk::PrintOperationAction, Gtk::Window &parent_window);
47 protected:
49 private:
50     GtkPrintOperation *_printop;
51     SPDocument *_doc;
52     SPItem     *_base;
53     Inkscape::UI::Widget::RenderingOptions _tab;
55     struct workaround_gtkmm _workaround;
56 };
58 } // namespace Dialog
59 } // namespace UI
60 } // namespace Inkscape
62 #endif // INKSCAPE_UI_DIALOG_PRINT_H
64 /*
65   Local Variables:
66   mode:c++
67   c-file-style:"stroustrup"
68   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
69   indent-tabs-mode:nil
70   fill-column:99
71   End:
72 */
73 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :