Code

51382615e74848291edcbd0bd206dc3cecc6ff17
[inkscape.git] / src / ui / tool / curve-drag-point.h
1 /** @file
2  * Control point that is dragged during path drag
3  */
4 /* Authors:
5  *   Krzysztof KosiƄski <tweenk.pl@gmail.com>
6  *
7  * Copyright (C) 2009 Authors
8  * Released under GNU GPL, read the file 'COPYING' for more information
9  */
11 #ifndef SEEN_UI_TOOL_CURVE_DRAG_POINT_H
12 #define SEEN_UI_TOOL_CURVE_DRAG_POINT_H
14 #include "ui/tool/control-point.h"
15 #include "ui/tool/node.h"
17 class SPDesktop;
18 namespace Inkscape {
19 namespace UI {
21 class PathManipulator;
22 struct PathSharedData;
24 class CurveDragPoint : public ControlPoint {
25 public:
26     CurveDragPoint(PathManipulator &pm);
27     void setSize(double sz) { _setSize(sz); }
28     void setTimeValue(double t) { _t = t; }
29     void setIterator(NodeList::iterator i) { first = i; }
30     sigc::signal<void> signal_update;
31 protected:
32     virtual Glib::ustring _getTip(unsigned state);
33 private:
34     void _grabbedHandler(GdkEventMotion *);
35     void _draggedHandler(Geom::Point const &, Geom::Point const &);
36     bool _clickedHandler(GdkEventButton *);
37     bool _doubleclickedHandler(GdkEventButton *);
38     void _ungrabbedHandler();
39     void _insertNode(bool take_selection);
40     double _t;
41     PathManipulator &_pm;
42     NodeList::iterator first;
43     static bool _drags_stroke;
44     static Geom::Point _stroke_drag_origin;
45 };
47 } // namespace UI
48 } // namespace Inkscape
50 #endif
52 /*
53   Local Variables:
54   mode:c++
55   c-file-style:"stroustrup"
56   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
57   indent-tabs-mode:nil
58   fill-column:99
59   End:
60 */
61 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :