From cc73219a498e87298578996011b80680214f7a96 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sat, 26 Jul 2014 13:11:51 -0400 Subject: Clean up some ShapeHolder related things (bzr r13341.1.100) --- src/shape-editor.h | 54 ++++++++++++++---------------------------------------- 1 file changed, 14 insertions(+), 40 deletions(-) (limited to 'src/shape-editor.h') diff --git a/src/shape-editor.h b/src/shape-editor.h index ec4b50fa3..df0dbfa3a 100644 --- a/src/shape-editor.h +++ b/src/shape-editor.h @@ -4,8 +4,8 @@ /* * Inkscape::ShapeEditor * - * This is a container class which contains either knotholder (for shapes) or nodepath (for - * paths). It is attached to a single item so only one of these is active at a time. + * This is a container class which contains a knotholder for shapes. + * It is attached to a single item. * * Authors: * bulia byak @@ -14,27 +14,12 @@ #include -#include <2geom/forward.h> - - -namespace Inkscape { namespace NodePath { class Path; } } namespace Inkscape { namespace XML { class Node; } } class KnotHolder; class LivePathEffectObject; class SPDesktop; class SPItem; -class SPNodeContext; -class ShapeEditorsCollective; - -#include <2geom/point.h> -#include -#include - -enum SubType{ - SH_NODEPATH, - SH_KNOTHOLDER -}; class ShapeEditor { public: @@ -42,36 +27,25 @@ public: ShapeEditor(SPDesktop *desktop); ~ShapeEditor(); - void set_item (SPItem *item, SubType type, bool keep_knotholder = false); - void unset_item (SubType type, bool keep_knotholder = false); - - bool has_nodepath (); //((deprecated)) - void update_knotholder (); //((deprecated)) + void set_item(SPItem *item, bool keep_knotholder = false); + void unset_item(bool keep_knotholder = false); - bool has_local_change (SubType type); - void decrement_local_change (SubType type); + void update_knotholder(); //((deprecated)) - GList *save_nodepath_selection (); - void restore_nodepath_selection (GList *saved); - - void nodepath_destroyed (); - - bool has_selection (); - - 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); + bool has_local_change(); + void decrement_local_change(); bool knot_mouseover() const; - static void blockSetItem(bool b) {_blockSetItem = b;} + static void blockSetItem(bool b) { _blockSetItem = b; } // kludge? + static void event_attr_changed(Inkscape::XML::Node * /*repr*/, gchar const *name, gchar const * /*old_value*/, + gchar const * /*new_value*/, bool /*is_interactive*/, void *data); private: - bool has_knotholder (); - void reset_item (SubType type, bool keep_knotholder = true); - const SPItem *get_item (SubType type); + bool has_knotholder(); + void reset_item (bool keep_knotholder = true); + const SPItem *get_item(); + static bool _blockSetItem; SPDesktop *desktop; -- cgit v1.2.3 From 1f2d8bc4ce99e970cead4ca96c1859c383a9c043 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 31 Aug 2014 14:17:26 -0400 Subject: Header cleanup: stop using Glib types where they aren't truly needed. Eases GThread deprecation errors. (bzr r13341.1.190) --- src/shape-editor.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/shape-editor.h') diff --git a/src/shape-editor.h b/src/shape-editor.h index df0dbfa3a..d2611b111 100644 --- a/src/shape-editor.h +++ b/src/shape-editor.h @@ -12,8 +12,6 @@ * */ -#include - namespace Inkscape { namespace XML { class Node; } } class KnotHolder; @@ -37,10 +35,10 @@ public: bool knot_mouseover() const; - static void blockSetItem(bool b) { _blockSetItem = b; } // kludge? + static void blockSetItem(bool b) { _blockSetItem = b; } // kludge - static void event_attr_changed(Inkscape::XML::Node * /*repr*/, gchar const *name, gchar const * /*old_value*/, - gchar const * /*new_value*/, bool /*is_interactive*/, void *data); + static void event_attr_changed(Inkscape::XML::Node * /*repr*/, char const *name, char const * /*old_value*/, + char const * /*new_value*/, bool /*is_interactive*/, void *data); private: bool has_knotholder(); void reset_item (bool keep_knotholder = true); -- cgit v1.2.3 From 156cf3323a936c7dfccd9e09458cd8b5d174b7fe Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 5 Oct 2014 19:24:27 -0400 Subject: Move more UI code into ui/ (bzr r13341.1.253) --- src/shape-editor.h | 67 ------------------------------------------------------ 1 file changed, 67 deletions(-) delete mode 100644 src/shape-editor.h (limited to 'src/shape-editor.h') diff --git a/src/shape-editor.h b/src/shape-editor.h deleted file mode 100644 index d2611b111..000000000 --- a/src/shape-editor.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef SEEN_SHAPE_EDITOR_H -#define SEEN_SHAPE_EDITOR_H - -/* - * Inkscape::ShapeEditor - * - * This is a container class which contains a knotholder for shapes. - * It is attached to a single item. - * - * Authors: - * bulia byak - * - */ - -namespace Inkscape { namespace XML { class Node; } } - -class KnotHolder; -class LivePathEffectObject; -class SPDesktop; -class SPItem; - -class ShapeEditor { -public: - - ShapeEditor(SPDesktop *desktop); - ~ShapeEditor(); - - void set_item(SPItem *item, bool keep_knotholder = false); - void unset_item(bool keep_knotholder = false); - - void update_knotholder(); //((deprecated)) - - bool has_local_change(); - void decrement_local_change(); - - bool knot_mouseover() const; - - static void blockSetItem(bool b) { _blockSetItem = b; } // kludge - - static void event_attr_changed(Inkscape::XML::Node * /*repr*/, char const *name, char const * /*old_value*/, - char const * /*new_value*/, bool /*is_interactive*/, void *data); -private: - bool has_knotholder(); - void reset_item (bool keep_knotholder = true); - const SPItem *get_item(); - - static bool _blockSetItem; - - SPDesktop *desktop; - KnotHolder *knotholder; - Inkscape::XML::Node *knotholder_listener_attached_for; -}; - -#endif // SEEN_SHAPE_EDITOR_H - - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : - -- cgit v1.2.3