summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.h
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-06-08 17:33:58 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-06-08 17:33:58 +0000
commitad092a3d734fcec79273f957e8d86c7a9ceb767b (patch)
treed1df1e2ac1ae259e7d8958990011fc3cba69d59a /src/knot-holder-entity.h
parentAdd 'Mode' label and icon for regular Bezier mode in pen/pencil toolbar (diff)
downloadinkscape-ad092a3d734fcec79273f957e8d86c7a9ceb767b.tar.gz
inkscape-ad092a3d734fcec79273f957e8d86c7a9ceb767b.zip
Make knotholders for LPE items finally work; each effect can now overload the addKnotHolderHandles() method to add handles which control its parameters.
There is now also a virtual onKnotUngrabbed() method for each knotholder entity which can be used to do cleanup tasks (for LPE parameters it currently writes the value to SVG, although this should probably happen automatically) (bzr r5855)
Diffstat (limited to '')
-rw-r--r--src/knot-holder-entity.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/knot-holder-entity.h b/src/knot-holder-entity.h
index 5c273fe29..f0862c874 100644
--- a/src/knot-holder-entity.h
+++ b/src/knot-holder-entity.h
@@ -43,11 +43,17 @@ public:
SPKnotModeType mode = SP_KNOT_MODE_XOR,
guint32 color = 0xffffff00);
+ /* derived classes like PointParam for LPEs use this, e.g., to indicate that we must not call
+ delete on their pointer when a knotholder is destroyed */
+ virtual bool isLPEParam() { return false; }
+
/* the get/set/click handlers are virtual functions; each handler class for a knot
should be derived from KnotHolderEntity and override these functions */
virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state) = 0;
virtual NR::Point knot_get() = 0;
virtual void knot_click(guint /*state*/) {}
+ virtual void onKnotUngrabbed() {} // this is called 'manually' from KnotHolder; would it be
+ // more efficient to establish another signal connection?
void update_knot();