summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-03-17 12:29:02 +0000
committerJabiertxo Arraiza Zenotz <jtx@jtx.marker.es>2013-03-17 12:29:02 +0000
commit732618cd7d6159ee47cc0dd8b86cf07790e3e724 (patch)
tree5e7ce92337d91b24e07f9c5f8992f1bc6478c692 /src
parentWorking in widgets (diff)
downloadinkscape-732618cd7d6159ee47cc0dd8b86cf07790e3e724.tar.gz
inkscape-732618cd7d6159ee47cc0dd8b86cf07790e3e724.zip
Working with widjets
(bzr r11950.1.56)
Diffstat (limited to 'src')
-rw-r--r--src/common-context.h4
-rw-r--r--src/composite-undo-stack-observer.h2
-rw-r--r--src/desktop.h2
-rw-r--r--src/display/cairo-utils.cpp10
-rw-r--r--src/display/canvas-axonomgrid.h2
-rw-r--r--src/display/guideline.h2
-rw-r--r--src/display/nr-filter-diffuselighting.h8
-rw-r--r--src/display/nr-filter-flood.h2
-rw-r--r--src/display/nr-filter-specularlighting.h8
-rw-r--r--src/display/nr-style.h3
-rw-r--r--src/display/nr-svgfonts.cpp3
-rw-r--r--src/display/nr-svgfonts.h4
-rw-r--r--src/display/sp-ctrlcurve.h2
-rw-r--r--src/document-subset.h2
-rw-r--r--src/dom/events.h1
-rw-r--r--src/dropper-context.cpp1
-rw-r--r--src/dropper-context.h3
-rw-r--r--src/dyna-draw-context.h3
-rw-r--r--src/eraser-context.h3
-rw-r--r--src/event-context.h2
-rw-r--r--src/extension/internal/cairo-render-context.h6
-rw-r--r--src/extension/internal/cairo-renderer.h2
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp1
-rw-r--r--src/extension/internal/pdfinput/svg-builder.h6
-rw-r--r--src/file.cpp3
-rw-r--r--src/file.h2
-rw-r--r--src/filter-chemistry.h2
-rw-r--r--src/filters/blend.h2
-rw-r--r--src/filters/colormatrix.h2
-rw-r--r--src/filters/componenttransfer-funcnode.h6
-rw-r--r--src/filters/componenttransfer.h2
-rw-r--r--src/filters/composite.h2
-rw-r--r--src/filters/convolvematrix.h2
-rw-r--r--src/filters/diffuselighting.h4
-rw-r--r--src/filters/displacementmap.h2
-rw-r--r--src/filters/distantlight.h4
-rw-r--r--src/filters/flood.h2
-rw-r--r--src/filters/gaussian-blur.h4
-rw-r--r--src/filters/image.h2
-rw-r--r--src/filters/merge.h2
-rw-r--r--src/filters/mergenode.h3
-rw-r--r--src/filters/morphology.h2
-rw-r--r--src/filters/offset.h2
-rw-r--r--src/filters/pointlight.h6
-rw-r--r--src/filters/specularlighting.h4
-rw-r--r--src/filters/spotlight.h6
-rw-r--r--src/filters/tile.h2
-rw-r--r--src/filters/turbulence.h1
-rw-r--r--src/flood-context.h3
-rw-r--r--src/gradient-context.h3
-rw-r--r--src/gradient-drag.h6
-rw-r--r--src/inkscape-private.h2
-rw-r--r--src/inkscape.cpp2
-rw-r--r--src/libgdl/Makefile_insert8
-rw-r--r--src/libnrtype/Layout-TNG-Output.cpp1
-rw-r--r--src/libnrtype/Layout-TNG.h2
-rw-r--r--src/libnrtype/font-lister.cpp1
-rw-r--r--src/livarot/Path.h10
-rw-r--r--src/livarot/Shape.h6
-rw-r--r--src/live_effects/lpe-bspline.cpp48
-rw-r--r--src/live_effects/lpe-bspline.h32
-rw-r--r--src/live_effects/lpe-recursiveskeleton.cpp3
-rw-r--r--src/lpe-tool-context.h3
-rw-r--r--src/marker.cpp12
-rw-r--r--src/marker.h4
-rw-r--r--src/measure-context.h3
-rw-r--r--src/menus-skeleton.h2
-rw-r--r--src/mesh-context.h3
-rw-r--r--src/pixmaps/cursor-dropper.xpm38
-rw-r--r--src/rect-context.h3
-rw-r--r--src/select-context.h2
-rw-r--r--src/selection.cpp1
-rw-r--r--src/seltrans-handles.h2
-rw-r--r--src/seltrans.h2
-rw-r--r--src/snap.cpp1
-rw-r--r--src/sp-clippath.h2
-rw-r--r--src/sp-desc.h3
-rw-r--r--src/sp-filter-primitive.h2
-rw-r--r--src/sp-filter.h2
-rw-r--r--src/sp-flowregion.cpp39
-rw-r--r--src/sp-font-face.cpp3
-rw-r--r--src/sp-font-face.h2
-rw-r--r--src/sp-font.cpp3
-rw-r--r--src/sp-glyph-kerning.cpp2
-rw-r--r--src/sp-glyph-kerning.h2
-rw-r--r--src/sp-glyph.cpp2
-rw-r--r--src/sp-glyph.h2
-rw-r--r--src/sp-gradient.h4
-rw-r--r--src/sp-image.h3
-rw-r--r--src/sp-item.h4
-rw-r--r--src/sp-linear-gradient-fns.h2
-rw-r--r--src/sp-mask.h4
-rw-r--r--src/sp-metadata.cpp10
-rw-r--r--src/sp-metadata.h3
-rw-r--r--src/sp-missing-glyph.cpp3
-rw-r--r--src/sp-missing-glyph.h2
-rw-r--r--src/sp-object-group.cpp4
-rw-r--r--src/sp-object-repr.cpp14
-rw-r--r--src/sp-offset.h2
-rw-r--r--src/sp-pattern.h3
-rw-r--r--src/sp-polyline.cpp11
-rw-r--r--src/sp-radial-gradient-fns.h2
-rw-r--r--src/sp-rect.h3
-rw-r--r--src/sp-spiral.h3
-rw-r--r--src/sp-star.h5
-rw-r--r--src/sp-stop.h1
-rw-r--r--src/sp-switch.h2
-rw-r--r--src/sp-symbol.cpp33
-rw-r--r--src/sp-symbol.h3
-rw-r--r--src/sp-title.h3
-rw-r--r--src/sp-tref.h3
-rw-r--r--src/sp-use.h2
-rw-r--r--src/spiral-context.h3
-rw-r--r--src/splivarot.cpp36
-rw-r--r--src/spray-context.h3
-rw-r--r--src/star-context.h3
-rw-r--r--src/style.cpp2
-rw-r--r--src/style.h4
-rw-r--r--src/svg-view-widget.h2
-rw-r--r--src/svg-view.h2
-rw-r--r--src/svg/svg-color.h2
-rw-r--r--src/text-context.h2
-rw-r--r--src/text-editing.cpp2
-rw-r--r--src/trace/siox.cpp4
-rw-r--r--src/tweak-context.h3
-rw-r--r--src/ui/dialog/dialog-manager.cpp7
-rw-r--r--src/ui/dialog/document-properties.cpp2
-rw-r--r--src/ui/dialog/export.cpp26
-rw-r--r--src/ui/dialog/export.h19
-rw-r--r--src/ui/dialog/fill-and-stroke.cpp15
-rw-r--r--src/ui/dialog/find.cpp4
-rw-r--r--src/ui/dialog/find.h6
-rw-r--r--src/ui/dialog/glyphs.h2
-rw-r--r--src/ui/dialog/icon-preview.cpp4
-rw-r--r--src/ui/dialog/input.cpp2
-rw-r--r--src/ui/dialog/layer-properties.h6
-rw-r--r--src/ui/dialog/object-properties.cpp6
-rw-r--r--src/ui/dialog/object-properties.h10
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp4
-rw-r--r--src/ui/dialog/svg-fonts-dialog.h4
-rw-r--r--src/ui/dialog/text-edit.cpp1
-rw-r--r--src/ui/dialog/text-edit.h2
-rw-r--r--src/ui/dialog/tracedialog.cpp1
-rw-r--r--src/ui/dialog/xml-tree.h2
-rw-r--r--src/ui/tool/control-point.cpp2
-rw-r--r--src/ui/tool/node-tool.h3
-rw-r--r--src/ui/tool/path-manipulator.h2
-rw-r--r--src/ui/widget/entry.cpp2
-rw-r--r--src/ui/widget/entry.h6
-rw-r--r--src/ui/widget/frame.h8
-rw-r--r--src/ui/widget/registered-widget.h2
-rw-r--r--src/ui/widget/selected-style.h2
-rw-r--r--src/ui/widget/style-swatch.h2
-rw-r--r--src/undo-stack-observer.h2
-rw-r--r--src/widgets/gradient-vector.h2
-rw-r--r--src/widgets/paint-selector.h2
-rw-r--r--src/widgets/swatch-selector.h6
-rw-r--r--src/xml/composite-node-observer.h2
-rw-r--r--src/zoom-context.h3
159 files changed, 483 insertions, 301 deletions
diff --git a/src/common-context.h b/src/common-context.h
index 8903be391..ae0f398b2 100644
--- a/src/common-context.h
+++ b/src/common-context.h
@@ -29,8 +29,12 @@
#define SP_IS_COMMON_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_COMMON_CONTEXT))
#define SP_IS_COMMON_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_COMMON_CONTEXT))
+class SPCommonContext;
+class SPCommonContextClass;
+
#define SAMPLING_SIZE 8 /* fixme: ?? */
+
struct SPCommonContext : public SPEventContext {
/** accumulated shape which ultimately goes in svg:path */
SPCurve *accumulated;
diff --git a/src/composite-undo-stack-observer.h b/src/composite-undo-stack-observer.h
index 669c39a86..c34ab7234 100644
--- a/src/composite-undo-stack-observer.h
+++ b/src/composite-undo-stack-observer.h
@@ -18,7 +18,7 @@
namespace Inkscape {
-struct Event;
+class Event;
/**
* Aggregates UndoStackObservers for management and triggering in an SPDocument's undo/redo
diff --git a/src/desktop.h b/src/desktop.h
index 56de56c65..d8d4e151d 100644
--- a/src/desktop.h
+++ b/src/desktop.h
@@ -77,7 +77,7 @@ namespace Inkscape {
}
namespace View {
- struct EditWidgetInterface;
+ class EditWidgetInterface;
}
}
namespace Whiteboard {
diff --git a/src/display/cairo-utils.cpp b/src/display/cairo-utils.cpp
index fc56c7b26..a55b05fe3 100644
--- a/src/display/cairo-utils.cpp
+++ b/src/display/cairo-utils.cpp
@@ -655,8 +655,8 @@ int ink_cairo_surface_srgb_to_linear(cairo_surface_t *surface)
cairo_surface_flush(surface);
int width = cairo_image_surface_get_width(surface);
int height = cairo_image_surface_get_height(surface);
- // int stride = cairo_image_surface_get_stride(surface);
- // unsigned char *data = cairo_image_surface_get_data(surface);
+ int stride = cairo_image_surface_get_stride(surface);
+ unsigned char *data = cairo_image_surface_get_data(surface);
ink_cairo_surface_filter( surface, surface, SurfaceSrgbToLinear() );
@@ -698,8 +698,8 @@ int ink_cairo_surface_linear_to_srgb(cairo_surface_t *surface)
cairo_surface_flush(surface);
int width = cairo_image_surface_get_width(surface);
int height = cairo_image_surface_get_height(surface);
- // int stride = cairo_image_surface_get_stride(surface);
- // unsigned char *data = cairo_image_surface_get_data(surface);
+ int stride = cairo_image_surface_get_stride(surface);
+ unsigned char *data = cairo_image_surface_get_data(surface);
ink_cairo_surface_filter( surface, surface, SurfaceLinearToSrgb() );
@@ -888,4 +888,4 @@ guint32 argb32_from_rgba(guint32 in)
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/display/canvas-axonomgrid.h b/src/display/canvas-axonomgrid.h
index f58ea3aca..0e24d3f56 100644
--- a/src/display/canvas-axonomgrid.h
+++ b/src/display/canvas-axonomgrid.h
@@ -12,7 +12,7 @@
#include "line-snapper.h"
#include "canvas-grid.h"
-struct SPCanvasBuf;
+class SPCanvasBuf;
class SPDesktop;
struct SPNamedView;
diff --git a/src/display/guideline.h b/src/display/guideline.h
index 2d9a87d9b..164244c46 100644
--- a/src/display/guideline.h
+++ b/src/display/guideline.h
@@ -21,7 +21,7 @@
#define SP_GUIDELINE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_GUIDELINE, SPGuideLine))
#define SP_IS_GUIDELINE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_GUIDELINE))
-struct SPCtrlPoint;
+class SPCtrlPoint;
struct SPGuideLine {
SPCanvasItem item;
diff --git a/src/display/nr-filter-diffuselighting.h b/src/display/nr-filter-diffuselighting.h
index 15cc8e1ff..315bf9f48 100644
--- a/src/display/nr-filter-diffuselighting.h
+++ b/src/display/nr-filter-diffuselighting.h
@@ -19,10 +19,10 @@
#include "display/nr-filter-slot.h"
#include "display/nr-filter-units.h"
-struct SPFeDistantLight;
-struct SPFePointLight;
-struct SPFeSpotLight;
-struct SVGICCColor;
+class SPFeDistantLight;
+class SPFePointLight;
+class SPFeSpotLight;
+class SVGICCColor;
namespace Inkscape {
namespace Filters {
diff --git a/src/display/nr-filter-flood.h b/src/display/nr-filter-flood.h
index 9a968047d..8568502ff 100644
--- a/src/display/nr-filter-flood.h
+++ b/src/display/nr-filter-flood.h
@@ -14,7 +14,7 @@
#include "display/nr-filter-primitive.h"
-struct SVGICCColor;
+class SVGICCColor;
namespace Inkscape {
namespace Filters {
diff --git a/src/display/nr-filter-specularlighting.h b/src/display/nr-filter-specularlighting.h
index 0d1c0644f..4f8c2d112 100644
--- a/src/display/nr-filter-specularlighting.h
+++ b/src/display/nr-filter-specularlighting.h
@@ -17,10 +17,10 @@
#include "display/nr-light-types.h"
#include "display/nr-filter-primitive.h"
-struct SPFeDistantLight;
-struct SPFePointLight;
-struct SPFeSpotLight;
-struct SVGICCColor;
+class SPFeDistantLight;
+class SPFePointLight;
+class SPFeSpotLight;
+class SVGICCColor;
namespace Inkscape {
namespace Filters {
diff --git a/src/display/nr-style.h b/src/display/nr-style.h
index 80547c43e..597ae7a2c 100644
--- a/src/display/nr-style.h
+++ b/src/display/nr-style.h
@@ -16,7 +16,8 @@
#include <2geom/rect.h>
#include "color.h"
-struct SPPaintServer;
+class SPColor;
+class SPPaintServer;
struct SPStyle;
namespace Inkscape {
diff --git a/src/display/nr-svgfonts.cpp b/src/display/nr-svgfonts.cpp
index 84b4bd080..0d1b56d54 100644
--- a/src/display/nr-svgfonts.cpp
+++ b/src/display/nr-svgfonts.cpp
@@ -1,4 +1,5 @@
#include "config.h"
+#ifdef ENABLE_SVG_FONTS
/*
* SVGFonts rendering implementation
*
@@ -355,6 +356,8 @@ void SvgFont::refresh(){
this->userfont = NULL;
}
+#endif //#ifdef ENABLE_SVG_FONTS
+
/*
Local Variables:
mode:c++
diff --git a/src/display/nr-svgfonts.h b/src/display/nr-svgfonts.h
index 1101f93f2..6138e2fbb 100644
--- a/src/display/nr-svgfonts.h
+++ b/src/display/nr-svgfonts.h
@@ -18,8 +18,8 @@
class SvgFont;
struct SPFont;
-struct SPGlyph;
-struct SPMissingGlyph;
+class SPGlyph;
+class SPMissingGlyph;
struct _GdkEventExpose;
typedef _GdkEventExpose GdkEventExpose;
diff --git a/src/display/sp-ctrlcurve.h b/src/display/sp-ctrlcurve.h
index 90936185c..15de20161 100644
--- a/src/display/sp-ctrlcurve.h
+++ b/src/display/sp-ctrlcurve.h
@@ -17,7 +17,7 @@
#include "display/sp-ctrlline.h"
-class SPItem;
+struct SPItem;
#define SP_TYPE_CTRLCURVE (SPCtrlCurve::getType())
#define SP_CTRLCURVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_CTRLCURVE, SPCtrlCurve))
diff --git a/src/document-subset.h b/src/document-subset.h
index 298b7872d..5f87e6429 100644
--- a/src/document-subset.h
+++ b/src/document-subset.h
@@ -51,7 +51,7 @@ private:
void _remove(SPObject *obj, bool subtree);
- struct Relations;
+ class Relations;
Relations *_relations;
};
diff --git a/src/dom/events.h b/src/dom/events.h
index e62c5d420..59d83afcf 100644
--- a/src/dom/events.h
+++ b/src/dom/events.h
@@ -66,6 +66,7 @@ typedef dom::NodePtr NodePtr ;
//forward declarations
+class Event;
class EventTarget;
class EventListener;
class DocumentEvent;
diff --git a/src/dropper-context.cpp b/src/dropper-context.cpp
index d41e4059d..66dcf4ab9 100644
--- a/src/dropper-context.cpp
+++ b/src/dropper-context.cpp
@@ -39,6 +39,7 @@
#include "document.h"
#include "document-undo.h"
+#include "pixmaps/cursor-dropper.xpm"
#include "pixmaps/cursor-dropper-f.xpm"
#include "pixmaps/cursor-dropper-s.xpm"
diff --git a/src/dropper-context.h b/src/dropper-context.h
index be4b543ae..68ae3df07 100644
--- a/src/dropper-context.h
+++ b/src/dropper-context.h
@@ -20,6 +20,9 @@ G_BEGIN_DECLS
#define SP_DROPPER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_DROPPER_CONTEXT, SPDropperContext))
#define SP_IS_DROPPER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_DROPPER_CONTEXT))
+class SPDropperContext;
+class SPDropperContextClass;
+
enum {
SP_DROPPER_PICK_VISIBLE,
SP_DROPPER_PICK_ACTUAL
diff --git a/src/dyna-draw-context.h b/src/dyna-draw-context.h
index 8509e450b..af63bf653 100644
--- a/src/dyna-draw-context.h
+++ b/src/dyna-draw-context.h
@@ -27,6 +27,9 @@
#define SP_IS_DYNA_DRAW_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_DYNA_DRAW_CONTEXT))
#define SP_IS_DYNA_DRAW_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_DYNA_DRAW_CONTEXT))
+class SPDynaDrawContext;
+class SPDynaDrawContextClass;
+
#define DDC_MIN_PRESSURE 0.0
#define DDC_MAX_PRESSURE 1.0
#define DDC_DEFAULT_PRESSURE 1.0
diff --git a/src/eraser-context.h b/src/eraser-context.h
index bc4268aef..7c147c32f 100644
--- a/src/eraser-context.h
+++ b/src/eraser-context.h
@@ -29,6 +29,9 @@ G_BEGIN_DECLS
#define SP_IS_ERASER_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_ERASER_CONTEXT))
#define SP_IS_ERASER_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_ERASER_CONTEXT))
+class SPEraserContext;
+class SPEraserContextClass;
+
#define ERC_MIN_PRESSURE 0.0
#define ERC_MAX_PRESSURE 1.0
#define ERC_DEFAULT_PRESSURE 1.0
diff --git a/src/event-context.h b/src/event-context.h
index e97a8ad8f..9936aa668 100644
--- a/src/event-context.h
+++ b/src/event-context.h
@@ -19,7 +19,7 @@
#include "2geom/forward.h"
#include "preferences.h"
-class GrDrag;
+struct GrDrag;
class SPDesktop;
class SPItem;
class ShapeEditor;
diff --git a/src/extension/internal/cairo-render-context.h b/src/extension/internal/cairo-render-context.h
index 8829940c6..94c7bb294 100644
--- a/src/extension/internal/cairo-render-context.h
+++ b/src/extension/internal/cairo-render-context.h
@@ -29,7 +29,7 @@
#include <cairo.h>
class SPClipPath;
-struct SPMask;
+class SPMask;
namespace Inkscape {
namespace Extension {
@@ -37,8 +37,8 @@ namespace Internal {
class CairoRenderer;
class CairoRenderContext;
-struct CairoRenderState;
-struct CairoGlyphInfo;
+class CairoRenderState;
+class CairoGlyphInfo;
// Holds info for rendering a glyph
struct CairoGlyphInfo {
diff --git a/src/extension/internal/cairo-renderer.h b/src/extension/internal/cairo-renderer.h
index c1482d82e..db3068fed 100644
--- a/src/extension/internal/cairo-renderer.h
+++ b/src/extension/internal/cairo-renderer.h
@@ -28,7 +28,7 @@
#include <cairo.h>
class SPClipPath;
-struct SPMask;
+class SPMask;
namespace Inkscape {
namespace Extension {
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index b04c9782f..531cda20a 100644
--- a/src/extension/internal/pdfinput/pdf-input.cpp
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
@@ -32,7 +32,6 @@
#endif
#include <gtkmm/alignment.h>
-#include <gtkmm/checkbutton.h>
#include <gtkmm/comboboxtext.h>
#include <gtkmm/drawingarea.h>
#include <gtkmm/frame.h>
diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h
index 610822959..46cddd73b 100644
--- a/src/extension/internal/pdfinput/svg-builder.h
+++ b/src/extension/internal/pdfinput/svg-builder.h
@@ -31,10 +31,10 @@ namespace Inkscape {
#include "CharTypes.h"
class GooString;
class Function;
-class GfxState;
-struct GfxColor;
+struct GfxState;
+class GfxColor;
class GfxColorSpace;
-struct GfxRGB;
+class GfxRGB;
class GfxPath;
class GfxPattern;
class GfxTilingPattern;
diff --git a/src/file.cpp b/src/file.cpp
index 5737f0a8a..97087c1a1 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -1124,6 +1124,9 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri,
prevent_id_clashes(doc, in_doc);
+ SPObject *in_defs = in_doc->getDefs();
+ Inkscape::XML::Node *last_def = in_defs->getRepr()->lastChild();
+
SPCSSAttr *style = sp_css_attr_from_object(doc->getRoot());
// Count the number of top-level items in the imported document.
diff --git a/src/file.h b/src/file.h
index b173ca58c..b8e15bf3e 100644
--- a/src/file.h
+++ b/src/file.h
@@ -24,7 +24,7 @@ class SPObject;
namespace Inkscape {
namespace Extension {
- class Extension;
+ struct Extension;
}
}
diff --git a/src/filter-chemistry.h b/src/filter-chemistry.h
index b00e33bcc..751885ad2 100644
--- a/src/filter-chemistry.h
+++ b/src/filter-chemistry.h
@@ -20,7 +20,7 @@
class SPDocument;
struct SPFilter;
-struct SPFilterPrimitive;
+class SPFilterPrimitive;
class SPItem;
class SPObject;
diff --git a/src/filters/blend.h b/src/filters/blend.h
index 5d65c92fc..e7fc410e7 100644
--- a/src/filters/blend.h
+++ b/src/filters/blend.h
@@ -22,6 +22,8 @@
#define SP_IS_FEBLEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEBLEND))
#define SP_IS_FEBLEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEBLEND))
+class SPFeBlendClass;
+
struct SPFeBlend : public SPFilterPrimitive {
Inkscape::Filters::FilterBlendMode blend_mode;
int in2;
diff --git a/src/filters/colormatrix.h b/src/filters/colormatrix.h
index 558f01070..8eb750ac1 100644
--- a/src/filters/colormatrix.h
+++ b/src/filters/colormatrix.h
@@ -21,6 +21,8 @@
#define SP_IS_FECOLORMATRIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FECOLORMATRIX))
#define SP_IS_FECOLORMATRIX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FECOLORMATRIX))
+class SPFeColorMatrixClass;
+
struct SPFeColorMatrix : public SPFilterPrimitive {
Inkscape::Filters::FilterColorMatrixType type;
gdouble value;
diff --git a/src/filters/componenttransfer-funcnode.h b/src/filters/componenttransfer-funcnode.h
index ae1b2f8bb..d81e50577 100644
--- a/src/filters/componenttransfer-funcnode.h
+++ b/src/filters/componenttransfer-funcnode.h
@@ -34,6 +34,11 @@
#define SP_IS_FEFUNCNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEFUNCNODE))
+/* Component Transfer funcNode class */
+
+class SPFeFuncNode;
+class SPFeFuncNodeClass;
+
struct SPFeFuncNode : public SPObject {
Inkscape::Filters::FilterComponentTransferType type;
std::vector<double> tableValues;
@@ -44,7 +49,6 @@ struct SPFeFuncNode : public SPObject {
double offset;
};
-/* Component Transfer funcNode class */
struct SPFeFuncNodeClass {
SPObjectClass parent_class;
};
diff --git a/src/filters/componenttransfer.h b/src/filters/componenttransfer.h
index deb6fb740..2df64009f 100644
--- a/src/filters/componenttransfer.h
+++ b/src/filters/componenttransfer.h
@@ -24,6 +24,8 @@ namespace Filters {
class FilterComponentTransfer;
} }
+class SPFeComponentTransferClass;
+
struct SPFeComponentTransfer : public SPFilterPrimitive {
Inkscape::Filters::FilterComponentTransfer *renderer;
};
diff --git a/src/filters/composite.h b/src/filters/composite.h
index 4f2d1ff69..3eb62716f 100644
--- a/src/filters/composite.h
+++ b/src/filters/composite.h
@@ -32,6 +32,8 @@ enum FeCompositeOperator {
COMPOSITE_ENDOPERATOR
};
+class SPFeCompositeClass;
+
struct SPFeComposite : public SPFilterPrimitive {
FeCompositeOperator composite_operator;
double k1, k2, k3, k4;
diff --git a/src/filters/convolvematrix.h b/src/filters/convolvematrix.h
index cb2fbfb8d..4c5261e05 100644
--- a/src/filters/convolvematrix.h
+++ b/src/filters/convolvematrix.h
@@ -24,6 +24,8 @@
#define SP_IS_FECONVOLVEMATRIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FECONVOLVEMATRIX))
#define SP_IS_FECONVOLVEMATRIX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FECONVOLVEMATRIX))
+class SPFeConvolveMatrixClass;
+
struct SPFeConvolveMatrix : public SPFilterPrimitive {
NumberOptNumber order;
std::vector<gdouble> kernelMatrix;
diff --git a/src/filters/diffuselighting.h b/src/filters/diffuselighting.h
index 1572385b9..99dccb394 100644
--- a/src/filters/diffuselighting.h
+++ b/src/filters/diffuselighting.h
@@ -21,13 +21,15 @@
#define SP_IS_FEDIFFUSELIGHTING(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEDIFFUSELIGHTING))
#define SP_IS_FEDIFFUSELIGHTING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEDIFFUSELIGHTING))
-struct SVGICCColor;
+class SVGICCColor;
namespace Inkscape {
namespace Filters {
class FilterDiffuseLighting;
} }
+class SPFeDiffuseLightingClass;
+
struct SPFeDiffuseLighting : public SPFilterPrimitive {
gfloat surfaceScale;
guint surfaceScale_set : 1;
diff --git a/src/filters/displacementmap.h b/src/filters/displacementmap.h
index 93dc86d27..6232f0937 100644
--- a/src/filters/displacementmap.h
+++ b/src/filters/displacementmap.h
@@ -28,6 +28,8 @@ enum FilterDisplacementMapChannelSelector {
DISPLACEMENTMAP_CHANNEL_ENDTYPE
};
+class SPFeDisplacementMapClass;
+
struct SPFeDisplacementMap : public SPFilterPrimitive {
int in2;
double scale;
diff --git a/src/filters/distantlight.h b/src/filters/distantlight.h
index b1febf5d3..a68746334 100644
--- a/src/filters/distantlight.h
+++ b/src/filters/distantlight.h
@@ -25,6 +25,10 @@
/* Distant light class */
+
+class SPFeDistantLight;
+class SPFeDistantLightClass;
+
struct SPFeDistantLight : public SPObject {
/** azimuth attribute */
diff --git a/src/filters/flood.h b/src/filters/flood.h
index ab9f061d6..d60321689 100644
--- a/src/filters/flood.h
+++ b/src/filters/flood.h
@@ -23,6 +23,8 @@ G_BEGIN_DECLS
#define SP_IS_FEFLOOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFLOOD))
#define SP_IS_FEFLOOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEFLOOD))
+class SPFeFloodClass;
+
struct SPFeFlood : public SPFilterPrimitive {
guint32 color;
SVGICCColor *icc;
diff --git a/src/filters/gaussian-blur.h b/src/filters/gaussian-blur.h
index 8929627ba..417f8a6f4 100644
--- a/src/filters/gaussian-blur.h
+++ b/src/filters/gaussian-blur.h
@@ -21,12 +21,14 @@
#define SP_IS_GAUSSIANBLUR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_GAUSSIANBLUR))
#define SP_IS_GAUSSIANBLUR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_GAUSSIANBLUR))
+/* GaussianBlur base class */
+class SPGaussianBlurClass;
+
struct SPGaussianBlur : public SPFilterPrimitive {
/** stdDeviation attribute */
NumberOptNumber stdDeviation;
};
-/* GaussianBlur base class */
struct SPGaussianBlurClass {
SPFilterPrimitiveClass parent_class;
};
diff --git a/src/filters/image.h b/src/filters/image.h
index a96e650b7..b4081602a 100644
--- a/src/filters/image.h
+++ b/src/filters/image.h
@@ -24,6 +24,8 @@
#define SP_IS_FEIMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEIMAGE))
#define SP_IS_FEIMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEIMAGE))
+class SPFeImageClass;
+
struct SPFeImage : public SPFilterPrimitive {
gchar *href;
diff --git a/src/filters/merge.h b/src/filters/merge.h
index 40a9bb848..3243073ca 100644
--- a/src/filters/merge.h
+++ b/src/filters/merge.h
@@ -18,6 +18,8 @@
#define SP_IS_FEMERGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEMERGE))
#define SP_IS_FEMERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEMERGE))
+class SPFeMergeClass;
+
struct SPFeMerge : public SPFilterPrimitive {
};
diff --git a/src/filters/mergenode.h b/src/filters/mergenode.h
index edb35faec..8352632a6 100644
--- a/src/filters/mergenode.h
+++ b/src/filters/mergenode.h
@@ -21,6 +21,9 @@
#define SP_FEMERGENODE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_FEMERGENODE, SPFeMergeNode))
#define SP_IS_FEMERGENODE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_FEMERGENODE))
+class SPFeMergeNode;
+class SPFeMergeNodeClass;
+
struct SPFeMergeNode : public SPObject {
int input;
};
diff --git a/src/filters/morphology.h b/src/filters/morphology.h
index 9084d1b94..b7005a3d9 100644
--- a/src/filters/morphology.h
+++ b/src/filters/morphology.h
@@ -22,6 +22,8 @@
#define SP_IS_FEMORPHOLOGY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEMORPHOLOGY))
#define SP_IS_FEMORPHOLOGY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEMORPHOLOGY))
+class SPFeMorphologyClass;
+
struct SPFeMorphology : public SPFilterPrimitive {
Inkscape::Filters::FilterMorphologyOperator Operator;
NumberOptNumber radius;
diff --git a/src/filters/offset.h b/src/filters/offset.h
index 08954a8e4..dba7ed8ef 100644
--- a/src/filters/offset.h
+++ b/src/filters/offset.h
@@ -20,6 +20,8 @@
#define SP_IS_FEOFFSET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEOFFSET))
#define SP_IS_FEOFFSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEOFFSET))
+class SPFeOffsetClass;
+
struct SPFeOffset : public SPFilterPrimitive {
double dx, dy;
};
diff --git a/src/filters/pointlight.h b/src/filters/pointlight.h
index 3ec5d5791..c0b272021 100644
--- a/src/filters/pointlight.h
+++ b/src/filters/pointlight.h
@@ -23,6 +23,12 @@
#define SP_IS_FEPOINTLIGHT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEPOINTLIGHT))
#define SP_IS_FEPOINTLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEPOINTLIGHT))
+/* Distant light class */
+
+
+class SPFePointLight;
+class SPFePointLightClass;
+
struct SPFePointLight : public SPObject {
/** x coordinate of the light source */
diff --git a/src/filters/specularlighting.h b/src/filters/specularlighting.h
index 4b31eb4c4..44bd98c6c 100644
--- a/src/filters/specularlighting.h
+++ b/src/filters/specularlighting.h
@@ -23,7 +23,7 @@
#define SP_IS_FESPECULARLIGHTING(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FESPECULARLIGHTING))
#define SP_IS_FESPECULARLIGHTING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FESPECULARLIGHTING))
-struct SVGICCColor;
+class SVGICCColor;
namespace Inkscape {
namespace Filters {
@@ -31,6 +31,8 @@ class FilterSpecularLighting;
}
}
+class SPFeSpecularLightingClass;
+
struct SPFeSpecularLighting : public SPFilterPrimitive {
gfloat surfaceScale;
guint surfaceScale_set : 1;
diff --git a/src/filters/spotlight.h b/src/filters/spotlight.h
index 1750ca95b..6e2463c08 100644
--- a/src/filters/spotlight.h
+++ b/src/filters/spotlight.h
@@ -23,6 +23,12 @@
#define SP_IS_FESPOTLIGHT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FESPOTLIGHT))
#define SP_IS_FESPOTLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FESPOTLIGHT))
+/* Distant light class */
+
+
+class SPFeSpotLight;
+class SPFeSpotLightClass;
+
struct SPFeSpotLight : public SPObject {
/** x coordinate of the light source */
diff --git a/src/filters/tile.h b/src/filters/tile.h
index 48a552fc8..a376a6e10 100644
--- a/src/filters/tile.h
+++ b/src/filters/tile.h
@@ -21,6 +21,8 @@
#define SP_IS_FETILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FETILE))
/* FeTile base class */
+class SPFeTileClass;
+
struct SPFeTile : public SPFilterPrimitive {
};
diff --git a/src/filters/turbulence.h b/src/filters/turbulence.h
index bad8315c1..cbc4fb082 100644
--- a/src/filters/turbulence.h
+++ b/src/filters/turbulence.h
@@ -24,6 +24,7 @@
#define SP_IS_FETURBULENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FETURBULENCE))
/* FeTurbulence base class */
+class SPFeTurbulenceClass;
struct SPFeTurbulence : public SPFilterPrimitive {
/** TURBULENCE ATTRIBUTES HERE */
diff --git a/src/flood-context.h b/src/flood-context.h
index 3e81cd01e..0cab0f7c5 100644
--- a/src/flood-context.h
+++ b/src/flood-context.h
@@ -29,6 +29,9 @@
#define FLOOD_COLOR_CHANNEL_B 4
#define FLOOD_COLOR_CHANNEL_A 8
+class SPFloodContext;
+class SPFloodContextClass;
+
struct SPFloodContext : public SPEventContext {
SPItem *item;
diff --git a/src/gradient-context.h b/src/gradient-context.h
index 464b95ad4..9c08677ae 100644
--- a/src/gradient-context.h
+++ b/src/gradient-context.h
@@ -25,6 +25,9 @@
#define SP_IS_GRADIENT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_GRADIENT_CONTEXT))
#define SP_IS_GRADIENT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_GRADIENT_CONTEXT))
+class SPGradientContext;
+class SPGradientContextClass;
+
struct SPGradientContext : public SPEventContext {
Geom::Point origin;
diff --git a/src/gradient-drag.h b/src/gradient-drag.h
index 2a2465590..cd76d8a3c 100644
--- a/src/gradient-drag.h
+++ b/src/gradient-drag.h
@@ -33,12 +33,12 @@ struct SPKnot;
class SPDesktop;
class SPCSSAttr;
-struct SPLinearGradient;
+class SPLinearGradient;
struct SPMeshGradient;
class SPItem;
class SPObject;
-struct SPRadialGradient;
-struct SPStop;
+class SPRadialGradient;
+class SPStop;
namespace Inkscape {
class Selection;
diff --git a/src/inkscape-private.h b/src/inkscape-private.h
index 09bcef12b..470a1f5bd 100644
--- a/src/inkscape-private.h
+++ b/src/inkscape-private.h
@@ -22,7 +22,7 @@
#include "inkscape.h"
-struct SPColor;
+class SPColor;
namespace Inkscape { class Selection; }
GType inkscape_get_type (void);
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 491acd73e..449220357 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -91,7 +91,7 @@ enum {
################################*/
namespace Inkscape {
-struct ApplicationClass;
+class ApplicationClass;
}
static void inkscape_class_init (Inkscape::ApplicationClass *klass);
diff --git a/src/libgdl/Makefile_insert b/src/libgdl/Makefile_insert
index e92223f0b..3f5228a20 100644
--- a/src/libgdl/Makefile_insert
+++ b/src/libgdl/Makefile_insert
@@ -44,14 +44,6 @@ libgdl/all: libgdl/libgdl.a
libgdl/clean:
rm -f libgdl/libgdl.a $(libgdl_gdl_a_OBJECTS)
-if CC_W_NO_SUPPORTED
-# Suppress some non-critical warnings for libgdl. We will drop our forked copy
-# of GDL once we upgrade to Gtk+ 3 so it's more important to minimise the number
-# of changes we make to GDL than to fix these minor issues in trunk.
-
-libgdl_libgdl_a_CFLAGS = -Wno-unused-parameter -Wno-sign-compare -Wno-unused-variable -Wno-unused-but-set-variable $(AM_CFLAGS)
-endif
-
libgdl_libgdl_a_SOURCES = \
libgdl/gdl-dock-object.h \
libgdl/gdl-dock-master.h \
diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp
index 0f853c681..1d086b57b 100644
--- a/src/libnrtype/Layout-TNG-Output.cpp
+++ b/src/libnrtype/Layout-TNG-Output.cpp
@@ -26,6 +26,7 @@ namespace Inkscape {
namespace Extension {
namespace Internal {
class CairoRenderContext;
+ class CairoGlyphInfo;
}
}
}
diff --git a/src/libnrtype/Layout-TNG.h b/src/libnrtype/Layout-TNG.h
index 0f5f08a53..488a974ea 100644
--- a/src/libnrtype/Layout-TNG.h
+++ b/src/libnrtype/Layout-TNG.h
@@ -36,7 +36,7 @@ using Inkscape::Extension::Internal::CairoRenderContext;
struct SPStyle;
class Shape;
-struct SPPrintContext;
+class SPPrintContext;
class SVGLength;
class Path;
class SPCurve;
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index 90900baba..712c17915 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -2,6 +2,7 @@
# include <config.h>
#endif
+#include <gtkmm.h>
#include <libnrtype/font-instance.h>
#include <libnrtype/TextWrapper.h>
#include <libnrtype/one-glyph.h>
diff --git a/src/livarot/Path.h b/src/livarot/Path.h
index a109298a2..cd939bf7d 100644
--- a/src/livarot/Path.h
+++ b/src/livarot/Path.h
@@ -14,11 +14,11 @@
#include <2geom/point.h>
struct PathDescr;
-struct PathDescrLineTo;
-struct PathDescrArcTo;
-struct PathDescrCubicTo;
-struct PathDescrBezierTo;
-struct PathDescrIntermBezierTo;
+class PathDescrLineTo;
+class PathDescrArcTo;
+class PathDescrCubicTo;
+class PathDescrBezierTo;
+class PathDescrIntermBezierTo;
struct SPStyle;
diff --git a/src/livarot/Shape.h b/src/livarot/Shape.h
index dcd172da2..1a804a48c 100644
--- a/src/livarot/Shape.h
+++ b/src/livarot/Shape.h
@@ -21,9 +21,9 @@
class Path;
class FloatLigne;
-class SweepTree;
-class SweepTreeList;
-class SweepEventQueue;
+struct SweepTree;
+struct SweepTreeList;
+struct SweepEventQueue;
enum {
tweak_mode_grow,
diff --git a/src/live_effects/lpe-bspline.cpp b/src/live_effects/lpe-bspline.cpp
index 785c545b5..b1e40655d 100644
--- a/src/live_effects/lpe-bspline.cpp
+++ b/src/live_effects/lpe-bspline.cpp
@@ -39,13 +39,18 @@
using Inkscape::DocumentUndo;
-
namespace Inkscape {
namespace LivePathEffect {
LPEBSpline::LPEBSpline(LivePathEffectObject *lpeobject) :
Effect(lpeobject)
{
+ Glib::ustring title = Glib::ustring(_("Ignore cusp nodes"));
+ Glib::ustring tip = Glib::ustring(_("Ignore cusp nodes"));
+ LPEBSpline::Gtk::Widget *noCusp = new LPEBSpline::newCheckButton(title,tip);
+ title = Glib::ustring(_("Unify weights:"));
+ tip = Glib::ustring(_("Percent of the with for all poinrs"));
+ LPEBSpline::Gtk::Widget *scal = new LPEBSpline::newScalar(title,tip);
}
LPEBSpline::~LPEBSpline()
@@ -239,25 +244,20 @@ Gtk::Widget *
LPEBSpline::newWidget()
{
Gtk::VBox * vbox = dynamic_cast<Gtk::VBox*>(Effect::newWidget());
- Glib::ustring title = Glib::ustring(_("Ignore cusp nodes"));
- Glib::ustring tip = Glib::ustring(_("Ignore cusp nodes"));
- this->setNoCuspWidget(this->newCheckButton(title));
- title = Glib::ustring(_("Unify weights:"));
- tip = Glib::ustring(_("Percent of the with for all poinrs"));
- this->setScalWidget(this->newScalar(title,tip));
vbox->set_border_width(5);
- vbox->pack_start(*this->getNoCuspWidget(), true, true,2);
- vbox->pack_start(*this->getScalWidget(),true,true,(guint)2);
+ vbox->pack_start(&noCusp,true,true,(guint)2);
+ vbox->pack_start(&scal, true, true,2);
return dynamic_cast<Gtk::VBox *> (vbox);
}
Gtk::Widget *
LPEBSpline::newScalar(Glib::ustring title, Glib::ustring tip)
{
- Inkscape::UI::Widget::Scalar * scal = Gtk::manage( new Inkscape::UI::Widget::Scalar(title, tip, 2));
- scal->setRange(0.01, 100.);
- scal->setIncrements(1., 5.);
+ scal = Gtk::manage( new Inkscape::UI::Widget::Scalar(title, tip));
scal->setValue(33.);
+ scal->setDigits(2);
+ scal->setIncrements(1., 5.);
+ scal->setRange(0, 100.);
scal->setProgrammatically = false;
scal->addSlider();
scal->signal_value_changed().connect(sigc::mem_fun (*this,&LPEBSpline::updateAllHandles));
@@ -265,20 +265,17 @@ LPEBSpline::newScalar(Glib::ustring title, Glib::ustring tip)
}
Gtk::Widget *
-LPEBSpline::newCheckButton(Glib::ustring title)
+LPEBSpline::newCheckButton(Glib::ustring title, Glib::ustring tip)
{
- Gtk::CheckButton * noCusp = Gtk::manage( new Gtk::CheckButton(title,true));
- noCusp->set_alignment(1.0,0.0);
+ noCusp = Gtk::manage( new Gtk::CheckButton(title,tip));
return dynamic_cast<Gtk::Widget *>(noCusp);
}
void
LPEBSpline::updateAllHandles()
{
- Inkscape::UI::Widget::Scalar * scal = dynamic_cast<Inkscape::UI::Widget::Scalar *>(this->getScalWidget());
- double value = scal->getValue()/100;
- Gtk::CheckButton * noCusp = dynamic_cast<Gtk::CheckButton *>(this->getNoCuspWidget());
- bool noCuspValue = noCusp->get_active();
+ double value = scal->setValue(33.);
+ bool noCusp = false;
SPDesktop *desktop = inkscape_active_desktop(); // TODO: Is there a better method to find the item's desktop?
Inkscape::Selection *selection = sp_desktop_selection(desktop);
for (GSList *items = (GSList *) selection->itemList();
@@ -291,7 +288,7 @@ LPEBSpline::updateAllHandles()
SPItem *item = (SPItem *) items->data;
SPPath *path = SP_PATH(item);
SPCurve *curve = path->get_curve_for_edit();
- LPEBSpline::doBSplineFromWidget(curve,value,noCuspValue);
+ LPEBSpline::doBSplineFromWidget(curve,value,noCusp);
gchar *str = sp_svg_write_path(curve->get_pathvector());
path->getRepr()->setAttribute("inkscape:original-d", str);
g_free(str);
@@ -313,8 +310,6 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double value , bool noCusp)
// Make copy of old path as it is changed during processing
Geom::PathVector const original_pathv = curve->get_pathvector();
curve->reset();
- using Geom::X;
- using Geom::Y;
//Recorremos todos los paths a los que queremos aplicar el efecto, hasta el penúltimo
for(Geom::PathVector::const_iterator path_it = original_pathv.begin(); path_it != original_pathv.end(); ++path_it) {
@@ -368,20 +363,16 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double value , bool noCusp)
if(cubic){
if(!noCusp || (*cubic)[1] != in->first_segment()->initialPoint())
pointAt1 = SBasisIn.valueAt(value);
- pointAt1 = Geom::Point(pointAt1[X] + 0.0625,pointAt1[Y] + 0.0625);
else
pointAt1 = in->first_segment()->initialPoint();
if(!noCusp || (*cubic)[2] != in->first_segment()->finalPoint())
pointAt2 = SBasisIn.valueAt(1-value);
- pointAt2 = Geom::Point(pointAt2[X] + 0.0625,pointAt2[Y] + 0.0625);
else
pointAt2 = in->first_segment()->finalPoint();
}else{
if(!noCusp){
pointAt1 = SBasisIn.valueAt(value);
- pointAt1 = Geom::Point(pointAt1[X] + 0.0625,pointAt1[Y] + 0.0625);
pointAt2 = SBasisIn.valueAt(1-value);
- pointAt2 = Geom::Point(pointAt2[X] + 0.0625,pointAt2[Y] + 0.0625);
}else{
pointAt1 = in->first_segment()->initialPoint();
pointAt2 = in->first_segment()->finalPoint();
@@ -400,20 +391,16 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double value , bool noCusp)
if(cubic){
if(!noCusp || (*cubic)[1] != out->first_segment()->initialPoint())
nextPointAt1 = SBasisOut.valueAt(value);
- nextPointAt1 = Geom::Point(nextPointAt1[X] + 0.0625,nextPointAt1[Y] + 0.0625);
else
nextPointAt1 = out->first_segment()->initialPoint();
if(!noCusp || (*cubic)[2] != out->first_segment()->finalPoint())
nextPointAt2 = SBasisOut.valueAt(1-value);
- nextPointAt2 = Geom::Point(nextPointAt2[X] + 0.0625,nextPointAt2[Y] + 0.0625);
else
nextPointAt2 = out->first_segment()->finalPoint();
}else{
if(!noCusp){
nextPointAt1 = SBasisOut.valueAt(value);
- nextPointAt1 = Geom::Point(nextPointAt1[X] + 0.0625,nextPointAt1[Y] + 0.0625);
nextPointAt2 = SBasisOut.valueAt(1-value);
- nextPointAt2 = Geom::Point(nextPointAt2[X] + 0.0625,nextPointAt2[Y] + 0.0625);
}else{
nextPointAt1 = out->first_segment()->initialPoint();
nextPointAt2 = out->first_segment()->finalPoint();
@@ -422,7 +409,6 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double value , bool noCusp)
nextPointAt3 = out->first_segment()->finalPoint();
out->reset();
delete out;
-
//La curva BSpline se forma calculando el centro del segmanto de unión
//de el punto situado en las 2/3 partes de el segmento de entrada
//con el punto situado en la posición 1/3 del segmento de salida
diff --git a/src/live_effects/lpe-bspline.h b/src/live_effects/lpe-bspline.h
index a0f1554d0..dbe0789f2 100644
--- a/src/live_effects/lpe-bspline.h
+++ b/src/live_effects/lpe-bspline.h
@@ -8,7 +8,9 @@
*/
#include "live_effects/effect.h"
-
+#include "live_effects/parameter/parameter.h"
+#include "ui/widget/scalar.h"
+#include <gtkmm/checkbutton.h>
namespace Inkscape {
namespace LivePathEffect {
@@ -16,13 +18,6 @@ namespace LivePathEffect {
class LPEBSpline : public Effect {
-
-private:
- double scalWidget;
- bool noCuspWidget;
- LPEBSpline(const LPEBSpline&);
- LPEBSpline& operator=(const LPEBSpline&);
-
public:
LPEBSpline(LivePathEffectObject *lpeobject);
virtual ~LPEBSpline();
@@ -35,22 +30,21 @@ public:
virtual void updateAllHandles();
- virtual Gtk::Widget* newScalar(Glib::ustring title, Glib::ustring tip);
+ virtual void newScalar(Glib::ustring title, Glib::ustring tip);
+
+ virtual void newCheckButton(Glib::ustring title, Glib::ustring tip);
- virtual Gtk::Widget* newCheckButton(Glib::ustring title);
virtual void doBSplineFromWidget(SPCurve * curve, double value, bool noCusp);
- virtual double getScal(){return scal;};
-
- virtual double setScal(double setScal){scal = setScal;};
-
- virtual bool getNoCusp(){return noCusp;};
-
- virtual bool setNoCusp(bool setNoCusp){noCusp = setNoCusp;};
-
- virtual Gtk::Widget* newWidget();
+ virtual Gtk::Widget * newWidget();
+
+private:
+ Gtk::Widget * scal;
+ Gtk::Widget * noCusp;
+ LPEBSpline(const LPEBSpline&);
+ LPEBSpline& operator=(const LPEBSpline&);
};
}; //namespace LivePathEffect
diff --git a/src/live_effects/lpe-recursiveskeleton.cpp b/src/live_effects/lpe-recursiveskeleton.cpp
index ac571d963..452139344 100644
--- a/src/live_effects/lpe-recursiveskeleton.cpp
+++ b/src/live_effects/lpe-recursiveskeleton.cpp
@@ -91,8 +91,7 @@ LPERecursiveSkeleton::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > co
double scaling = (uskeleton.domain().extent() - toffset)/pattBndsX->extent();
// TODO investigate why pattWidth is not being used:
- // - Doesn't appear to have been used anywhere in bzr history (Alex V: 2013-03-16)
- // double pattWidth = pattBndsX->extent() * scaling;
+ double pattWidth = pattBndsX->extent() * scaling;
if (scaling != 1.0) {
x*=scaling;
diff --git a/src/lpe-tool-context.h b/src/lpe-tool-context.h
index fb3a5d4e2..12e4b3838 100644
--- a/src/lpe-tool-context.h
+++ b/src/lpe-tool-context.h
@@ -24,6 +24,9 @@
#define SP_IS_LPETOOL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_LPETOOL_CONTEXT))
#define SP_IS_LPETOOL_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_LPETOOL_CONTEXT))
+class SPLPEToolContext;
+class SPLPEToolContextClass;
+
/* This is the list of subtools from which the toolbar of the LPETool is built automatically */
extern const int num_subtools;
diff --git a/src/marker.cpp b/src/marker.cpp
index 9717160ed..ba5cd4b05 100644
--- a/src/marker.cpp
+++ b/src/marker.cpp
@@ -324,13 +324,13 @@ static void sp_marker_update(SPObject *object, SPCtx *ctx, guint flags)
// Now set up viewbox transformation
// Determine actual viewbox in viewport coordinates
- // double x = 0;
- // double y = 0;
+ double x = 0;
+ double y = 0;
double width = 0;
double height = 0;
if (marker->aspect_align == SP_ASPECT_NONE) {
- // x = 0.0;
- // y = 0.0;
+ x = 0.0;
+ y = 0.0;
width = rctx.viewport.width();
height = rctx.viewport.height();
} else {
@@ -343,7 +343,7 @@ static void sp_marker_update(SPObject *object, SPCtx *ctx, guint flags)
height = (vb.height()) * scale;
// Now place viewbox to requested position
- /*switch (marker->aspect_align) {
+ switch (marker->aspect_align) {
case SP_ASPECT_XMIN_YMIN:
x = 0.0;
y = 0.0;
@@ -384,7 +384,7 @@ static void sp_marker_update(SPObject *object, SPCtx *ctx, guint flags)
x = 0.0;
y = 0.0;
break;
- }*/
+ }
}
// TODO fixme: all that work is done to figure out x and y, which are just ignored. Check why.
diff --git a/src/marker.h b/src/marker.h
index 147fafeb8..e8d2dd9a1 100644
--- a/src/marker.h
+++ b/src/marker.h
@@ -22,7 +22,9 @@
#define SP_MARKER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_MARKER, SPMarker))
#define SP_IS_MARKER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_MARKER))
-struct SPMarkerView;
+class SPMarker;
+class SPMarkerClass;
+class SPMarkerView;
#include <2geom/rect.h>
#include <2geom/affine.h>
diff --git a/src/measure-context.h b/src/measure-context.h
index b7673ad0d..baf74d30e 100644
--- a/src/measure-context.h
+++ b/src/measure-context.h
@@ -18,6 +18,9 @@
#define SP_MEASURE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_MEASURE_CONTEXT, SPMeasureContext))
#define SP_IS_MEASURE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_MEASURE_CONTEXT))
+class SPMeasureContext;
+class SPMeasureContextClass;
+
struct SPMeasureContext {
SPEventContext event_context;
SPCanvasItem *grabbed;
diff --git a/src/menus-skeleton.h b/src/menus-skeleton.h
index 694619089..868b606a4 100644
--- a/src/menus-skeleton.h
+++ b/src/menus-skeleton.h
@@ -252,7 +252,9 @@ static char const menus_skeleton[] =
" </submenu>\n"
" <submenu name=\"" N_("_Text") "\">\n"
" <verb verb-id=\"DialogText\" />\n"
+#ifdef ENABLE_SVG_FONTS
" <verb verb-id=\"DialogSVGFonts\" />\n"
+#endif // ENABLE_SVG_FONTS
" <verb verb-id=\"DialogGlyphs\" />\n"
" <separator/>\n"
" <verb verb-id=\"SelectionTextToPath\" />\n"
diff --git a/src/mesh-context.h b/src/mesh-context.h
index e5d06ec0a..ed93e404f 100644
--- a/src/mesh-context.h
+++ b/src/mesh-context.h
@@ -27,6 +27,9 @@
#define SP_IS_MESH_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_MESH_CONTEXT))
#define SP_IS_MESH_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_MESH_CONTEXT))
+class SPMeshContext;
+class SPMeshContextClass;
+
struct SPMeshContext : public SPEventContext {
Geom::Point origin;
diff --git a/src/pixmaps/cursor-dropper.xpm b/src/pixmaps/cursor-dropper.xpm
new file mode 100644
index 000000000..21f96edd0
--- /dev/null
+++ b/src/pixmaps/cursor-dropper.xpm
@@ -0,0 +1,38 @@
+/* XPM */
+static const char * cursor_dropper_xpm[] = {
+"32 32 3 1",
+" c None",
+". c #FFFFFF",
+"+ c #000000",
+" ... ",
+" .+. ",
+" .+. ",
+" .+. ",
+".... .... ",
+".+++ +++. ",
+".... .... ",
+" .+. ",
+" .+. .... ",
+" .+. .+++. ",
+" ... .+..+. ",
+" .++..+. ",
+" .++..+. ",
+" .++..+. ",
+" .++..+. . ",
+" .++..+.+. ",
+" .++..+++. ",
+" .++++.+. ",
+" .++++.+.. ",
+" .++++++.++. ",
+" .++++++..+. ",
+" ..+++++.+. ",
+" .++++++. ",
+" .+++++. ",
+" .+++. ",
+" ... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/src/rect-context.h b/src/rect-context.h
index 5b6c5373e..b6fbb6854 100644
--- a/src/rect-context.h
+++ b/src/rect-context.h
@@ -25,6 +25,9 @@
#define SP_IS_RECT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_RECT_CONTEXT))
#define SP_IS_RECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_RECT_CONTEXT))
+class SPRectContext;
+class SPRectContextClass;
+
struct SPRectContext : public SPEventContext {
SPItem *item;
Geom::Point center;
diff --git a/src/select-context.h b/src/select-context.h
index a6877f802..ce2039a2d 100644
--- a/src/select-context.h
+++ b/src/select-context.h
@@ -22,6 +22,8 @@
#define SP_IS_SELECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SELECT_CONTEXT))
struct SPCanvasItem;
+class SPSelectContext;
+class SPSelectContextClass;
namespace Inkscape {
class MessageContext;
diff --git a/src/selection.cpp b/src/selection.cpp
index 564f1fdd3..72f50137c 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -418,6 +418,7 @@ Geom::OptRect Selection::documentBounds(SPItem::BBoxType type) const
// will be returned; this is also the case in SelTrans::centerRequest()
boost::optional<Geom::Point> Selection::center() const {
GSList *items = (GSList *) const_cast<Selection *>(this)->itemList();
+ Geom::Point center;
if (items) {
SPItem *first = reinterpret_cast<SPItem*>(g_slist_last(items)->data); // from the first item in selection
if (first->isCenterSet()) { // only if set explicitly
diff --git a/src/seltrans-handles.h b/src/seltrans-handles.h
index 14f50d784..f625ebd68 100644
--- a/src/seltrans-handles.h
+++ b/src/seltrans-handles.h
@@ -21,7 +21,7 @@ namespace Inkscape
class SelTrans;
}
-struct SPSelTransHandle;
+class SPSelTransHandle;
// request handlers
gboolean sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans,
diff --git a/src/seltrans.h b/src/seltrans.h
index effc767e3..55c109ed7 100644
--- a/src/seltrans.h
+++ b/src/seltrans.h
@@ -30,7 +30,7 @@ struct SPKnot;
class SPDesktop;
struct SPCanvasItem;
struct SPCtrlLine;
-struct SPSelTransHandle;
+class SPSelTransHandle;
namespace Inkscape
{
diff --git a/src/snap.cpp b/src/snap.cpp
index 15f24ef53..695424194 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -500,6 +500,7 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed(
/* The current best metric for the best transformation; lower is better, Geom::infinity()
** means that we haven't snapped anything.
*/
+ Geom::Point best_scale_metric(Geom::infinity(), Geom::infinity());
Inkscape::SnappedPoint best_snapped_point;
g_assert(best_snapped_point.getAlwaysSnap() == false); // Check initialization of snapped point
g_assert(best_snapped_point.getAtIntersection() == false);
diff --git a/src/sp-clippath.h b/src/sp-clippath.h
index 17546c6d3..a77383c63 100644
--- a/src/sp-clippath.h
+++ b/src/sp-clippath.h
@@ -21,7 +21,7 @@
#define SP_IS_CLIPPATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_CLIPPATH))
#define SP_IS_CLIPPATH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_CLIPPATH))
-struct SPClipPathView;
+class SPClipPathView;
#include "sp-object-group.h"
#include "uri-references.h"
diff --git a/src/sp-desc.h b/src/sp-desc.h
index 41ef08020..8c5a8a663 100644
--- a/src/sp-desc.h
+++ b/src/sp-desc.h
@@ -17,6 +17,9 @@
#define SP_TYPE_DESC (sp_desc_get_type ())
#define SP_IS_DESC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_DESC))
+class SPDesc;
+class SPDescClass;
+
struct SPDesc : public SPObject {
};
diff --git a/src/sp-filter-primitive.h b/src/sp-filter-primitive.h
index f06df5611..60104047e 100644
--- a/src/sp-filter-primitive.h
+++ b/src/sp-filter-primitive.h
@@ -23,6 +23,8 @@
#define SP_IS_FILTER_PRIMITIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_FILTER_PRIMITIVE))
#define SP_IS_FILTER_PRIMITIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_FILTER_PRIMITIVE))
+class SPFilterPrimitive;
+class SPFilterPrimitiveClass;
namespace Inkscape {
namespace Filters {
class Filter;
diff --git a/src/sp-filter.h b/src/sp-filter.h
index 5afe47438..a3e7cd35c 100644
--- a/src/sp-filter.h
+++ b/src/sp-filter.h
@@ -36,7 +36,7 @@ class Filter;
} }
class SPFilterReference;
-struct SPFilterPrimitive;
+class SPFilterPrimitive;
struct ltstr {
bool operator()(const char* s1, const char* s2) const;
diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index 627907cef..a8de68f9b 100644
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
@@ -86,13 +86,15 @@ sp_flowregion_dispose(GObject *object)
group->computed.~vector<Shape*>();
}
-static void
-sp_flowregion_child_added(SPObject *object,
- Inkscape::XML::Node *child,
- Inkscape::XML::Node *ref)
+static void sp_flowregion_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
{
- SP_OBJECT_CLASS (sp_flowregion_parent_class)->child_added (object, child, ref);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ SP_ITEM(object);
+
+ if (((SPObjectClass *) (sp_flowregion_parent_class))->child_added) {
+ (* ((SPObjectClass *) (sp_flowregion_parent_class))->child_added) (object, child, ref);
+ }
+
+ object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
/* fixme: hide (Lauris) */
@@ -162,10 +164,10 @@ void SPFlowregion::UpdateComputed(void)
}
}
-static void
-sp_flowregion_modified(SPObject *object,
- guint flags)
+static void sp_flowregion_modified(SPObject *object, guint flags)
{
+ SP_FLOWREGION(object); // ensure it is the proper type.
+
if (flags & SP_OBJECT_MODIFIED_FLAG) {
flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
@@ -276,14 +278,15 @@ sp_flowregionexclude_dispose(GObject *object)
}
}
-static void
-sp_flowregionexclude_child_added(SPObject *object,
- Inkscape::XML::Node *child,
- Inkscape::XML::Node *ref)
+static void sp_flowregionexclude_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
{
- SP_OBJECT_CLASS (sp_flowregionexclude_parent_class)->child_added (object, child, ref);
+ SP_ITEM(object);
+
+ if (((SPObjectClass *) (sp_flowregionexclude_parent_class))->child_added) {
+ (* ((SPObjectClass *) (sp_flowregionexclude_parent_class))->child_added) (object, child, ref);
+ }
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
/* fixme: hide (Lauris) */
@@ -351,10 +354,10 @@ void SPFlowregionExclude::UpdateComputed(void)
}
}
-static void
-sp_flowregionexclude_modified(SPObject *object,
- guint flags)
+static void sp_flowregionexclude_modified(SPObject *object, guint flags)
{
+ SP_FLOWREGIONEXCLUDE(object); // Ensure it is the proper type
+
if (flags & SP_OBJECT_MODIFIED_FLAG) {
flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
diff --git a/src/sp-font-face.cpp b/src/sp-font-face.cpp
index 0a649b17f..4288a5d64 100644
--- a/src/sp-font-face.cpp
+++ b/src/sp-font-face.cpp
@@ -2,6 +2,8 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
+
/*
* SVG <font-face> element implementation
*
@@ -847,6 +849,7 @@ static Inkscape::XML::Node *sp_fontface_write(SPObject *object, Inkscape::XML::D
return repr;
}
+#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-font-face.h b/src/sp-font-face.h
index 968644556..57702b683 100644
--- a/src/sp-font-face.h
+++ b/src/sp-font-face.h
@@ -2,6 +2,7 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
#ifndef __SP_FONTFACE_H__
#define __SP_FONTFACE_H__
@@ -121,3 +122,4 @@ GType sp_fontface_get_type (void);
G_END_DECLS
#endif //#ifndef __SP_FONTFACE_H__
+#endif //#ifdef ENABLE_SVG_FONTS
diff --git a/src/sp-font.cpp b/src/sp-font.cpp
index a03890fc7..6ebbd5218 100644
--- a/src/sp-font.cpp
+++ b/src/sp-font.cpp
@@ -2,6 +2,8 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
+
/*
* SVG <font> element implementation
*
@@ -248,6 +250,7 @@ static Inkscape::XML::Node *sp_font_write(SPObject *object, Inkscape::XML::Docum
return repr;
}
+#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-glyph-kerning.cpp b/src/sp-glyph-kerning.cpp
index 10884fb81..652d965bb 100644
--- a/src/sp-glyph-kerning.cpp
+++ b/src/sp-glyph-kerning.cpp
@@ -2,6 +2,7 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
#define __SP_ANCHOR_C__
/*
@@ -266,6 +267,7 @@ static Inkscape::XML::Node *sp_glyph_kerning_write(SPObject *object, Inkscape::X
return repr;
}
+#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-glyph-kerning.h b/src/sp-glyph-kerning.h
index b7f733cad..ce9b4bb15 100644
--- a/src/sp-glyph-kerning.h
+++ b/src/sp-glyph-kerning.h
@@ -2,6 +2,7 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
#ifndef __SP_GLYPH_KERNING_H__
#define __SP_GLYPH_KERNING_H__
@@ -59,3 +60,4 @@ GType sp_glyph_kerning_h_get_type (void);
GType sp_glyph_kerning_v_get_type (void);
#endif //#ifndef __SP_GLYPH_KERNING_H__
+#endif //#ifdef ENABLE_SVG_FONTS
diff --git a/src/sp-glyph.cpp b/src/sp-glyph.cpp
index 0417ea8c1..e14ef8667 100644
--- a/src/sp-glyph.cpp
+++ b/src/sp-glyph.cpp
@@ -2,6 +2,7 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
#define __SP_GLYPH_C__
/*
@@ -283,6 +284,7 @@ static Inkscape::XML::Node *sp_glyph_write(SPObject *object, Inkscape::XML::Docu
return repr;
}
+#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-glyph.h b/src/sp-glyph.h
index 7556b0e25..316204c23 100644
--- a/src/sp-glyph.h
+++ b/src/sp-glyph.h
@@ -2,6 +2,7 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
#ifndef __SP_GLYPH_H__
#define __SP_GLYPH_H__
@@ -57,3 +58,4 @@ struct SPGlyphClass {
GType sp_glyph_get_type (void);
#endif //#ifndef __SP_GLYPH_H__
+#endif //#ifdef ENABLE_SVG_FONTS
diff --git a/src/sp-gradient.h b/src/sp-gradient.h
index 57ffa5570..a21a413f4 100644
--- a/src/sp-gradient.h
+++ b/src/sp-gradient.h
@@ -27,8 +27,8 @@
#include <stddef.h>
#include <sigc++/connection.h>
-class SPGradientReference;
-struct SPStop;
+struct SPGradientReference;
+class SPStop;
#define SP_TYPE_GRADIENT (SPGradient::getType())
#define SP_GRADIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_GRADIENT, SPGradient))
diff --git a/src/sp-image.h b/src/sp-image.h
index d6fc82a59..c657d0a2f 100644
--- a/src/sp-image.h
+++ b/src/sp-image.h
@@ -20,6 +20,9 @@
#define SP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_IMAGE))
#define SP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_IMAGE))
+class SPImage;
+class SPImageClass;
+
/* SPImage */
#include <gdk-pixbuf/gdk-pixbuf.h>
diff --git a/src/sp-item.h b/src/sp-item.h
index e65ffc829..a3ba1dbe2 100644
--- a/src/sp-item.h
+++ b/src/sp-item.h
@@ -28,8 +28,8 @@
#include "snap-candidate.h"
class SPGuideConstraint;
-class SPClipPathReference;
-class SPMaskReference;
+struct SPClipPathReference;
+struct SPMaskReference;
class SPAvoidRef;
struct SPPrintContext;
diff --git a/src/sp-linear-gradient-fns.h b/src/sp-linear-gradient-fns.h
index 14e575ebe..1bdf0b89e 100644
--- a/src/sp-linear-gradient-fns.h
+++ b/src/sp-linear-gradient-fns.h
@@ -14,7 +14,7 @@ class Node;
}
}
-struct SPLinearGradient;
+class SPLinearGradient;
#define SP_TYPE_LINEARGRADIENT (sp_lineargradient_get_type())
#define SP_LINEARGRADIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_LINEARGRADIENT, SPLinearGradient))
diff --git a/src/sp-mask.h b/src/sp-mask.h
index 97cf95ae1..e249e0c76 100644
--- a/src/sp-mask.h
+++ b/src/sp-mask.h
@@ -24,7 +24,9 @@
#define SP_IS_MASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_MASK))
#define SP_IS_MASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_MASK))
-struct SPMaskView;
+class SPMask;
+class SPMaskClass;
+class SPMaskView;
namespace Inkscape {
diff --git a/src/sp-metadata.cpp b/src/sp-metadata.cpp
index 79953b708..9978d0a3a 100644
--- a/src/sp-metadata.cpp
+++ b/src/sp-metadata.cpp
@@ -116,17 +116,15 @@ static void sp_metadata_release(SPObject *object)
/**
* Sets a specific value in the SPMetadata.
*/
-static void
-sp_metadata_set(SPObject *object,
- unsigned int key,
- const gchar *value)
+static void sp_metadata_set(SPObject *object, unsigned int key, const gchar *value)
{
debug("0x%08x %s(%u): '%s'",(unsigned int)object,
sp_attribute_name(key),key,value);
+ SP_METADATA(object); // ensures the object is of the proper type.
// see if any parents need this value
- if (SP_OBJECT_CLASS(sp_metadata_parent_class)->set) {
- SP_OBJECT_CLASS(sp_metadata_parent_class)->set(object, key, value);
+ if (reinterpret_cast<SPObjectClass *>(sp_metadata_parent_class)->set) {
+ reinterpret_cast<SPObjectClass *>(sp_metadata_parent_class)->set(object, key, value);
}
}
diff --git a/src/sp-metadata.h b/src/sp-metadata.h
index 454fd8d18..82b7c4fc5 100644
--- a/src/sp-metadata.h
+++ b/src/sp-metadata.h
@@ -21,6 +21,9 @@
#define SP_METADATA(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_METADATA, SPMetadata))
#define SP_IS_METADATA(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_METADATA))
+class SPMetadata;
+class SPMetadataClass;
+
struct SPMetadata : public SPObject {
};
diff --git a/src/sp-missing-glyph.cpp b/src/sp-missing-glyph.cpp
index 911c9be92..bdf993e5b 100644
--- a/src/sp-missing-glyph.cpp
+++ b/src/sp-missing-glyph.cpp
@@ -2,6 +2,8 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
+
/*
* SVG <missing-glyph> element implementation
*
@@ -162,6 +164,7 @@ static Inkscape::XML::Node *sp_missing_glyph_write(SPObject *object, Inkscape::X
return repr;
}
+#endif //#ifdef ENABLE_SVG_FONTS
/*
Local Variables:
mode:c++
diff --git a/src/sp-missing-glyph.h b/src/sp-missing-glyph.h
index 7930df513..0b3f74360 100644
--- a/src/sp-missing-glyph.h
+++ b/src/sp-missing-glyph.h
@@ -2,6 +2,7 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
#ifndef __SP_MISSING_GLYPH_H__
#define __SP_MISSING_GLYPH_H__
@@ -39,3 +40,4 @@ struct SPMissingGlyphClass {
GType sp_missing_glyph_get_type (void);
#endif //#ifndef __SP_MISSING_GLYPH_H__
+#endif //#ifdef ENABLE_SVG_FONTS
diff --git a/src/sp-object-group.cpp b/src/sp-object-group.cpp
index e2b601ab9..5158ec70a 100644
--- a/src/sp-object-group.cpp
+++ b/src/sp-object-group.cpp
@@ -93,6 +93,8 @@ sp_objectgroup_write(SPObject *object,
Inkscape::XML::Node *repr,
guint flags)
{
+ SP_OBJECTGROUP(object); // Ensure we have the right type of SPObject
+
if (flags & SP_OBJECT_WRITE_BUILD) {
if (!repr) {
repr = xml_doc->createElement("svg:g");
@@ -116,7 +118,7 @@ sp_objectgroup_write(SPObject *object,
}
if ((SP_OBJECT_CLASS(sp_objectgroup_parent_class))->write) {
- SP_OBJECT_CLASS(sp_objectgroup_parent_class)->write(object, xml_doc, repr, flags);
+ (SP_OBJECT_CLASS(sp_objectgroup_parent_class))->write(object, xml_doc, repr, flags);
}
return repr;
diff --git a/src/sp-object-repr.cpp b/src/sp-object-repr.cpp
index eba38ec67..cd332cd34 100644
--- a/src/sp-object-repr.cpp
+++ b/src/sp-object-repr.cpp
@@ -48,11 +48,13 @@
#include "sp-script.h"
#include "config.h"
-#include "sp-font.h"
-#include "sp-font-face.h"
-#include "sp-glyph.h"
-#include "sp-missing-glyph.h"
-#include "sp-glyph-kerning.h"
+#ifdef ENABLE_SVG_FONTS
+ #include "sp-font.h"
+ #include "sp-font-face.h"
+ #include "sp-glyph.h"
+ #include "sp-missing-glyph.h"
+ #include "sp-glyph-kerning.h"
+#endif
#include "sp-style-elem.h"
#include "sp-switch.h"
@@ -149,12 +151,14 @@ populate_dtables()
{ "svg:flowRegionExclude", SP_TYPE_FLOWREGIONEXCLUDE },
{ "svg:flowRoot", SP_TYPE_FLOWTEXT },
{ "svg:flowSpan", SP_TYPE_FLOWTSPAN },
+#ifdef ENABLE_SVG_FONTS
{ "svg:font", SP_TYPE_FONT },
{ "svg:font-face", SP_TYPE_FONTFACE },
{ "svg:glyph", SP_TYPE_GLYPH },
{ "svg:missing-glyph", SP_TYPE_MISSING_GLYPH },
{ "svg:hkern", SP_TYPE_HKERN },
{ "svg:vkern", SP_TYPE_VKERN },
+#endif
{ "svg:g", SP_TYPE_GROUP },
{ "svg:feBlend", SP_TYPE_FEBLEND },
{ "svg:feColorMatrix", SP_TYPE_FECOLORMATRIX },
diff --git a/src/sp-offset.h b/src/sp-offset.h
index 904f8607c..4e245f952 100644
--- a/src/sp-offset.h
+++ b/src/sp-offset.h
@@ -22,6 +22,8 @@
#define SP_IS_OFFSET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_OFFSET))
#define SP_IS_OFFSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_OFFSET))
+class SPOffset;
+class SPOffsetClass;
class SPUseReference;
/**
diff --git a/src/sp-pattern.h b/src/sp-pattern.h
index bcf8dd520..e0a7dce54 100644
--- a/src/sp-pattern.h
+++ b/src/sp-pattern.h
@@ -24,7 +24,8 @@
GType sp_pattern_get_type (void);
-struct SPPattern;
+class SPPattern;
+class SPPatternClass;
#include "svg/svg-length.h"
#include "sp-paint-server.h"
diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp
index 2922b66ed..e5d89a802 100644
--- a/src/sp-polyline.cpp
+++ b/src/sp-polyline.cpp
@@ -116,11 +116,10 @@ sp_polyline_set(SPObject *object, unsigned int key, const gchar *value)
}
static Inkscape::XML::Node*
-sp_polyline_write(SPObject *object,
- Inkscape::XML::Document *xml_doc,
- Inkscape::XML::Node *repr,
- guint flags)
+sp_polyline_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
{
+ SP_POLYLINE(object);
+
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
repr = xml_doc->createElement("svg:polyline");
}
@@ -129,7 +128,9 @@ sp_polyline_write(SPObject *object,
repr->mergeFrom(object->getRepr(), "id");
}
- SP_OBJECT_CLASS(sp_polyline_parent_class)->write (object, xml_doc, repr, flags);
+ if (((SPObjectClass *) (sp_polyline_parent_class))->write) {
+ ((SPObjectClass *) (sp_polyline_parent_class))->write (object, xml_doc, repr, flags);
+ }
return repr;
}
diff --git a/src/sp-radial-gradient-fns.h b/src/sp-radial-gradient-fns.h
index 43ed7bf03..912508a33 100644
--- a/src/sp-radial-gradient-fns.h
+++ b/src/sp-radial-gradient-fns.h
@@ -13,7 +13,7 @@ class Node;
}
}
-struct SPRadialGradient;
+class SPRadialGradient;
#define SP_TYPE_RADIALGRADIENT (sp_radialgradient_get_type())
#define SP_RADIALGRADIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_RADIALGRADIENT, SPRadialGradient))
diff --git a/src/sp-rect.h b/src/sp-rect.h
index 1127889c1..5e518dcd7 100644
--- a/src/sp-rect.h
+++ b/src/sp-rect.h
@@ -26,6 +26,9 @@ G_BEGIN_DECLS
#define SP_IS_RECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_RECT))
#define SP_IS_RECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_RECT))
+class SPRect;
+class SPRectClass;
+
struct SPRect : public SPShape {
SVGLength x;
SVGLength y;
diff --git a/src/sp-spiral.h b/src/sp-spiral.h
index 64cb8521b..6da7c38a4 100644
--- a/src/sp-spiral.h
+++ b/src/sp-spiral.h
@@ -29,6 +29,9 @@
#define SP_IS_SPIRAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SPIRAL))
#define SP_IS_SPIRAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SPIRAL))
+class SPSpiral;
+class SPSpiralClass;
+
/**
* A spiral Shape.
*
diff --git a/src/sp-star.h b/src/sp-star.h
index 888eeb8d2..bd271ccc0 100644
--- a/src/sp-star.h
+++ b/src/sp-star.h
@@ -16,12 +16,17 @@
#include "sp-polygon.h"
+
+
#define SP_TYPE_STAR (sp_star_get_type ())
#define SP_STAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_STAR, SPStar))
#define SP_STAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_STAR, SPStarClass))
#define SP_IS_STAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_STAR))
#define SP_IS_STAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_STAR))
+class SPStar;
+class SPStarClass;
+
typedef enum {
SP_STAR_POINT_KNOT1,
SP_STAR_POINT_KNOT2
diff --git a/src/sp-stop.h b/src/sp-stop.h
index b82dd0b13..c3b1e2753 100644
--- a/src/sp-stop.h
+++ b/src/sp-stop.h
@@ -14,6 +14,7 @@
#include "color.h"
class SPObjectClass;
+class SPColor;
struct SPStop;
struct SPStopClass;
diff --git a/src/sp-switch.h b/src/sp-switch.h
index 24a204731..f0442f27b 100644
--- a/src/sp-switch.h
+++ b/src/sp-switch.h
@@ -35,7 +35,7 @@ public:
CSwitch(SPGroup *group);
virtual ~CSwitch();
- friend struct SPSwitch;
+ friend class SPSwitch;
virtual void onChildAdded(Inkscape::XML::Node *child);
virtual void onChildRemoved(Inkscape::XML::Node *child);
diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp
index 989a5b7f3..d4db403e3 100644
--- a/src/sp-symbol.cpp
+++ b/src/sp-symbol.cpp
@@ -307,19 +307,19 @@ static void sp_symbol_update(SPObject *object, SPCtx *ctx, guint flags)
}
}
-static void
-sp_symbol_modified(SPObject *object,
- guint flags)
+static void sp_symbol_modified(SPObject *object, guint flags)
{
- SP_OBJECT_CLASS(sp_symbol_parent_class)->modified (object, flags);
+ SP_SYMBOL(object);
+
+ if (((SPObjectClass *) (sp_symbol_parent_class))->modified) {
+ (* ((SPObjectClass *) (sp_symbol_parent_class))->modified) (object, flags);
+ }
}
-static Inkscape::XML::Node *
-sp_symbol_write(SPObject *object,
- Inkscape::XML::Document *xml_doc,
- Inkscape::XML::Node *repr,
- guint flags)
+static Inkscape::XML::Node *sp_symbol_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
{
+ SP_SYMBOL(object);
+
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
repr = xml_doc->createElement("svg:symbol");
}
@@ -330,7 +330,9 @@ sp_symbol_write(SPObject *object,
//XML Tree being used directly here while it shouldn't be.
repr->setAttribute("preserveAspectRatio", object->getRepr()->attribute("preserveAspectRatio"));
- SP_OBJECT_CLASS(sp_symbol_parent_class)->write (object, xml_doc, repr, flags);
+ if (((SPObjectClass *) (sp_symbol_parent_class))->write) {
+ ((SPObjectClass *) (sp_symbol_parent_class))->write (object, xml_doc, repr, flags);
+ }
return repr;
}
@@ -402,14 +404,3 @@ static void sp_symbol_print(SPItem *item, SPPrintContext *ctx)
sp_print_release (ctx);
}
}
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/sp-symbol.h b/src/sp-symbol.h
index 10d642e8b..59f343285 100644
--- a/src/sp-symbol.h
+++ b/src/sp-symbol.h
@@ -21,6 +21,9 @@
#define SP_SYMBOL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_SYMBOL, SPSymbol))
#define SP_IS_SYMBOL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_SYMBOL))
+class SPSymbol;
+class SPSymbolClass;
+
#include <2geom/affine.h>
#include "svg/svg-length.h"
#include "enums.h"
diff --git a/src/sp-title.h b/src/sp-title.h
index d10d58188..a5f0a2fea 100644
--- a/src/sp-title.h
+++ b/src/sp-title.h
@@ -17,6 +17,9 @@
#define SP_TYPE_TITLE (sp_title_get_type ())
#define SP_IS_TITLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_TITLE))
+class SPTitle;
+class SPTitleClass;
+
struct SPTitle : public SPObject {
};
diff --git a/src/sp-tref.h b/src/sp-tref.h
index 33a8138d1..cc80e48a8 100644
--- a/src/sp-tref.h
+++ b/src/sp-tref.h
@@ -28,6 +28,9 @@
#define SP_IS_TREF(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_TREF))
#define SP_IS_TREF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_TREF))
+class SPTRef;
+class SPTRef;
+
struct SPTRef : public SPItem {
// Attributes that are used in the same way they would be in a tspan
TextTagAttributes attributes;
diff --git a/src/sp-use.h b/src/sp-use.h
index 3dd0726aa..399f30a4c 100644
--- a/src/sp-use.h
+++ b/src/sp-use.h
@@ -25,6 +25,8 @@
#define SP_IS_USE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_USE))
#define SP_IS_USE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_USE))
+class SPUse;
+class SPUseClass;
class SPUseReference;
struct SPUse : public SPItem {
diff --git a/src/spiral-context.h b/src/spiral-context.h
index 7f696dfa2..12c0b5d68 100644
--- a/src/spiral-context.h
+++ b/src/spiral-context.h
@@ -27,6 +27,9 @@
#define SP_IS_SPIRAL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SPIRAL_CONTEXT))
#define SP_IS_SPIRAL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SPIRAL_CONTEXT))
+class SPSpiralContext;
+class SPSpiralContextClass;
+
struct SPSpiralContext : public SPEventContext {
SPItem * item;
Geom::Point center;
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 2015ffd27..061d32554 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1369,18 +1369,48 @@ void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool
Inkscape::XML::Node *parent = item->getRepr()->parent();
float o_width = 0;
+ JoinType o_join = join_straight;
+ ButtType o_butt = butt_straight;
+ float o_miter = 0;
{
SPStyle *i_style = item->style;
+ int jointype = i_style->stroke_linejoin.value;
+ int captype = i_style->stroke_linecap.value;
o_width = i_style->stroke_width.computed;
+ if (jointype == SP_STROKE_LINEJOIN_MITER)
+ {
+ o_join = join_pointy;
+ }
+ else if (jointype == SP_STROKE_LINEJOIN_ROUND)
+ {
+ o_join = join_round;
+ }
+ else
+ {
+ o_join = join_straight;
+ }
+ if (captype == SP_STROKE_LINECAP_SQUARE)
+ {
+ o_butt = butt_square;
+ }
+ else if (captype == SP_STROKE_LINECAP_ROUND)
+ {
+ o_butt = butt_round;
+ }
+ else
+ {
+ o_butt = butt_straight;
+ }
+
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
o_width = prefs->getDouble("/options/defaultoffsetwidth/value", 1.0, "px");
}
- if (o_width < 0.01){
+ if (o_width < 0.01)
o_width = 0.01;
- }
+ o_miter = i_style->stroke_miterlimit.value * o_width;
}
Path *orig = Path_for_item(item, true, false);
@@ -1478,7 +1508,7 @@ void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool
// move to the saved position
repr->setPosition(pos > 0 ? pos : 0);
- SPItem *nitem = reinterpret_cast<SPItem *>(sp_desktop_document(desktop)->getObjectByRepr(repr));
+ SPItem *nitem = (SPItem *) sp_desktop_document(desktop)->getObjectByRepr(repr);
if ( !updating ) {
// delete original, apply the transform to the offset
diff --git a/src/spray-context.h b/src/spray-context.h
index 781bbcce8..64368c7a6 100644
--- a/src/spray-context.h
+++ b/src/spray-context.h
@@ -27,6 +27,9 @@
#define SP_IS_SPRAY_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_SPRAY_CONTEXT))
#define SP_IS_SPRAY_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_SPRAY_CONTEXT))
+class SPSprayContext;
+class SPSprayContextClass;
+
namespace Inkscape {
namespace UI {
namespace Dialog {
diff --git a/src/star-context.h b/src/star-context.h
index 4daafb3e4..7bcb26c41 100644
--- a/src/star-context.h
+++ b/src/star-context.h
@@ -25,6 +25,9 @@
#define SP_IS_STAR_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_STAR_CONTEXT))
#define SP_IS_STAR_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_STAR_CONTEXT))
+class SPStarContext;
+class SPStarContextClass;
+
struct SPStarContext : public SPEventContext {
SPItem *item;
Geom::Point center;
diff --git a/src/style.cpp b/src/style.cpp
index eef1c6ee5..650b08aea 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -63,7 +63,7 @@ using std::vector;
#define SP_CSS_FONT_SIZE_DEFAULT 12.0;
-struct SPStyleEnum;
+class SPStyleEnum;
/*#########################
## FORWARD DECLARATIONS
diff --git a/src/style.h b/src/style.h
index 0710f5c8e..1c8cb4774 100644
--- a/src/style.h
+++ b/src/style.h
@@ -134,6 +134,8 @@ struct SPILength {
#define SP_STYLE_FILL_SERVER(s) ((const_cast<SPStyle *> (s))->getFillPaintServer())
#define SP_STYLE_STROKE_SERVER(s) ((const_cast<SPStyle *> (s))->getStrokePaintServer())
+class SVGICCColor;
+
/// Paint type internal to SPStyle.
struct SPIPaint {
unsigned set : 1;
@@ -244,7 +246,7 @@ struct SPILengthOrNormal {
float computed;
};
-struct SPTextStyle;
+class SPTextStyle;
/// Stroke dash details.
class NRVpathDash {
diff --git a/src/svg-view-widget.h b/src/svg-view-widget.h
index eab5be75b..d489ccbdd 100644
--- a/src/svg-view-widget.h
+++ b/src/svg-view-widget.h
@@ -15,6 +15,8 @@
#include "ui/view/view-widget.h"
class SPDocument;
+class SPSVGSPViewWidget;
+class SPSVGSPViewWidgetClass;
#define SP_TYPE_SVG_VIEW_WIDGET (sp_svg_view_widget_get_type ())
#define SP_SVG_VIEW_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SVG_VIEW_WIDGET, SPSVGSPViewWidget))
diff --git a/src/svg-view.h b/src/svg-view.h
index 89f38ad34..aaaa8a9a5 100644
--- a/src/svg-view.h
+++ b/src/svg-view.h
@@ -13,7 +13,7 @@
#include "ui/view/view.h"
-struct SPCanvasGroup;
+class SPCanvasGroup;
struct SPCanvasItem;
diff --git a/src/svg/svg-color.h b/src/svg/svg-color.h
index b8e317e3b..d1c7bee03 100644
--- a/src/svg/svg-color.h
+++ b/src/svg/svg-color.h
@@ -3,7 +3,7 @@
#include <glib.h>
-struct SVGICCColor;
+class SVGICCColor;
guint32 sp_svg_read_color(gchar const *str, unsigned int dfl);
guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 def);
diff --git a/src/text-context.h b/src/text-context.h
index a33c69e0a..9915583eb 100644
--- a/src/text-context.h
+++ b/src/text-context.h
@@ -30,6 +30,8 @@
#define SP_IS_TEXT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_TEXT_CONTEXT))
struct SPCtrlLine;
+class SPTextContext;
+class SPTextContextClass;
struct SPTextContext : public SPEventContext {
diff --git a/src/text-editing.cpp b/src/text-editing.cpp
index 401f56bb2..47b4d35ac 100644
--- a/src/text-editing.cpp
+++ b/src/text-editing.cpp
@@ -69,7 +69,7 @@ void te_update_layout_now_recursive(SPItem *item)
if (SP_IS_GROUP(item)) {
GSList *item_list = sp_item_group_item_list(SP_GROUP(item));
for(GSList* elem = item_list; elem; elem = elem->next) {
- SPItem* list_item = static_cast<SPItem*>(elem->data);
+ SPItem* list_item = (SPItem*) elem->data;
te_update_layout_now_recursive(list_item);
}
g_slist_free(item_list);
diff --git a/src/trace/siox.cpp b/src/trace/siox.cpp
index 1a1426b83..9376fad66 100644
--- a/src/trace/siox.cpp
+++ b/src/trace/siox.cpp
@@ -591,7 +591,7 @@ bool SioxImage::writePPM(const std::string &fileName)
if (!f)
return false;
- fprintf(f, "P6 %u %u 255\n", width, height);
+ fprintf(f, "P6 %d %d 255\n", width, height);
for (unsigned int y=0 ; y<height; y++)
{
@@ -933,7 +933,7 @@ SioxImage Siox::extractForeground(const SioxImage &originalImage,
//trace("### bgSignature:%d", bgSignature.size());
- if (bgSignature.empty())
+ if (bgSignature.size() < 1)
{
// segmentation impossible
error("Signature size is < 1. Segmentation is impossible");
diff --git a/src/tweak-context.h b/src/tweak-context.h
index a4567ce6f..cb1cf301b 100644
--- a/src/tweak-context.h
+++ b/src/tweak-context.h
@@ -21,6 +21,9 @@
#define SP_IS_TWEAK_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_TWEAK_CONTEXT))
#define SP_IS_TWEAK_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_TWEAK_CONTEXT))
+class SPTweakContext;
+class SPTweakContextClass;
+
#define SAMPLING_SIZE 8 /* fixme: ?? */
#define TC_MIN_PRESSURE 0.0
diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp
index 993f48d8f..faba47769 100644
--- a/src/ui/dialog/dialog-manager.cpp
+++ b/src/ui/dialog/dialog-manager.cpp
@@ -53,7 +53,10 @@
#include "ui/dialog/export.h"
#include "ui/dialog/xml-tree.h"
#include "ui/dialog/clonetiler.h"
+
+#ifdef ENABLE_SVG_FONTS
#include "ui/dialog/svg-fonts-dialog.h"
+#endif // ENABLE_SVG_FONTS
namespace Inkscape {
namespace UI {
@@ -115,7 +118,9 @@ DialogManager::DialogManager() {
registerFactory("ObjectProperties", &create<ObjectProperties, FloatingBehavior>);
// registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, FloatingBehavior>);
registerFactory("Script", &create<ScriptDialog, FloatingBehavior>);
+#ifdef ENABLE_SVG_FONTS
registerFactory("SvgFontsDialog", &create<SvgFontsDialog, FloatingBehavior>);
+#endif
registerFactory("Swatches", &create<SwatchesPanel, FloatingBehavior>);
registerFactory("Symbols", &create<SymbolsDialog, FloatingBehavior>);
registerFactory("TileDialog", &create<TileDialog, FloatingBehavior>);
@@ -149,7 +154,9 @@ DialogManager::DialogManager() {
registerFactory("ObjectProperties", &create<ObjectProperties, DockBehavior>);
// registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, DockBehavior>);
registerFactory("Script", &create<ScriptDialog, DockBehavior>);
+#ifdef ENABLE_SVG_FONTS
registerFactory("SvgFontsDialog", &create<SvgFontsDialog, DockBehavior>);
+#endif
registerFactory("Swatches", &create<SwatchesPanel, DockBehavior>);
registerFactory("Symbols", &create<SymbolsDialog, DockBehavior>);
registerFactory("TileDialog", &create<TileDialog, DockBehavior>);
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index d335fb303..045b34814 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -792,6 +792,8 @@ void DocumentProperties::build_scripting()
_page_external_scripts->table().attach(_external_remove_btn, 2, 3, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 0, 0);
#endif
+ row++;
+
//# Set up the External Scripts box
_ExternalScriptsListStore = Gtk::ListStore::create(_ExternalScriptsListColumns);
_ExternalScriptsList.set_model(_ExternalScriptsListStore);
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 086e52a6c..603786742 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -22,21 +22,14 @@
#include <gtkmm/box.h>
#include <gtkmm/buttonbox.h>
-#include <gtkmm/dialog.h>
+#include <gtkmm/label.h>
+#include <gtkmm/widget.h>
+#include <gtkmm/togglebutton.h>
#include <gtkmm/entry.h>
#include <gtkmm/image.h>
-#include <gtkmm/label.h>
-#include <gtkmm/spinbutton.h>
-#include <gtkmm/stock.h>
#include <gtkmm/stockid.h>
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
-#include <gtkmm/togglebutton.h>
-#include <gtkmm/widget.h>
-
+#include <gtkmm/stock.h>
+#include <gtkmm/table.h>
#ifdef WITH_GNOME_VFS
# include <libgnomevfs/gnome-vfs-init.h> // gnome_vfs_initialized
#endif
@@ -133,15 +126,6 @@ namespace Inkscape {
namespace UI {
namespace Dialog {
-/** A list of strings that is used both in the preferences, and in the
- data fields to describe the various values of \c selection_type. */
-static const char * selection_names[SELECTION_NUMBER_OF] = {
- "page", "drawing", "selection", "custom"};
-
-/** The names on the buttons for the various selection types. */
-static const char * selection_labels[SELECTION_NUMBER_OF] = {
- N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")};
-
Export::Export (void) :
UI::Widget::Panel ("", "/dialogs/export/", SP_VERB_DIALOG_EXPORT),
current_key(SELECTION_PAGE),
diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h
index b10c98fd2..5dca9cfa5 100644
--- a/src/ui/dialog/export.h
+++ b/src/ui/dialog/export.h
@@ -14,12 +14,10 @@
#include <gtk/gtk.h>
#include <glibmm/i18n.h>
-
-#include <gtkmm/comboboxtext.h>
#include <gtkmm/expander.h>
#include <gtkmm/frame.h>
-#include <gtkmm/progressbar.h>
#include <gtkmm/textview.h>
+#include <gtkmm/comboboxtext.h>
#include "desktop.h"
#include "ui/dialog/desktop-tracker.h"
@@ -27,14 +25,11 @@
#include "ui/widget/button.h"
#include "ui/widget/entry.h"
-namespace Gtk {
-class Dialog;
-}
-
namespace Inkscape {
namespace UI {
namespace Dialog {
+
/** What type of button is being pressed */
enum selection_type {
SELECTION_PAGE = 0, /**< Export the whole page */
@@ -44,6 +39,16 @@ enum selection_type {
SELECTION_NUMBER_OF /**< A counter for the number of these guys */
};
+/** A list of strings that is used both in the preferences, and in the
+ data fields to describe the various values of \c selection_type. */
+static const char * selection_names[SELECTION_NUMBER_OF] = {
+ "page", "drawing", "selection", "custom"};
+
+/** The names on the buttons for the various selection types. */
+static const char * selection_labels[SELECTION_NUMBER_OF] = {
+ N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")};
+
+
/**
* A dialog widget to export to various image formats such as bitmap and png.
*
diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp
index 19b873d54..8de2da18b 100644
--- a/src/ui/dialog/fill-and-stroke.cpp
+++ b/src/ui/dialog/fill-and-stroke.cpp
@@ -132,24 +132,14 @@ void
FillAndStroke::_layoutPageFill()
{
fillWdgt = manage(sp_fill_style_widget_new());
-
-#if WITH_GTKMM_3_0
_page_fill->table().attach(*fillWdgt, 0, 0, 1, 1);
-#else
- _page_fill->table().attach(*fillWdgt, 0, 1, 0, 1);
-#endif
}
void
FillAndStroke::_layoutPageStrokePaint()
{
strokeWdgt = manage(sp_stroke_style_paint_widget_new());
-
-#if WITH_GTKMM_3_0
_page_stroke_paint->table().attach(*strokeWdgt, 0, 0, 1, 1);
-#else
- _page_stroke_paint->table().attach(*strokeWdgt, 0, 1, 0, 1);
-#endif
}
void
@@ -158,12 +148,7 @@ FillAndStroke::_layoutPageStrokeStyle()
//Gtk::Widget *strokeStyleWdgt = manage(Glib::wrap(sp_stroke_style_line_widget_new()));
//Gtk::Widget *strokeStyleWdgt = static_cast<Gtk::Widget *>(sp_stroke_style_line_widget_new());
strokeStyleWdgt = sp_stroke_style_line_widget_new();
-
-#if WITH_GTKMM_3_0
_page_stroke_style->table().attach(*strokeStyleWdgt, 0, 0, 1, 1);
-#else
- _page_stroke_style->table().attach(*strokeStyleWdgt, 0, 1, 0, 1);
-#endif
}
void
diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp
index def7b5bdb..d3ce99b00 100644
--- a/src/ui/dialog/find.cpp
+++ b/src/ui/dialog/find.cpp
@@ -15,10 +15,7 @@
#endif
#include "find.h"
-
-#include <gtkmm/entry.h>
#include <gtkmm/widget.h>
-
#include "verbs.h"
#include "message-stack.h"
@@ -59,7 +56,6 @@
#include "xml/attribute-record.h"
#include <glibmm/i18n.h>
-#include <glibmm/regex.h>
namespace Inkscape {
namespace UI {
diff --git a/src/ui/dialog/find.h b/src/ui/dialog/find.h
index 14d54b8d4..77a6c9d02 100644
--- a/src/ui/dialog/find.h
+++ b/src/ui/dialog/find.h
@@ -21,11 +21,7 @@
#include "ui/widget/entry.h"
#include "ui/widget/frame.h"
#include <glib.h>
-
-#include <gtkmm/box.h>
-#include <gtkmm/buttonbox.h>
-#include <gtkmm/expander.h>
-#include <gtkmm/label.h>
+#include <gtkmm.h>
#include "desktop.h"
#include "ui/dialog/desktop-tracker.h"
diff --git a/src/ui/dialog/glyphs.h b/src/ui/dialog/glyphs.h
index 3d0571244..6571af0a4 100644
--- a/src/ui/dialog/glyphs.h
+++ b/src/ui/dialog/glyphs.h
@@ -20,7 +20,7 @@ class Label;
class ListStore;
}
-struct SPFontSelector;
+class SPFontSelector;
class font_instance;
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index 801ab2922..de213ca85 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -20,11 +20,7 @@
#include <gtkmm/buttonbox.h>
#include <boost/scoped_ptr.hpp>
#include <glib.h>
-
#include <glibmm/i18n.h>
-#include <glibmm/main.h>
-#include <glibmm/timer.h>
-
#include <gtkmm/alignment.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/frame.h>
diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp
index 82e65435d..9c9f7faa3 100644
--- a/src/ui/dialog/input.cpp
+++ b/src/ui/dialog/input.cpp
@@ -17,9 +17,7 @@
#include <glib/gprintf.h>
#include <glibmm/i18n.h>
-
#include <gtkmm/alignment.h>
-#include <gtkmm/buttonbox.h>
#include <gtkmm/cellrenderercombo.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/comboboxtext.h>
diff --git a/src/ui/dialog/layer-properties.h b/src/ui/dialog/layer-properties.h
index 0e2f8ed94..9de303f89 100644
--- a/src/ui/dialog/layer-properties.h
+++ b/src/ui/dialog/layer-properties.h
@@ -80,9 +80,9 @@ protected:
void perform(LayerPropertiesDialog &dialog);
};
- friend struct Rename;
- friend struct Create;
- friend struct Move;
+ friend class Rename;
+ friend class Create;
+ friend class Move;
Strategy *_strategy;
SPDesktop *_desktop;
diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp
index 8a2b0299a..114204961 100644
--- a/src/ui/dialog/object-properties.cpp
+++ b/src/ui/dialog/object-properties.cpp
@@ -38,12 +38,6 @@
#include "sp-item.h"
#include <glibmm/i18n.h>
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
-
namespace Inkscape {
namespace UI {
diff --git a/src/ui/dialog/object-properties.h b/src/ui/dialog/object-properties.h
index 624a18246..b49293ea1 100644
--- a/src/ui/dialog/object-properties.h
+++ b/src/ui/dialog/object-properties.h
@@ -35,8 +35,6 @@
#include "ui/widget/panel.h"
#include "ui/widget/frame.h"
-
-#include <gtkmm/checkbutton.h>
#include <gtkmm/entry.h>
#include <gtkmm/expander.h>
#include <gtkmm/frame.h>
@@ -48,14 +46,6 @@ class SPAttributeTable;
class SPDesktop;
class SPItem;
-namespace Gtk {
-#if WITH_GTKMM_3_0
-class Grid;
-#else
-class Table;
-#endif
-}
-
namespace Inkscape {
namespace UI {
namespace Dialog {
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index bce63093d..0da39dd73 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -15,6 +15,8 @@
# include <config.h>
#endif
+#ifdef ENABLE_SVG_FONTS
+
#include "svg-fonts-dialog.h"
#include "document-private.h"
#include "document-undo.h"
@@ -943,6 +945,8 @@ SvgFontsDialog::~SvgFontsDialog(){}
} // namespace UI
} // namespace Inkscape
+#endif //#ifdef ENABLE_SVG_FONTS
+
/*
Local Variables:
mode:c++
diff --git a/src/ui/dialog/svg-fonts-dialog.h b/src/ui/dialog/svg-fonts-dialog.h
index 01f70654a..9be984820 100644
--- a/src/ui/dialog/svg-fonts-dialog.h
+++ b/src/ui/dialog/svg-fonts-dialog.h
@@ -34,8 +34,8 @@ class HScale;
#endif
}
-struct SPGlyph;
-struct SPGlyphKerning;
+class SPGlyph;
+class SPGlyphKerning;
class SvgFont;
class SvgFontDrawingArea : Gtk::DrawingArea{
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index 67c6578f9..a71227861 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -57,7 +57,6 @@ extern "C" {
#include "widgets/icon.h"
#include "widgets/font-selector.h"
#include <glibmm/i18n.h>
-#include <glibmm/markup.h>
#include "unit-constants.h"
diff --git a/src/ui/dialog/text-edit.h b/src/ui/dialog/text-edit.h
index f27fdfc87..3fdeea05d 100644
--- a/src/ui/dialog/text-edit.h
+++ b/src/ui/dialog/text-edit.h
@@ -30,7 +30,7 @@
#include "ui/dialog/desktop-tracker.h"
class SPItem;
-struct SPFontSelector;
+class SPFontSelector;
class font_instance;
class SPCSSAttr;
diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp
index bd467555e..1ad827a56 100644
--- a/src/ui/dialog/tracedialog.cpp
+++ b/src/ui/dialog/tracedialog.cpp
@@ -20,7 +20,6 @@
#include <gtkmm/frame.h>
#include "ui/widget/spinbutton.h"
#include "ui/widget/frame.h"
-#include <gtkmm/radiobutton.h>
#include <gtkmm/stock.h>
#include <gtk/gtk.h> //for GTK_RESPONSE* types
diff --git a/src/ui/dialog/xml-tree.h b/src/ui/dialog/xml-tree.h
index 58ef3aef8..0a6e3a786 100644
--- a/src/ui/dialog/xml-tree.h
+++ b/src/ui/dialog/xml-tree.h
@@ -29,7 +29,7 @@
#include "message.h"
class SPDesktop;
-class SPObject;
+struct SPObject;
struct SPXMLViewAttrList;
struct SPXMLViewContent;
struct SPXMLViewTree;
diff --git a/src/ui/tool/control-point.cpp b/src/ui/tool/control-point.cpp
index 069dcc67b..8c4924f26 100644
--- a/src/ui/tool/control-point.cpp
+++ b/src/ui/tool/control-point.cpp
@@ -7,8 +7,8 @@
*/
#include <iostream>
-#include <gdk/gdkkeysyms.h>
#include <gdkmm.h>
+#include <gtkmm.h>
#include <2geom/point.h>
#include "desktop.h"
#include "desktop-handles.h"
diff --git a/src/ui/tool/node-tool.h b/src/ui/tool/node-tool.h
index bc5267bb2..49b1496d4 100644
--- a/src/ui/tool/node-tool.h
+++ b/src/ui/tool/node-tool.h
@@ -25,6 +25,9 @@
#define INK_IS_NODE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INK_TYPE_NODE_TOOL))
#define INK_IS_NODE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INK_TYPE_NODE_TOOL))
+class InkNodeTool;
+class InkNodeToolClass;
+
namespace Inkscape {
namespace Display {
diff --git a/src/ui/tool/path-manipulator.h b/src/ui/tool/path-manipulator.h
index 8bc097ed6..a235a3b05 100644
--- a/src/ui/tool/path-manipulator.h
+++ b/src/ui/tool/path-manipulator.h
@@ -22,7 +22,7 @@
struct SPCanvasItem;
class SPCurve;
-class SPPath;
+struct SPPath;
namespace Inkscape {
namespace XML { class Node; }
diff --git a/src/ui/widget/entry.cpp b/src/ui/widget/entry.cpp
index 64d28119a..173e014d9 100644
--- a/src/ui/widget/entry.cpp
+++ b/src/ui/widget/entry.cpp
@@ -13,8 +13,6 @@
#include "entry.h"
-#include <gtkmm/entry.h>
-
namespace Inkscape {
namespace UI {
namespace Widget {
diff --git a/src/ui/widget/entry.h b/src/ui/widget/entry.h
index de5cceadd..53b848fc9 100644
--- a/src/ui/widget/entry.h
+++ b/src/ui/widget/entry.h
@@ -11,10 +11,10 @@
#define INKSCAPE_UI_WIDGET_ENTRY__H
#include "labelled.h"
+#include <gtkmm.h>
-namespace Gtk {
-class Entry;
-}
+#include <gtkmm/entry.h>
+#include <gtkmm/comboboxtext.h>
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h
index a04666651..cf736d8a1 100644
--- a/src/ui/widget/frame.h
+++ b/src/ui/widget/frame.h
@@ -10,9 +10,11 @@
#ifndef INKSCAPE_UI_WIDGET_FRAME_H
#define INKSCAPE_UI_WIDGET_FRAME_H
-#include <gtkmm/alignment.h>
-#include <gtkmm/frame.h>
-#include <gtkmm/label.h>
+#include <gtkmm.h>
+
+namespace Gtk {
+class Frame;
+}
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h
index fa35b815e..2a7843a51 100644
--- a/src/ui/widget/registered-widget.h
+++ b/src/ui/widget/registered-widget.h
@@ -32,7 +32,7 @@
#include <gtkmm/checkbutton.h>
-struct SPUnit;
+class SPUnit;
class SPDocument;
namespace Gtk {
diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h
index 9b78cb17f..6d5222429 100644
--- a/src/ui/widget/selected-style.h
+++ b/src/ui/widget/selected-style.h
@@ -40,7 +40,7 @@
#include "helper/units.h"
class SPDesktop;
-struct SPUnit;
+class SPUnit;
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h
index d7bab3732..2b9c32b2e 100644
--- a/src/ui/widget/style-swatch.h
+++ b/src/ui/widget/style-swatch.h
@@ -26,7 +26,7 @@
#include "button.h"
#include "preferences.h"
-struct SPUnit;
+class SPUnit;
struct SPStyle;
class SPCSSAttr;
diff --git a/src/undo-stack-observer.h b/src/undo-stack-observer.h
index 1057ace8f..f4d67e841 100644
--- a/src/undo-stack-observer.h
+++ b/src/undo-stack-observer.h
@@ -14,7 +14,7 @@
namespace Inkscape {
-struct Event;
+class Event;
/**
* Observes changes made to the undo and redo stacks.
diff --git a/src/widgets/gradient-vector.h b/src/widgets/gradient-vector.h
index 6719691d1..1ed6c6c46 100644
--- a/src/widgets/gradient-vector.h
+++ b/src/widgets/gradient-vector.h
@@ -33,7 +33,7 @@
class SPDocument;
class SPObject;
class SPGradient;
-struct SPStop;
+class SPStop;
struct SPGradientVectorSelector {
GtkVBox vbox;
diff --git a/src/widgets/paint-selector.h b/src/widgets/paint-selector.h
index a66758434..d3b3f4116 100644
--- a/src/widgets/paint-selector.h
+++ b/src/widgets/paint-selector.h
@@ -22,7 +22,7 @@
class SPGradient;
class SPDesktop;
-struct SPPattern;
+class SPPattern;
struct SPStyle;
#define SP_TYPE_PAINT_SELECTOR (sp_paint_selector_get_type ())
diff --git a/src/widgets/swatch-selector.h b/src/widgets/swatch-selector.h
index 4b7aa483f..b97aac4f1 100644
--- a/src/widgets/swatch-selector.h
+++ b/src/widgets/swatch-selector.h
@@ -1,12 +1,14 @@
#ifndef SEEN_SP_SWATCH_SELECTOR_H
#define SEEN_SP_SWATCH_SELECTOR_H
+
+
#include <gtkmm/box.h>
class SPDocument;
class SPGradient;
-struct SPColorSelector;
-struct SPGradientSelector;
+class SPColorSelector;
+class SPGradientSelector;
namespace Inkscape
{
diff --git a/src/xml/composite-node-observer.h b/src/xml/composite-node-observer.h
index 3e4b1673a..96825d607 100644
--- a/src/xml/composite-node-observer.h
+++ b/src/xml/composite-node-observer.h
@@ -23,7 +23,7 @@ namespace Inkscape {
namespace XML {
-struct NodeEventVector;
+class NodeEventVector;
/**
* @brief An observer that relays notifications to multiple other observers
diff --git a/src/zoom-context.h b/src/zoom-context.h
index c09b5a1b3..e36dc3fbe 100644
--- a/src/zoom-context.h
+++ b/src/zoom-context.h
@@ -19,6 +19,9 @@
#define SP_ZOOM_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_ZOOM_CONTEXT, SPZoomContext))
#define SP_IS_ZOOM_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_ZOOM_CONTEXT))
+class SPZoomContext;
+class SPZoomContextClass;
+
struct SPZoomContext {
SPEventContext event_context;
SPCanvasItem *grabbed;