1 #ifndef SEEN_SP_SVG_VIEW_WIDGET_H
2 #define SEEN_SP_SVG_VIEW_WIDGET_H
4 /** \file
5 * SPSVGView, SPSVGSPViewWidget: Generic SVG view and widget
6 *
7 * Authors:
8 * Lauris Kaplinski <lauris@kaplinski.com>
9 * Jon A. Cruz <jon@joncruz.org>
10 *
11 * Copyright (C) 2010 Authors
12 * Copyright (C) 2001-2002 Lauris Kaplinski
13 * Copyright (C) 2001 Ximian, Inc.
14 *
15 * Released under GNU GPL, read the file 'COPYING' for more information
16 */
18 #include "ui/view/view-widget.h"
20 class SPDocument;
21 class SPSVGSPViewWidget;
22 class SPSVGSPViewWidgetClass;
24 #define SP_TYPE_SVG_VIEW_WIDGET (sp_svg_view_widget_get_type ())
25 #define SP_SVG_VIEW_WIDGET(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_SVG_VIEW_WIDGET, SPSVGSPViewWidget))
26 #define SP_SVG_VIEW_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_SVG_VIEW_WIDGET, SPSVGSPViewWidgetClass))
27 #define SP_IS_SVG_VIEW_WIDGET(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_SVG_VIEW_WIDGET))
28 #define SP_IS_SVG_VIEW_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_SVG_VIEW_WIDGET))
30 GtkType sp_svg_view_widget_get_type (void);
32 GtkWidget *sp_svg_view_widget_new (SPDocument *doc);
34 /**
35 * An SPSVGSPViewWidget is an SVG view together with a canvas.
36 */
37 struct SPSVGSPViewWidget {
38 public:
39 SPViewWidget widget;
41 GtkWidget *sw;
42 GtkWidget *canvas;
44 /// Whether to resize automatically
45 bool resize;
46 gdouble maxwidth, maxheight;
48 // C++ Wrappers
49 /// Flags the SPSVGSPViewWidget to have its size changed with Gtk.
50 void setResize(bool resize, gdouble width, gdouble height);
51 };
53 /// The SPSVGSPViewWidget vtable.
54 struct SPSVGSPViewWidgetClass {
55 SPViewWidgetClass parent_class;
56 };
59 #endif // SEEN_SP_SVG_VIEW_WIDGET_H
60 /*
61 Local Variables:
62 mode:c++
63 c-file-style:"stroustrup"
64 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
65 indent-tabs-mode:nil
66 fill-column:99
67 End:
68 */
69 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :