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 virtual bool _eventHandler(GdkEvent *event);
31 protected:
32 virtual Glib::ustring _getTip(unsigned state);
33 virtual void dragged(Geom::Point &, GdkEventMotion *);
34 virtual bool grabbed(GdkEventMotion *);
35 virtual void ungrabbed(GdkEventButton *);
36 virtual bool clicked(GdkEventButton *);
37 virtual bool doubleclicked(GdkEventButton *);
39 private:
40 void _insertNode(bool take_selection);
41 double _t;
42 PathManipulator &_pm;
43 NodeList::iterator first;
44 static bool _drags_stroke;
45 static Geom::Point _stroke_drag_origin;
46 };
48 } // namespace UI
49 } // namespace Inkscape
51 #endif
53 /*
54 Local Variables:
55 mode:c++
56 c-file-style:"stroustrup"
57 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
58 indent-tabs-mode:nil
59 fill-column:99
60 End:
61 */
62 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :