summaryrefslogtreecommitdiffstats
path: root/src/sp-shape.h
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2012-08-18 00:53:06 +0000
committerMarkus Engel <markus.engel@tum.de>2012-08-18 00:53:06 +0000
commitc849e4b8aaffdb80a32b29bfda1df21d00b468eb (patch)
tree58974ed742ec4744e04f4eeb9596ce5b5f5b7e2c /src/sp-shape.h
parentAdded "virtual pad" to SPLPEItem. (diff)
downloadinkscape-c849e4b8aaffdb80a32b29bfda1df21d00b468eb.tar.gz
inkscape-c849e4b8aaffdb80a32b29bfda1df21d00b468eb.zip
Added "virtual pad" to SPShape.
(bzr r11608.1.4)
Diffstat (limited to 'src/sp-shape.h')
-rw-r--r--src/sp-shape.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/sp-shape.h b/src/sp-shape.h
index 453750946..7459b2f90 100644
--- a/src/sp-shape.h
+++ b/src/sp-shape.h
@@ -32,12 +32,15 @@
class SPDesktop;
namespace Inkscape { class DrawingItem; }
+class CShape;
/**
* Base class for shapes, including <path> element
*/
class SPShape : public SPLPEItem {
public:
+ CShape* cshape;
+
static GType getType (void);
void setShape ();
SPCurve * getCurve () const;
@@ -79,6 +82,7 @@ private:
friend class SPShapeClass;
+ friend class CShape;
};
class SPShapeClass {
@@ -95,6 +99,35 @@ private:
friend class SPShape;
};
+
+class CShape : public CLPEItem {
+public:
+ CShape(SPShape* shape);
+ virtual ~CShape();
+
+ virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr);
+ virtual void onRelease();
+ virtual void onUpdate(SPCtx* ctx, guint flags);
+ virtual void onModified(unsigned int flags);
+
+ virtual void onSet(unsigned int key, gchar const* value);
+ virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+
+ virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype);
+ virtual void onPrint(SPPrintContext* ctx);
+
+ virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
+ virtual void onHide(unsigned int key);
+
+ virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs);
+
+ virtual void onSetShape();
+
+protected:
+ SPShape* spshape;
+};
+
+
void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value);
Geom::Affine sp_shape_marker_get_transform(Geom::Curve const & c1, Geom::Curve const & c2);