summaryrefslogtreecommitdiffstats
path: root/src/svg-view.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/svg-view.h')
-rw-r--r--src/svg-view.h58
1 files changed, 38 insertions, 20 deletions
diff --git a/src/svg-view.h b/src/svg-view.h
index 838a95b03..aaaa8a9a5 100644
--- a/src/svg-view.h
+++ b/src/svg-view.h
@@ -1,9 +1,6 @@
-#ifndef __SP_SVG_VIEW_H__
-#define __SP_SVG_VIEW_H__
-
-/** \file
- * SPSVGView, SPSVGSPViewWidget: Generic SVG view and widget
- *
+#ifndef SEEN_SP_SVG_VIEW_H
+#define SEEN_SP_SVG_VIEW_H
+/*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Ralf Stephan <ralf@ark.in-berlin.de>
@@ -17,7 +14,7 @@
#include "ui/view/view.h"
class SPCanvasGroup;
-class SPCanvasItem;
+struct SPCanvasItem;
/**
@@ -36,32 +33,53 @@ public:
gdouble _height;
- SPSVGView (SPCanvasGroup* parent);
+ /**
+ * Constructs new SPSVGView object and returns pointer to it.
+ */
+ SPSVGView(SPCanvasGroup* parent);
+
virtual ~SPSVGView();
- /// Rescales SPSVGView to given proportions.
- void setScale (gdouble hscale, gdouble vscale);
+ /**
+ * Rescales SPSVGView to given proportions.
+ */
+ void setScale(gdouble hscale, gdouble vscale);
- /// Rescales SPSVGView and keeps aspect ratio.
- void setRescale (bool rescale, bool keepaspect, gdouble width, gdouble height);
+ /**
+ * Rescales SPSVGView and keeps aspect ratio.
+ */
+ void setRescale(bool rescale, bool keepaspect, gdouble width, gdouble height);
- void doRescale (bool event);
+ /**
+ * Helper function that sets rescale ratio and emits resize event.
+ */
+ void doRescale(bool event);
+
+ /**
+ * Callback connected with set_document signal.
+ */
+ virtual void setDocument(SPDocument *document);
- virtual void setDocument (SPDocument*);
virtual void mouseover();
+
virtual void mouseout();
+
virtual bool shutdown() { return true; }
private:
- virtual void onPositionSet (double, double) {}
- virtual void onResized (double, double) {}
+ virtual void onPositionSet(double, double) {}
+ virtual void onResized(double, double) {}
virtual void onRedrawRequested() {}
- virtual void onStatusMessage (Inkscape::MessageType /*type*/, gchar const */*message*/) {}
- virtual void onDocumentURISet (gchar const* /*uri*/) {}
- virtual void onDocumentResized (double, double);
+ virtual void onStatusMessage(Inkscape::MessageType /*type*/, gchar const */*message*/) {}
+ virtual void onDocumentURISet(gchar const* /*uri*/) {}
+
+ /**
+ * Callback connected with document_resized signal.
+ */
+ virtual void onDocumentResized(double, double);
};
-#endif
+#endif // SEEN_SP_SVG_VIEW_H
/*
Local Variables: