summaryrefslogtreecommitdiffstats
path: root/src/libavoid/connector.h
diff options
context:
space:
mode:
authormjwybrow <mjwybrow@users.sourceforge.net>2006-02-10 04:23:35 +0000
committermjwybrow <mjwybrow@users.sourceforge.net>2006-02-10 04:23:35 +0000
commitbf26c1cb6feedab295da4823ef571a7e66fc36ed (patch)
tree1c99174b02c8a3c84d4f53403d16b3978bd23e3b /src/libavoid/connector.h
parentAdd unit conversion. (diff)
downloadinkscape-bf26c1cb6feedab295da4823ef571a7e66fc36ed.tar.gz
inkscape-bf26c1cb6feedab295da4823ef571a7e66fc36ed.zip
* src/sp-conn-end-pair.cpp, src/sp-conn-end-pair.h,
src/conn-avoid-ref.cpp, src/conn-avoid-ref.h, src/libavoid/connector.cpp, src/libavoid/connector.h, src/libavoid/visibility.cpp: Add some code to allow querying of items and connectors to find out what is attached to them. This will allow graph layout algorithms (currently being work on by Tim Dwyer) to determine a graph structure from the diagram. (bzr r107)
Diffstat (limited to 'src/libavoid/connector.h')
-rw-r--r--src/libavoid/connector.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libavoid/connector.h b/src/libavoid/connector.h
index 71713ae41..1fd4255a8 100644
--- a/src/libavoid/connector.h
+++ b/src/libavoid/connector.h
@@ -33,6 +33,7 @@ namespace Avoid {
class ConnRef;
typedef std::list<ConnRef *> ConnRefList;
+typedef std::list<unsigned int> IntList;
class ConnRef
@@ -48,6 +49,7 @@ class ConnRef
void freeRoute(void);
void calcRouteDist(void);
void updateEndPoint(const unsigned int type, const Point& point);
+ void setEndPointId(const unsigned int type, const unsigned int id);
void makeActive(void);
void makeInactive(void);
void lateSetup(const Point& src, const Point& dst);
@@ -62,9 +64,16 @@ class ConnRef
void makePathInvalid(void);
friend void markConnectors(ShapeRef *shape);
+ friend void attachedToShape(IntList &conns,
+ const unsigned int shapeId, const unsigned int type);
+ static const unsigned int runningTo;
+ static const unsigned int runningFrom;
+ static const unsigned int runningToAndFrom;
+
private:
unsigned int _id;
+ unsigned int _srcId, _dstId;
bool _needs_reroute_flag;
bool _false_path;
bool _active;
@@ -82,6 +91,8 @@ class ConnRef
extern ConnRefList connRefs;
extern void callbackAllInvalidConnectors(void);
+extern void attachedToShape(IntList &conns, const unsigned int shapeId,
+ const unsigned int type);
}