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 ObjectState GetState(void);
30 void Reparent(Object *);
31 //Hm. Object * Connect(Object *);
34 static void SetFixedAngle(bool state = true);
35 static void SetFixedLength(bool state = true);
36 static void SetFont(QFont *);
37 static void SetViewportHeight(int);
38 static void SetDeleteActive(bool state = true);
39 static void SetDimensionActive(bool state = true);
40 static void SetSnapMode(bool state = true);
43 Vector position; // All objects have a position (doubles as reference point)
50 Dimension * attachedDimension;
51 std::vector<Object *> connected;
55 static bool fixedAngle;
56 static bool fixedLength;
57 static int viewportHeight;
58 static bool deleteActive;
59 static bool dimensionActive;
60 static bool snapToGrid;
63 #endif // __OBJECT_H__