29 #ifndef AVOID_CONNECTIONPIN_H 30 #define AVOID_CONNECTIONPIN_H 37 #include "libavoid/dllexport.h" 44 static const unsigned int CONNECTIONPIN_UNSET = INT_MAX;
45 static const unsigned int CONNECTIONPIN_CENTRE = INT_MAX - 1;
53 typedef std::pair<unsigned int, unsigned int> ConnectionPinIds;
57 static const double ATTACH_POS_TOP = 0;
58 static const double ATTACH_POS_CENTRE = 0.5;
59 static const double ATTACH_POS_BOTTOM = 1;
60 static const double ATTACH_POS_LEFT = ATTACH_POS_TOP;
61 static const double ATTACH_POS_RIGHT = ATTACH_POS_BOTTOM;
63 static const double ATTACH_POS_MIN_OFFSET = 0;
64 static const double ATTACH_POS_MAX_OFFSET = -1;
170 const double xOffset,
const double yOffset,
171 const bool proportional,
const double insideOffset,
176 const double xOffset,
const double yOffset,
213 void setConnectionCost(
const double cost);
236 void setExclusive(
const bool exclusive);
243 bool isExclusive(
void)
const;
245 ConnectionPinIds ids(
void)
const;
252 friend class Obstacle;
256 void commonInitForShapeConnection(
void);
257 void updatePosition(
const Point& newPosition);
258 void updatePosition(
const Polygon& newPoly);
259 void updatePositionAndVisibility(
void);
260 void updateVisibility(
void);
261 void outputCode(FILE *fp)
const;
262 unsigned int containingObjectId(
void)
const;
268 unsigned int m_class_id;
271 double m_inside_offset;
276 double m_connection_cost;
278 std::set<ConnEnd *> m_connend_users;
280 bool m_using_proportional_offsets;
289 bool operator()(
const ShapeConnectionPin *lhs,
290 const ShapeConnectionPin *rhs)
const 292 return (*lhs) < (*rhs);
296 typedef std::set<ShapeConnectionPin *, CmpConnPinPtr> ShapeConnectionPinSet;
The ConnEnd class represents different possible endpoints for connectors.
Definition: connend.h:110
unsigned int ConnDirFlags
One or more Avoid::ConnDirFlag options.
Definition: connend.h:83
A dynamic Polygon, to which points can be easily added and removed.
Definition: geomtypes.h:207
The ShapeConnectionPin class represents a fixed point or "pin" on a shape that can be connected to...
Definition: connectionpin.h:96
Contains the interface for various geometry types and classes.
Contains the interface for the ConnEnd class.
The Point class defines a point in the plane.
Definition: geomtypes.h:52
libavoid: Object-avoiding orthogonal and polyline connector routing library.
Definition: actioninfo.cpp:33
The Router class represents a libavoid router instance.
Definition: router.h:386
The ShapeRef class represents a shape object.
Definition: shape.h:81
The JunctionRef class represents a fixed or free-floating point that connectors can be attached to...
Definition: junction.h:57