4 #include <vector> // This is a container
5 #include "vector.h" // This is the mathematical construct
11 enum ObjectState { OSInactive, OSSelected };
17 Object(Vector, Object * passedInParent = 0);
20 virtual void Draw(Painter *);
21 virtual Vector Center(void);
22 virtual bool Collided(Vector);
23 virtual void PointerMoved(Vector);
24 virtual void PointerReleased(void);
25 virtual bool NeedsUpdate(void);
26 virtual void Transmute(Object *, Object *);
27 virtual Object * GetParent(void);
28 virtual void Add(Object *);
29 virtual Vector * GetPointAt(Vector);
30 ObjectState GetState(void);
31 void Reparent(Object *);
32 Dimension * GetAttachedDimension(void);
33 //Hm. Object * Connect(Object *);
36 static void SetFixedAngle(bool state = true);
37 static void SetFixedLength(bool state = true);
38 static void SetFont(QFont *);
39 static void SetViewportHeight(int);
40 static void SetDeleteActive(bool state = true);
41 static void SetDimensionActive(bool state = true);
42 static void SetSnapMode(bool state = true);
45 Vector position; // All objects have a position (doubles as reference point)
52 Dimension * attachedDimension;
53 std::vector<Object *> connected;
57 static bool fixedAngle;
58 static bool fixedLength;
59 static int viewportHeight;
60 static bool deleteActive;
61 static bool dimensionActive;
62 static bool snapToGrid;
65 #endif // __OBJECT_H__