X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.h;h=2e2efffa5f5b14bb14c196052115ea84b0d6f521;hb=e11a07565fe5ef3dfafbf9a933d7a1575e058867;hp=0c8965403a3437663e0ea1dbe68faaec6dda89cf;hpb=bd9b40058a376c946318a444dd6c77737ec6ac98;p=architektonas diff --git a/src/object.h b/src/object.h index 0c89654..2e2efff 100644 --- a/src/object.h +++ b/src/object.h @@ -1,12 +1,15 @@ #ifndef __OBJECT_H__ #define __OBJECT_H__ +#include #include // This is a container #include "vector.h" // This is the mathematical construct +#include "connection.h" class Painter; class QFont; class Dimension; +//class FILE; enum ObjectState { OSInactive, OSSelected }; @@ -26,7 +29,16 @@ class Object virtual void Transmute(Object *, Object *); virtual Object * GetParent(void); virtual void Add(Object *); + virtual Vector * GetPointAt(Vector); + virtual void Enumerate(FILE *); + virtual Object * Copy(void); + virtual Vector GetPointAtParameter(double parameter); + virtual void Connect(Object *, double); + virtual void Disconnect(Object *, double); + virtual void DisconnectAll(Object *); ObjectState GetState(void); + void Reparent(Object *); +// Dimension * GetAttachedDimension(void); //Hm. Object * Connect(Object *); // Class methods @@ -36,6 +48,7 @@ class Object static void SetViewportHeight(int); static void SetDeleteActive(bool state = true); static void SetDimensionActive(bool state = true); + static void SetSnapMode(bool state = true); protected: Vector position; // All objects have a position (doubles as reference point) @@ -45,8 +58,8 @@ class Object ObjectState state; ObjectState oldState; bool needUpdate; - Dimension * attachedDimension; - std::vector connected; +// Dimension * attachedDimension; + std::vector connected; // Class variables static QFont * font; @@ -55,6 +68,7 @@ class Object static int viewportHeight; static bool deleteActive; static bool dimensionActive; + static bool snapToGrid; }; #endif // __OBJECT_H__