From fdb1b34dce074cadc4429fce2ca1e45c4285c1b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Krzysztof=20Kosi=C5=84ski?= Date: Thu, 24 Dec 2009 03:35:23 +0100 Subject: [PATCH] Remove remnants of old node tool --- src/Makefile_insert | 2 - src/doxygen-main.cpp | 2 +- src/live_effects/effect.cpp | 1 - src/live_effects/lpe-constructgrid.cpp | 2 - src/live_effects/lpe-gears.cpp | 2 - src/live_effects/lpe-lattice.cpp | 1 - src/live_effects/lpe-spiro.cpp | 1 - src/live_effects/lpe-vonkoch.cpp | 1 - src/live_effects/parameter/path.cpp | 2 - src/lpe-tool-context.cpp | 30 -- src/shape-editor.cpp | 383 +------------------------ src/shape-editor.h | 79 +---- 12 files changed, 14 insertions(+), 492 deletions(-) diff --git a/src/Makefile_insert b/src/Makefile_insert index dfc9daf96..ad72f5586 100644 --- a/src/Makefile_insert +++ b/src/Makefile_insert @@ -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 \ diff --git a/src/doxygen-main.cpp b/src/doxygen-main.cpp index fd8f4bb1a..c6a6bb3ab 100644 --- a/src/doxygen-main.cpp +++ b/src/doxygen-main.cpp @@ -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] diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index dfa9fe6b2..d53048c76 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -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" diff --git a/src/live_effects/lpe-constructgrid.cpp b/src/live_effects/lpe-constructgrid.cpp index d83529957..4725573d7 100644 --- a/src/live_effects/lpe-constructgrid.cpp +++ b/src/live_effects/lpe-constructgrid.cpp @@ -16,8 +16,6 @@ #include <2geom/path.h> #include <2geom/transforms.h> -#include "nodepath.h" - namespace Inkscape { namespace LivePathEffect { diff --git a/src/live_effects/lpe-gears.cpp b/src/live_effects/lpe-gears.cpp index bd1ce7998..16eb19f44 100644 --- a/src/live_effects/lpe-gears.cpp +++ b/src/live_effects/lpe-gears.cpp @@ -14,8 +14,6 @@ #include <2geom/bezier-to-sbasis.h> #include <2geom/path.h> -#include "nodepath.h" - using std::vector; using namespace Geom; diff --git a/src/live_effects/lpe-lattice.cpp b/src/live_effects/lpe-lattice.cpp index 0beedb537..50ecdf04b 100644 --- a/src/live_effects/lpe-lattice.cpp +++ b/src/live_effects/lpe-lattice.cpp @@ -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> diff --git a/src/live_effects/lpe-spiro.cpp b/src/live_effects/lpe-spiro.cpp index 087b88351..7c8262af6 100644 --- a/src/live_effects/lpe-spiro.cpp +++ b/src/live_effects/lpe-spiro.cpp @@ -7,7 +7,6 @@ #include "live_effects/lpe-spiro.h" #include "display/curve.h" -#include "nodepath.h" #include #include <2geom/pathvector.h> #include <2geom/matrix.h> diff --git a/src/live_effects/lpe-vonkoch.cpp b/src/live_effects/lpe-vonkoch.cpp index b2a5d56fa..85f8cde0c 100644 --- a/src/live_effects/lpe-vonkoch.cpp +++ b/src/live_effects/lpe-vonkoch.cpp @@ -8,7 +8,6 @@ #include #include "live_effects/lpe-vonkoch.h" -#include "nodepath.h" #include <2geom/transforms.h> //using std::vector; diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index 3a03de51c..43f4b5725 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -28,10 +28,8 @@ // 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 diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp index be465e324..7072f47b3 100644 --- a/src/lpe-tool-context.cpp +++ b/src/lpe-tool-context.cpp @@ -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: diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index d416e0c92..fa4360137 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -1,10 +1,9 @@ -#define __SHAPE_EDITOR_CPP__ - /* * Inkscape::ShapeEditor * * Authors: * bulia byak + * Krzysztof Kosiński * */ @@ -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" @@ -37,17 +35,12 @@ 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 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 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++ diff --git a/src/shape-editor.h b/src/shape-editor.h index 6f0907fb9..2374d6ac6 100644 --- a/src/shape-editor.h +++ b/src/shape-editor.h @@ -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 center = boost::optional()); - - 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 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 -- 2.30.2