Code

ac9295cf917450307ab3a3c23834d15ce04b6757
[inkscape.git] / src / conn-avoid-ref.h
1 #ifndef SEEN_CONN_AVOID_REF
2 #define SEEN_CONN_AVOID_REF
4 /*
5  * A class for handling shape interaction with libavoid.
6  *
7  * Authors:
8  *   Michael Wybrow <mjwybrow@users.sourceforge.net>
9  *
10  * Copyright (C) 2005 Michael Wybrow
11  *
12  * Released under GNU GPL, read the file 'COPYING' for more information
13  */
16 #include <sigc++/connection.h>
18 struct SPItem;
19 namespace Avoid {
20     class ShapeRef;
21 }
23 class SPAvoidRef {
24 public:
25     SPAvoidRef(SPItem *spitem);
26     ~SPAvoidRef();
28     // libavoid's internal representation of the item.
29     Avoid::ShapeRef *shapeRef;
31     void setAvoid(char const *value);
32     void handleSettingChange(void);
34 private:
35     SPItem *item;
37     // true if avoiding, false if not.
38     bool setting;
39     bool new_setting;
41     // A sigc connection for transformed signal.
42     sigc::connection _transformed_connection;
43 };
45 extern GSList *get_avoided_items(GSList *list, SPObject *from,
46         SPDesktop *desktop, bool initialised = true);
47 extern void avoid_item_move(NR::Matrix const *mp, SPItem *moved_item);
48 extern void init_avoided_shape_geometry(SPDesktop *desktop);
50 static const double defaultConnSpacing = 10.0;
52 #endif /* !SEEN_CONN_AVOID_REF */
54 /*
55   Local Variables:
56   mode:c++
57   c-file-style:"stroustrup"
58   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
59   indent-tabs-mode:nil
60   fill-column:99
61   End:
62 */
63 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :