Code

Remove remnants of old node tool
authorKrzysztof Kosiński <tweenk.pl@gmail.com>
Thu, 24 Dec 2009 02:35:23 +0000 (03:35 +0100)
committerKrzysztof Kosiński <tweenk.pl@gmail.com>
Thu, 24 Dec 2009 02:35:23 +0000 (03:35 +0100)
12 files changed:
src/Makefile_insert
src/doxygen-main.cpp
src/live_effects/effect.cpp
src/live_effects/lpe-constructgrid.cpp
src/live_effects/lpe-gears.cpp
src/live_effects/lpe-lattice.cpp
src/live_effects/lpe-spiro.cpp
src/live_effects/lpe-vonkoch.cpp
src/live_effects/parameter/path.cpp
src/lpe-tool-context.cpp
src/shape-editor.cpp
src/shape-editor.h

index dfc9daf96695a3687a4400043e0c8fbd88106248..ad72f5586100b1d19c3401c7028435f15eca5114 100644 (file)
@@ -100,8 +100,6 @@ ink_common_sources +=       \
        message-stack.cpp message-stack.h                               \
        mod360.cpp mod360.h                                             \
        modifier-fns.h                                                  \
-       node-context.cpp node-context.h                                 \
-       nodepath.cpp nodepath.h                                         \
        object-edit.cpp object-edit.h                                   \
        object-hierarchy.cpp object-hierarchy.h                         \
        object-snapper.cpp object-snapper.h                             \
index fd8f4bb1a2e5c1abccb75c56bd1856a1d45ecd41..c6a6bb3ab6fb01cf9a13b898f2fd98c8c1f9ca22 100644 (file)
@@ -224,7 +224,7 @@ namespace XML {}
  *         - SPEllipse
  *       - SPLine [\ref sp-line.cpp, \ref sp-line.h]
  *       - SPOffset [\ref sp-offset.cpp, \ref sp-offset.h]
- *       - SPPath [\ref sp-path.cpp, \ref sp-path.h, \ref path-chemistry.cpp, \ref nodepath.cpp, \ref nodepath.h, \ref splivarot.cpp]
+ *       - SPPath [\ref sp-path.cpp, \ref sp-path.h, \ref path-chemistry.cpp, \ref splivarot.cpp]
  *       - SPPolygon [\ref sp-polygon.cpp, \ref sp-polygon.h]
  *         - SPStar [\ref sp-star.cpp, \ref sp-star.h]
  *       - SPPolyLine [\ref sp-polyline.cpp, \ref sp-polyline.h]
index dfa9fe6b2b0e2d80c9902f1ea7c6ca361767869b..d53048c76c828bac2af404365a18803df99bdf0e 100644 (file)
@@ -28,7 +28,6 @@
 #include "tools-switch.h"
 #include "message-stack.h"
 #include "desktop.h"
-#include "nodepath.h"
 #include "knotholder.h"
 
 #include "live_effects/lpeobject.h"
index d83529957986788f76ea107e48dffd63a8f4db60..4725573d7afdd75448929ea537332bbdb7b95b45 100644 (file)
@@ -16,8 +16,6 @@
 #include <2geom/path.h>
 #include <2geom/transforms.h>
 
-#include "nodepath.h"
-
 namespace Inkscape {
 namespace LivePathEffect {
 
index bd1ce79989fba16c112df5bf2c41a94c2c149ffc..16eb19f44fdea7b2b7b3134d94070e12f69a665a 100644 (file)
@@ -14,8 +14,6 @@
 #include <2geom/bezier-to-sbasis.h>
 #include <2geom/path.h>
 
-#include "nodepath.h"
-
 using std::vector;
 using namespace Geom;
 
index 0beedb5374618514456f8131318f87ab18e15a1b..50ecdf04bc42189b00198dc9f656378ed99f643e 100644 (file)
@@ -22,7 +22,6 @@
 #include "sp-path.h"
 #include "display/curve.h"
 #include "svg/svg.h"
-#include "nodepath.h"
 
 #include <2geom/sbasis.h>
 #include <2geom/sbasis-2d.h>
index 087b883515a3c27924d001c836239e6597e5a91d..7c8262af6e4f9a59da7af9c11a5a4fc392ba9982 100644 (file)
@@ -7,7 +7,6 @@
 #include "live_effects/lpe-spiro.h"
 
 #include "display/curve.h"
-#include "nodepath.h"
 #include <typeinfo>
 #include <2geom/pathvector.h>
 #include <2geom/matrix.h>
index b2a5d56fa1184defd1c861f56f06dfe798b94f95..85f8cde0cb6995a8fe2c2bef926202db4842b43b 100644 (file)
@@ -8,7 +8,6 @@
 
 #include <cstdio>
 #include "live_effects/lpe-vonkoch.h"
-#include "nodepath.h"
 #include <2geom/transforms.h>
 
 //using std::vector;
index 3a03de51cf6f0735651b0bf155784ab8f4d2d904..43f4b57251bec8fd65bda25bf23ab17fc7366532 100644 (file)
 // needed for on-canvas editting:
 #include "tools-switch.h"
 #include "shape-editor.h"
-#include "node-context.h"
 #include "desktop-handles.h"
 #include "selection.h"
-#include "nodepath.h"
 // clipboard support
 #include "ui/clipboard.h"
 // required for linking to other paths
index be465e32469b1eaf08d7b63163844306dfe1848e..7072f47b30ea94e39057729095bdeaff6113ac35 100644 (file)
@@ -179,9 +179,6 @@ sp_lpetool_context_setup(SPEventContext *ec)
     }
 
     lc->_lpetool_message_context = new Inkscape::MessageContext((ec->desktop)->messageStack());
-
-
-    lc->shape_editor->update_statusbar();
 }
 
 /**
@@ -193,13 +190,9 @@ sp_lpetool_context_selection_changed(Inkscape::Selection *selection, gpointer da
 {
     SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(data);
 
-    // TODO: update ShapeEditorsCollective instead
-    lc->shape_editor->unset_item(SH_NODEPATH);
     lc->shape_editor->unset_item(SH_KNOTHOLDER);
     SPItem *item = selection->singleItem();
-    lc->shape_editor->set_item(item, SH_NODEPATH);
     lc->shape_editor->set_item(item, SH_KNOTHOLDER);
-    lc->shape_editor->update_statusbar();
 }
 
 static void
@@ -280,7 +273,6 @@ sp_lpetool_context_root_handler(SPEventContext *event_context, GdkEvent *event)
                 event_context->xp = (gint) event->button.x;
                 event_context->yp = (gint) event->button.y;
                 event_context->within_tolerance = true;
-                lc->shape_editor->cancel_hit();
 
                 using namespace Inkscape::LivePathEffect;
 
@@ -296,28 +288,6 @@ sp_lpetool_context_root_handler(SPEventContext *event_context, GdkEvent *event)
                 ret = ((SPEventContextClass *) lpetool_parent_class)->root_handler(event_context, event);
             }
             break;
-        case GDK_MOTION_NOTIFY:
-        {
-            if (!lc->shape_editor->has_nodepath() || selection->singleItem() == NULL) {
-                break;
-            }
-
-            bool over_stroke = false;
-            over_stroke = lc->shape_editor->is_over_stroke(Geom::Point(event->motion.x, event->motion.y), false);
-
-            if (over_stroke) {
-                event_context->cursor_shape = cursor_node_xpm;
-                event_context->hot_x = 1;
-                event_context->hot_y = 1;
-                sp_event_context_update_cursor(event_context);
-            } else {
-                lc->cursor_shape = cursor_crosshairs_xpm;
-                lc->hot_x = 7;
-                lc->hot_y = 7;
-                sp_event_context_update_cursor(event_context);
-            }
-        }
-        break;
 
 
     case GDK_BUTTON_RELEASE:
index d416e0c9263777f95194d78ddb245deef950688a..fa4360137a9813f60a0d910e6b8078e63a01390f 100644 (file)
@@ -1,10 +1,9 @@
-#define __SHAPE_EDITOR_CPP__
-
 /*
  * Inkscape::ShapeEditor
  *
  * Authors:
  *   bulia byak <buliabyak@users.sf.net>
+ *   Krzysztof Kosiński <tweenk.pl@gmail.com>
  *
  */
 
@@ -25,7 +24,6 @@
 #include "desktop-handles.h"
 #include "knotholder.h"
 #include "live_effects/parameter/point.h"
-#include "nodepath.h"
 #include "xml/node-event-vector.h"
 #include "preferences.h"
 #include "object-edit.h"
 
 ShapeEditor::ShapeEditor(SPDesktop *dt) {
     this->desktop = dt;
-    this->grab_node = -1;
-    this->nodepath = NULL;
     this->knotholder = NULL;
-    this->hit = false;
     this->knotholder_listener_attached_for = NULL;
-    this->nodepath_listener_attached_for = NULL;
 }
 
 ShapeEditor::~ShapeEditor() {
     unset_item(SH_KNOTHOLDER);
-    unset_item(SH_NODEPATH);
 }
 
 void ShapeEditor::unset_item(SubType type, bool keep_knotholder) {
@@ -55,18 +48,7 @@ void ShapeEditor::unset_item(SubType type, bool keep_knotholder) {
 
     switch (type) {
         case SH_NODEPATH:
-            if (this->nodepath) {
-                old_repr = this->nodepath->repr;
-                if (old_repr && old_repr == nodepath_listener_attached_for) {
-                    sp_repr_remove_listener_by_data(old_repr, this);
-                    Inkscape::GC::release(old_repr);
-                    nodepath_listener_attached_for = NULL;
-                }
-
-                this->grab_node = -1;
-                delete this->nodepath;
-                this->nodepath = NULL;
-            }
+            // defunct
             break;
         case SH_KNOTHOLDER:
             if (this->knotholder) {
@@ -87,7 +69,7 @@ void ShapeEditor::unset_item(SubType type, bool keep_knotholder) {
 }
 
 bool ShapeEditor::has_nodepath () {
-    return (this->nodepath != NULL);
+    return false;
 }
 
 bool ShapeEditor::has_knotholder () {
@@ -102,7 +84,8 @@ void ShapeEditor::update_knotholder () {
 bool ShapeEditor::has_local_change (SubType type) {
     switch (type) {
         case SH_NODEPATH:
-            return (this->nodepath && this->nodepath->local_change);
+            // defunct
+            return false;
         case SH_KNOTHOLDER:
             return (this->knotholder && this->knotholder->local_change != 0);
         default:
@@ -113,9 +96,7 @@ bool ShapeEditor::has_local_change (SubType type) {
 void ShapeEditor::decrement_local_change (SubType type) {
     switch (type) {
         case SH_NODEPATH:
-            if (this->nodepath && this->nodepath->local_change > 0) {
-                this->nodepath->local_change--;
-            }
+            // defunct
             break;
         case SH_KNOTHOLDER:
             if (this->knotholder) {
@@ -131,9 +112,7 @@ const SPItem *ShapeEditor::get_item (SubType type) {
     const SPItem *item = NULL;
     switch (type) {
         case SH_NODEPATH:
-            if (this->has_nodepath()) {
-                item = this->nodepath->item;
-            }
+            // defunct
             break;
         case SH_KNOTHOLDER:
             if (this->has_knotholder()) {
@@ -145,50 +124,18 @@ const SPItem *ShapeEditor::get_item (SubType type) {
 }
 
 GList *ShapeEditor::save_nodepath_selection () {
-    if (this->nodepath)
-        return ::save_nodepath_selection (this->nodepath);
+    // defunct stub
     return NULL;
 }
 
 void ShapeEditor::restore_nodepath_selection (GList *saved) {
-    if (this->nodepath && saved)
-        ::restore_nodepath_selection (this->nodepath, saved);
+    // defunct stub
 }
 
-bool ShapeEditor::nodepath_edits_repr_key(gchar const *name) {
-    if (nodepath && name) {
-        return ( !strcmp(name, nodepath->repr_key) || !strcmp(name, nodepath->repr_nodetypes_key) );
-    }
-
-    return false;
-}
-
-
 void ShapeEditor::shapeeditor_event_attr_changed(gchar const *name)
 {
-    gboolean changed_np = FALSE;
     gboolean changed_kh = FALSE;
 
-    if (has_nodepath() && nodepath_edits_repr_key(name))
-    {
-        changed_np = !has_local_change(SH_NODEPATH);
-        decrement_local_change(SH_NODEPATH);
-    }
-
-    if (changed_np) {
-        GList *saved = NULL;
-        if (has_nodepath()) {
-            saved = save_nodepath_selection();
-        }
-
-        reset_item(SH_NODEPATH);
-
-        if (has_nodepath() && saved) {
-            restore_nodepath_selection(saved);
-            g_list_free (saved);
-        }
-    }
-
     if (has_knotholder())
     {
         changed_kh = !has_local_change(SH_KNOTHOLDER);
@@ -199,8 +146,6 @@ void ShapeEditor::shapeeditor_event_attr_changed(gchar const *name)
             reset_item(SH_KNOTHOLDER, !strcmp(name, "d"));
         }
     }
-
-    update_statusbar(); //TODO: get_container()->update_statusbar();
 }
 
 
@@ -229,27 +174,11 @@ void ShapeEditor::set_item(SPItem *item, SubType type, bool keep_knotholder) {
     // since this freezes the handles
     unset_item(type, keep_knotholder);
 
-    this->grab_node = -1;
-
     if (item) {
         Inkscape::XML::Node *repr;
         switch(type) {
             case SH_NODEPATH:
-                if (SP_IS_LPE_ITEM(item)) {
-                    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-                    this->nodepath = sp_nodepath_new(desktop, item, (prefs->getBool("/tools/nodes/show_handles", true)));
-                }
-                if (this->nodepath) {
-                    this->nodepath->shape_editor = this;
-
-                    // setting new listener
-                    repr = SP_OBJECT_REPR(item);
-                    if (repr != nodepath_listener_attached_for) {
-                        Inkscape::GC::anchor(repr);
-                        sp_repr_add_listener(repr, &shapeeditor_repr_events, this);
-                        nodepath_listener_attached_for = repr;
-                    }
-                }
+                // defunct
                 break;
 
             case SH_KNOTHOLDER:
@@ -272,34 +201,6 @@ void ShapeEditor::set_item(SPItem *item, SubType type, bool keep_knotholder) {
     }
 }
 
-/** Please note that this function only works for path parameters.
-*  All other parameters probably will crash Inkscape!
-*/
-void ShapeEditor::set_item_lpe_path_parameter(SPItem *item, LivePathEffectObject *lpeobject, const char * key)
-{
-    unset_item(SH_NODEPATH);
-
-    this->grab_node = -1;
-
-    if (lpeobject) {
-        Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-        this->nodepath = sp_nodepath_new( desktop, lpeobject,
-                                          (prefs->getInt("/tools/nodes/show_handles", true)),
-                                          key, item);
-        if (this->nodepath) {
-            this->nodepath->shape_editor = this;
-
-            // setting new listener
-            Inkscape::XML::Node *repr = SP_OBJECT_REPR(lpeobject);
-            if (repr && repr != nodepath_listener_attached_for) {
-                Inkscape::GC::anchor(repr);
-                sp_repr_add_listener(repr, &shapeeditor_repr_events, this);
-                nodepath_listener_attached_for = repr;
-            }
-        }
-    }
-}
-
 
 /** FIXME: This thing is only called when the item needs to be updated in response to repr change.
    Why not make a reload function in NodePath and in KnotHolder? */
@@ -307,14 +208,7 @@ void ShapeEditor::reset_item (SubType type, bool keep_knotholder)
 {
     switch (type) {
         case SH_NODEPATH:
-            if ( (nodepath) && (IS_LIVEPATHEFFECT(nodepath->object)) ) {
-                char * key = g_strdup(nodepath->repr_key);
-                set_item_lpe_path_parameter(nodepath->item, LIVEPATHEFFECT(nodepath->object), key); // the above checks for nodepath, so it is indeed a path that we are editing
-                g_free(key);
-            } else {
-                SPObject *obj = sp_desktop_document(desktop)->getObjectByRepr(nodepath_listener_attached_for); /// note that it is not certain that this is an SPItem; it could be a LivePathEffectObject.
-                set_item(SP_ITEM(obj), SH_NODEPATH);
-            }
+            // defunct
             break;
         case SH_KNOTHOLDER:
             if ( knotholder ) {
@@ -326,267 +220,12 @@ void ShapeEditor::reset_item (SubType type, bool keep_knotholder)
 }
 
 void ShapeEditor::nodepath_destroyed () {
-    this->nodepath = NULL;
-}
-
-void ShapeEditor::update_statusbar () {
-    if (this->nodepath)
-        sp_nodepath_update_statusbar(this->nodepath);
-}
-
-bool ShapeEditor::is_over_stroke (Geom::Point event_p, bool remember) {
-    if (!this->nodepath)
-        return false; // no stroke in knotholder
-
-    const SPItem *item = get_item(SH_NODEPATH);
-
-    if (!item || !SP_IS_ITEM(item))
-        return false;
-
-    //Translate click point into proper coord system
-    this->curvepoint_doc = desktop->w2d(event_p);
-    this->curvepoint_doc *= sp_item_dt2i_affine(item);
-
-    SPCurve *curve = this->nodepath->curve;   // not sure if np->curve is always up to date...
-    Geom::PathVector const &pathv = curve->get_pathvector();
-    boost::optional<Geom::PathVectorPosition> pvpos = Geom::nearestPoint(pathv, this->curvepoint_doc);
-    if (!pvpos) {
-        g_print("Warning! Possible error?\n");
-        return false;
-    }
-
-    Geom::Point nearest = pathv[pvpos->path_nr].pointAt(pvpos->t);
-    Geom::Point delta = nearest - this->curvepoint_doc;
-
-    delta = desktop->d2w(delta);
-
-    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-    double stroke_tolerance =
-        (( !SP_OBJECT_STYLE(item)->stroke.isNone() ?
-           desktop->current_zoom() *
-           SP_OBJECT_STYLE (item)->stroke_width.computed * 0.5 *
-           to_2geom(sp_item_i2d_affine(item)).descrim()
-         : 0.0)
-         + prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100)) / to_2geom(sp_item_i2d_affine(item)).descrim();
-    bool close = (Geom::L2 (delta) < stroke_tolerance);
-
-    if (remember && close) {
-        // calculate index for nodepath's representation.
-        double int_part;
-        double t = std::modf(pvpos->t, &int_part);
-        unsigned int segment_index = (unsigned int)int_part + 1;
-        for (unsigned int i = 0; i < pvpos->path_nr; ++i) {
-            segment_index += pathv[i].size() + 1;
-            if (pathv[i].closed())
-                segment_index += 1;
-        }
-
-        this->curvepoint_event[Geom::X] = (gint) event_p [Geom::X];
-        this->curvepoint_event[Geom::Y] = (gint) event_p [Geom::Y];
-        this->hit = true;
-        this->grab_t = t;
-        this->grab_node = segment_index;
-    }
-
-    return close;
-}
-
-void ShapeEditor::add_node_near_point() {
-    if (this->nodepath) {
-        sp_nodepath_add_node_near_point(this->nodepath, this->curvepoint_doc);
-    } else if (this->knotholder) {
-        // we do not add nodes in knotholder... yet
-    }
-}
-
-void ShapeEditor::select_segment_near_point(bool toggle) {
-    if (this->nodepath) {
-        sp_nodepath_select_segment_near_point(this->nodepath, this->curvepoint_doc, toggle);
-    }
-    if (this->knotholder) {
-        // we do not select segments in knotholder... yet?
-    }
-}
-
-void ShapeEditor::cancel_hit() {
-    this->hit = false;
-}
-
-bool ShapeEditor::hits_curve() {
-    return (this->hit);
-}
-
-
-void ShapeEditor::curve_drag(gdouble eventx, gdouble eventy) {
-    if (this->nodepath && !this->nodepath->straight_path) {
-
-        if (this->grab_node == -1) // don't know which segment to drag
-            return;
-
-        // We round off the extra precision in the motion coordinates provided
-        // by some input devices (like tablets). As we'll store the coordinates
-        // as integers in curvepoint_event we need to do this rounding before
-        // comparing them with the last coordinates from curvepoint_event.
-        // See bug #1593499 for details.
-
-        gint x = (gint) Inkscape::round(eventx);
-        gint y = (gint) Inkscape::round(eventy);
-
-
-        // The coordinates hasn't changed since the last motion event, abort
-        if (this->curvepoint_event[Geom::X] == x &&
-            this->curvepoint_event[Geom::Y] == y)
-            return;
-
-        Geom::Point const delta_w(eventx - this->curvepoint_event[Geom::X],
-                                  eventy - this->curvepoint_event[Geom::Y]);
-        Geom::Point const delta_dt(this->desktop->w2d(delta_w));
-
-        sp_nodepath_curve_drag (this->nodepath, this->grab_node, this->grab_t, delta_dt);
-        this->curvepoint_event[Geom::X] = x;
-        this->curvepoint_event[Geom::Y] = y;
-
-    }
-    if (this->knotholder) {
-        // we do not drag curve in knotholder
-    }
-
-}
-
-void ShapeEditor::finish_drag() {
-    if (this->nodepath && this->hit) {
-        sp_nodepath_update_repr (this->nodepath, _("Drag curve"));
-    }
-}
-
-void ShapeEditor::select_rect(Geom::Rect const &rect, bool add) {
-    if (this->nodepath) {
-        sp_nodepath_select_rect(this->nodepath, rect, add);
-    }
 }
 
 bool ShapeEditor::has_selection() {
-    if (this->nodepath)
-        return this->nodepath->selected;
     return false; //  so far, knotholder cannot have selection
 }
 
-void ShapeEditor::deselect() {
-    if (this->nodepath)
-        sp_nodepath_deselect(this->nodepath);
-}
-
-void ShapeEditor::add_node () {
-    sp_node_selected_add_node(this->nodepath);
-}
-
-void ShapeEditor::delete_nodes () {
-    sp_node_selected_delete(this->nodepath);
-}
-
-void ShapeEditor::delete_nodes_preserving_shape () {
-    if (this->nodepath && this->nodepath->selected) {
-        sp_node_delete_preserve(g_list_copy(this->nodepath->selected));
-    }
-}
-
-void ShapeEditor::delete_segment () {
-    sp_node_selected_delete_segment(this->nodepath);
-}
-
-void ShapeEditor::set_node_type(int type) {
-    sp_node_selected_set_type(this->nodepath, (Inkscape::NodePath::NodeType) type);
-}
-
-void ShapeEditor::break_at_nodes() {
-    sp_node_selected_break(this->nodepath);
-}
-
-void ShapeEditor::join_nodes() {
-    sp_node_selected_join(this->nodepath);
-}
-
-void ShapeEditor::join_segments() {
-    sp_node_selected_join_segment(this->nodepath);
-}
-
-void ShapeEditor::duplicate_nodes() {
-    sp_node_selected_duplicate(this->nodepath);
-}
-
-void ShapeEditor::set_type_of_segments(NRPathcode code) {
-    sp_node_selected_set_line_type(this->nodepath, code);
-}
-
-void ShapeEditor::move_nodes_screen(SPDesktop *desktop, gdouble dx, gdouble dy) {
-    sp_node_selected_move_screen(desktop, this->nodepath, dx, dy);
-}
-void ShapeEditor::move_nodes(gdouble dx, gdouble dy) {
-    sp_node_selected_move(this->nodepath, dx, dy);
-}
-
-void ShapeEditor::rotate_nodes(gdouble angle, int which, bool screen) {
-    if (this->nodepath)
-        sp_nodepath_selected_nodes_rotate (this->nodepath, angle, which, screen);
-}
-
-void ShapeEditor::scale_nodes(gdouble const grow, int const which) {
-    sp_nodepath_selected_nodes_scale(this->nodepath, grow, which);
-}
-void ShapeEditor::scale_nodes_screen(gdouble const grow, int const which) {
-    sp_nodepath_selected_nodes_scale_screen(this->nodepath, grow, which);
-}
-
-void ShapeEditor::select_all (bool invert) {
-    if (this->nodepath)
-        sp_nodepath_select_all (this->nodepath, invert);
-}
-void ShapeEditor::select_all_from_subpath (bool invert) {
-    if (this->nodepath)
-        sp_nodepath_select_all_from_subpath (this->nodepath, invert);
-}
-void ShapeEditor::select_next () {
-    if (this->nodepath) {
-        sp_nodepath_select_next (this->nodepath);
-        if (this->nodepath->numSelected() >= 1) {
-            this->desktop->scroll_to_point(this->nodepath->singleSelectedCoords(), 1.0);
-        }
-    }
-}
-void ShapeEditor::select_prev () {
-    if (this->nodepath) {
-        sp_nodepath_select_prev (this->nodepath);
-        if (this->nodepath->numSelected() >= 1) {
-            this->desktop->scroll_to_point(this->nodepath->singleSelectedCoords(), 1.0);
-        }
-    }
-}
-
-void ShapeEditor::show_handles (bool show) {
-    if (this->nodepath && !this->nodepath->straight_path)
-        sp_nodepath_show_handles (this->nodepath, show);
-}
-
-void ShapeEditor::show_helperpath (bool show) {
-    if (this->nodepath)
-        sp_nodepath_show_helperpath (this->nodepath, show);
-}
-
-void ShapeEditor::flip (Geom::Dim2 axis, boost::optional<Geom::Point> center) {
-    if (this->nodepath)
-        sp_nodepath_flip (this->nodepath, axis, center);
-}
-
-void ShapeEditor::distribute (Geom::Dim2 axis) {
-    if (this->nodepath)
-        sp_nodepath_selected_distribute (this->nodepath, axis);
-}
-void ShapeEditor::align (Geom::Dim2 axis) {
-    if (this->nodepath)
-        sp_nodepath_selected_align (this->nodepath, axis);
-}
-
-
 /*
   Local Variables:
   mode:c++
index 6f0907fb93bc2d36752bfad117a5ec794f7d8193..2374d6ac645bd5d28a3c08f78d014b594130d012 100644 (file)
@@ -41,7 +41,6 @@ public:
     ~ShapeEditor();
 
     void set_item (SPItem *item, SubType type, bool keep_knotholder = false);
-    void set_item_lpe_path_parameter(SPItem *item, LivePathEffectObject *lpeobject, const char * key);
     void unset_item (SubType type, bool keep_knotholder = false);
 
     bool has_nodepath (); //((deprecated))
@@ -55,68 +54,10 @@ public:
 
     void nodepath_destroyed ();
 
-    void update_statusbar ();
-
-    bool is_over_stroke (Geom::Point event_p, bool remember);
-
-    void add_node_near_point(); // uses the shapeeditor's remembered point, if any
-
-    void select_segment_near_point(bool toggle); // uses the shapeeditor's remembered point, if any
-
-    void cancel_hit ();
-
-    bool hits_curve ();
-
-    void curve_drag (gdouble eventx, gdouble eventy);
-
-    void finish_drag ();
-
-    void select_rect (Geom::Rect  const &rect, bool add);
-
     bool has_selection ();
-    void deselect ();
-
-    Inkscape::NodePath::Path *get_nodepath() {return nodepath;} //((deprecated))
-    ShapeEditorsCollective *get_container() {return container;}
-
-    void add_node();
-
-    void delete_nodes();
-    void delete_nodes_preserving_shape();
-    void delete_segment();
-
-    void set_node_type(int type);
-
-    void break_at_nodes();
-    void join_nodes();
-    void join_segments();
-
-    void duplicate_nodes();
 
-    void set_type_of_segments(NRPathcode code);
-
-    void move_nodes(gdouble dx, gdouble dy);
-    void move_nodes_screen(SPDesktop *desktop, gdouble dx, gdouble dy);
-
-    void rotate_nodes(gdouble angle, int which, bool screen);
-
-    void scale_nodes(gdouble const grow, int const which);
-    void scale_nodes_screen(gdouble const grow, int const which);
-
-    void select_all (bool invert);
-    void select_all_from_subpath (bool invert);
-    void select_next ();
-    void select_prev ();
-
-    void show_handles (bool show);
-    void show_helperpath (bool show);
-
-    void flip (Geom::Dim2 axis, boost::optional<Geom::Point> center = boost::optional<Geom::Point>());
-
-    void distribute (Geom::Dim2 axis);
-    void align (Geom::Dim2 axis);
-
-    bool nodepath_edits_repr_key(gchar const *name);
+    Inkscape::NodePath::Path *get_nodepath() {return NULL;} //((deprecated))
+    ShapeEditorsCollective *get_container() {return NULL;}
 
     // this one is only public because it's called from non-C++ repr changed callback
     void shapeeditor_event_attr_changed(gchar const *name);
@@ -127,24 +68,8 @@ private:
     const SPItem *get_item (SubType type);
 
     SPDesktop *desktop;
-
-    Inkscape::NodePath::Path *nodepath;
-
-    // TODO: std::list<KnotHolder *> knotholders;
     KnotHolder *knotholder;
-
-    ShapeEditorsCollective *container;
-
-    //Inkscape::XML::Node *lidtened_repr;
-
-    double grab_t;
-    int grab_node; // number of node grabbed by sp_node_context_is_over_stroke
-    bool hit;
-    Geom::Point curvepoint_event; // int coords from event
-    Geom::Point curvepoint_doc; // same, in doc coords
-
     Inkscape::XML::Node *knotholder_listener_attached_for;
-    Inkscape::XML::Node *nodepath_listener_attached_for;
 };
 
 #endif