From c849e4b8aaffdb80a32b29bfda1df21d00b468eb Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 18 Aug 2012 02:53:06 +0200 Subject: Added "virtual pad" to SPShape. (bzr r11608.1.4) --- src/sp-shape.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/sp-shape.h') 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 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 &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); -- cgit v1.2.3