Code

Connector tool: make connectors avoid the convex hull of shapes.
[inkscape.git] / src / sp-conn-end.h
1 #ifndef SEEN_SP_CONN_END
2 #define SEEN_SP_CONN_END
4 #include <glib/gtypes.h>
5 #include <sigc++/connection.h>
7 #include "sp-use-reference.h"
8 #include "connection-points.h"
9 #include "conn-avoid-ref.h"
12 class SPConnEnd {
13 public:
14     SPConnEnd(SPObject *owner);
16     SPUseReference ref;
17     gchar *href;
19     /* In the following, type refers to connection point type,
20        i.e. default (one of the 9 combinations of right, centre,
21        left, top, bottom) or user-defined. The id serves to identify
22        the connection point in a list of connection points.
23     */
25     ConnPointType type;
26     int id;
28     /** Change of href string (not a modification of the attributes of the referrent). */
29     sigc::connection _changed_connection;
31     /** Called when the attached object gets deleted. */
32     sigc::connection _delete_connection;
34     /** A sigc connection for transformed signal, used to do move compensation. */
35     sigc::connection _transformed_connection;
37     void setAttacherHref(gchar const *, SPPath *);
39 private:
40     SPConnEnd(SPConnEnd const &);
41     SPConnEnd &operator=(SPConnEnd const &);
42 };
44 void sp_conn_end_href_changed(SPObject *old_ref, SPObject *ref,
45                               SPConnEnd *connEnd, SPPath *path, unsigned const handle_ix);
46 void sp_conn_reroute_path(SPPath *const path);
47 void sp_conn_reroute_path_immediate(SPPath *const path);
48 void sp_conn_redraw_path(SPPath *const path);
49 void sp_conn_end_detach(SPObject *const owner, unsigned const handle_ix);
52 #endif /* !SEEN_SP_CONN_END */
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 :