Code

Node tool: fix Tab and Shift+Tab
[inkscape.git] / src / ui / tool / path-manipulator.h
index 6b69e226a7665effc6a0e4d5548f8e8a2351af07..8a0167e595111ff38785cce37c9fe1bbc8e859d5 100644 (file)
@@ -36,6 +36,7 @@ class CurveDragPoint;
 class PathCanvasGroups;
 class MultiPathManipulator;
 class Node;
+class Handle;
 
 struct PathSharedData {
     NodeSharedData node_data;
@@ -64,10 +65,10 @@ public:
     SPPath *item() { return _path; }
 
     void selectSubpaths();
-    void shiftSelection(int dir);
     void invertSelectionInSubpaths();
 
     void insertNodes();
+    void duplicateNodes();
     void weldNodes(NodeList::iterator preserve_pos = NodeList::iterator());
     void weldSegments();
     void breakNodes();
@@ -76,6 +77,9 @@ public:
     void reverseSubpaths(bool selected_only);
     void setSegmentType(SegmentType);
 
+    void scaleHandle(Node *n, int which, int dir, bool pixel);
+    void rotateHandle(Node *n, int which, int dir, bool pixel);
+
     void showOutline(bool show);
     void showHandles(bool show);
     void showPathDirection(bool show);
@@ -83,11 +87,15 @@ public:
     void setLiveObjects(bool set);
     void setControlsTransform(Geom::Matrix const &);
     void hideDragPoint();
+    MultiPathManipulator &mpm() { return _multi_path_manipulator; }
 
     NodeList::iterator subdivideSegment(NodeList::iterator after, double t);
     NodeList::iterator extremeNode(NodeList::iterator origin, bool search_selected,
         bool search_unselected, bool closest);
 
+    // this is necessary for Tab-selection in MultiPathManipulator
+    SubpathList &subpathList() { return _subpaths; }
+
     static bool is_item_type(void *item);
 private:
     typedef NodeList Subpath;
@@ -104,7 +112,6 @@ private:
     Glib::ustring _nodetypesKey();
     Inkscape::XML::Node *_getXMLNode();
 
-    void _attachNodeHandlers(Node *n);
     void _selectionChanged(SelectableControlPoint *p, bool selected);
     bool _nodeClicked(Node *, GdkEventButton *);
     void _handleGrabbed();
@@ -114,9 +121,11 @@ private:
     void _externalChange(unsigned type);
     void _removeNodesFromSelection();
     void _commit(Glib::ustring const &annotation);
+    void _commit(Glib::ustring const &annotation, gchar const *key);
     void _updateDragPoint(Geom::Point const &);
     void _updateOutlineOnZoomChange();
     double _getStrokeTolerance();
+    Handle *_chooseHandle(Node *n, int which);
 
     SubpathList _subpaths;
     MultiPathManipulator &_multi_path_manipulator;
@@ -139,6 +148,7 @@ private:
     friend class PathManipulatorObserver;
     friend class CurveDragPoint;
     friend class Node;
+    friend class Handle;
 };
 
 } // namespace UI
@@ -155,4 +165,4 @@ private:
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :