c9f32f7094e12288831ba0673cfe0c753373f1c4
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 double _t;
40 PathManipulator &_pm;
41 NodeList::iterator first;
42 static bool _drags_stroke;
43 static Geom::Point _stroke_drag_origin;
44 };
46 } // namespace UI
47 } // namespace Inkscape
49 #endif
51 /*
52 Local Variables:
53 mode:c++
54 c-file-style:"stroustrup"
55 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
56 indent-tabs-mode:nil
57 fill-column:99
58 End:
59 */
60 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :