1 #ifndef __DIMENSION_H__
2 #define __DIMENSION_H__
6 enum DimensionType { DTLinear, DTRadial, DTDiametric, DTCircumferential, DTLeader };
8 class Dimension: public Object
11 Dimension(Vector, Vector, DimensionType dt = DTLinear, Object * p = 0);
12 Dimension(Vector *, Vector *, DimensionType dt = DTLinear, Object * p = 0);
15 virtual void Draw(Painter *);
16 virtual Vector Center(void);
17 virtual bool Collided(Vector);
18 virtual void PointerMoved(Vector);
19 virtual void PointerReleased(void);
20 void SetPoint1(Vector *);
21 void SetPoint2(Vector *);
22 Vector GetPoint1(void);
23 Vector GetPoint2(void);
27 Vector endpoint; // Starting point is Object::position
28 Vector oldPoint; // Used for dragging
34 bool objectWasDragged;
38 Vector * point1; // These couple to external points; if there
39 Vector * point2; // are none then fall back to endpoint/position
42 #endif // __DIMENSION_H__