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