diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-07-29 14:51:39 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-07-29 14:51:39 +0000 |
| commit | 78b970a0a036f78cfd491553b49ffa00214f7a64 (patch) | |
| tree | 18e737c865450e590297c086a8fc17a0ede8d833 /src/knot-holder-entity.h | |
| parent | Remove superfluous functions (diff) | |
| download | inkscape-78b970a0a036f78cfd491553b49ffa00214f7a64.tar.gz inkscape-78b970a0a036f78cfd491553b49ffa00214f7a64.zip | |
Rename isLPEParam() to isDeletable(), create new class LPEKnotHolderEntity and make inheritance from it a bit less clumsy
(bzr r6448)
Diffstat (limited to 'src/knot-holder-entity.h')
| -rw-r--r-- | src/knot-holder-entity.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/knot-holder-entity.h b/src/knot-holder-entity.h index 9cdc908de..e0d0ca8e8 100644 --- a/src/knot-holder-entity.h +++ b/src/knot-holder-entity.h @@ -41,10 +41,11 @@ 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 */ - // TODO: purge this now that PointParams are not KnotHolderEntities any more! - virtual bool isLPEParam() { return false; } + /* derived classes used for LPE knotholder handles use this to indicate that they + must not be deleted when a knotholder is destroyed */ + // TODO: it would be nice to ditch this but then we need to dynamically create instances of different + // KnotHolderEntity classes in Effect::addKnotHolderEntities. How to do this??? + virtual bool isDeletable() { return true; } /* the get/set/click handlers are virtual functions; each handler class for a knot should be derived from KnotHolderEntity and override these functions */ @@ -75,6 +76,11 @@ public: sigc::connection _ungrabbed_connection; }; +// derived KnotHolderEntity class for LPEs +class LPEKnotHolderEntity : public KnotHolderEntity { + virtual bool isDeletable() { return false; } +}; + /* pattern manipulation */ class PatternKnotHolderEntityXY : public KnotHolderEntity { |
