X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fui%2Ftool%2Fpath-manipulator.h;h=a8f1c957ee5f4a2a499afb3ae1035d4f72c8c41b;hb=c5dd34e5650c52686ead8880909b4c4e90caa666;hp=9ed9e4fb6b0c9d796a9dbb46bd02c4558feb39ee;hpb=16a8c7d5e433b176636a4a1260c42ea43932110b;p=inkscape.git diff --git a/src/ui/tool/path-manipulator.h b/src/ui/tool/path-manipulator.h index 9ed9e4fb6..a8f1c957e 100644 --- a/src/ui/tool/path-manipulator.h +++ b/src/ui/tool/path-manipulator.h @@ -25,6 +25,8 @@ struct SPCanvasItem; namespace Inkscape { +namespace XML { class Node; } + namespace UI { class PathManipulator; @@ -32,6 +34,9 @@ class ControlPointSelection; class PathManipulatorObserver; class CurveDragPoint; class PathCanvasGroups; +class MultiPathManipulator; +class Node; +class Handle; struct PathSharedData { NodeSharedData node_data; @@ -48,8 +53,8 @@ class PathManipulator : public PointManipulator { public: typedef SPPath *ItemType; - PathManipulator(PathSharedData const &data, SPPath *path, - Geom::Matrix const &edit_trans, guint32 outline_color); + PathManipulator(MultiPathManipulator &mpm, SPPath *path, Geom::Matrix const &edit_trans, + guint32 outline_color, Glib::ustring lpe_key); ~PathManipulator(); virtual bool event(GdkEvent *); @@ -60,29 +65,33 @@ public: SPPath *item() { return _path; } void selectSubpaths(); - void selectAll(); - void selectArea(Geom::Rect const &); void shiftSelection(int dir); - void linearGrow(int dir); - void spatialGrow(int dir); - void invertSelection(); void invertSelectionInSubpaths(); void insertNodes(); - void weldNodes(NodeList::iterator const &preserve_pos = NodeList::iterator()); + void weldNodes(NodeList::iterator preserve_pos = NodeList::iterator()); void weldSegments(); void breakNodes(); void deleteNodes(bool keep_shape = true); void deleteSegments(); - void reverseSubpaths(); + 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); - void setOutlineTransform(Geom::Matrix const &); + void setLiveOutline(bool set); + 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); static bool is_item_type(void *item); private: @@ -91,27 +100,32 @@ private: void _createControlPointsFromGeometry(); void _createGeometryFromControlPoints(); + unsigned _deleteStretch(NodeList::iterator first, NodeList::iterator last, bool keep_shape); std::string _createTypeString(); void _updateOutline(); //void _setOutline(Geom::PathVector const &); - - void _attachNodeHandlers(Node *n); - void _removeNodeHandlers(Node *n); + void _getGeometry(); + void _setGeometry(); + Glib::ustring _nodetypesKey(); + Inkscape::XML::Node *_getXMLNode(); void _selectionChanged(SelectableControlPoint *p, bool selected); bool _nodeClicked(Node *, GdkEventButton *); void _handleGrabbed(); bool _handleClicked(Handle *, GdkEventButton *); void _handleUngrabbed(); + 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; - PathSharedData const &_path_data; + MultiPathManipulator &_multi_path_manipulator; SPPath *_path; SPCurve *_spcurve; // in item coordinates SPCanvasItem *_outline; @@ -124,9 +138,14 @@ private: bool _show_handles; bool _show_outline; bool _show_path_direction; + bool _live_outline; + bool _live_objects; + Glib::ustring _lpe_key; friend class PathManipulatorObserver; friend class CurveDragPoint; + friend class Node; + friend class Handle; }; } // namespace UI