1 /** @file
2 * Selector component (click and rubberband)
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_SELECTOR_H
12 #define SEEN_UI_TOOL_SELECTOR_H
14 #include <memory>
15 #include <gdk/gdk.h>
16 #include <2geom/rect.h>
17 #include "ui/tool/manipulator.h"
19 class SPDesktop;
20 class CtrlRect;
22 namespace Inkscape {
23 namespace UI {
25 class SelectorPoint;
27 class Selector : public Manipulator {
28 public:
29 Selector(SPDesktop *d);
30 virtual ~Selector();
31 virtual bool event(GdkEvent *);
33 sigc::signal<void, Geom::Rect const &, GdkEventButton*> signal_area;
34 sigc::signal<void, Geom::Point const &, GdkEventButton*> signal_point;
35 private:
36 SelectorPoint *_dragger;
37 Geom::Point _start;
38 CtrlRect *_rubber;
39 gulong _connection;
40 bool _cancel;
41 friend class SelectorPoint;
42 };
44 } // namespace UI
45 } // namespace Inkscape
47 #endif
49 /*
50 Local Variables:
51 mode:c++
52 c-file-style:"stroustrup"
53 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
54 indent-tabs-mode:nil
55 fill-column:99
56 End:
57 */
58 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :