X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.h;h=5b19505d2c94be29bccb49cf44c87de0625b3b3d;hb=eb0057e8a8145032152e4c417fcd102ef5a21484;hp=e4bbe781c7c2a0bcb86ee8179d03f100faf0cd48;hpb=fa8da664bfb749497b1b2d2991077af0554cc369;p=architektonas diff --git a/src/object.h b/src/object.h index e4bbe78..5b19505 100644 --- a/src/object.h +++ b/src/object.h @@ -1,11 +1,14 @@ #ifndef __OBJECT_H__ #define __OBJECT_H__ -#include "vector.h" +#include // This is a container +#include "vector.h" // This is the mathematical construct +#include -class QPainter; +class Painter; class QFont; class Dimension; +//class FILE; enum ObjectState { OSInactive, OSSelected }; @@ -16,14 +19,22 @@ class Object Object(Vector, Object * passedInParent = 0); ~Object(); - virtual void Draw(QPainter *); + virtual void Draw(Painter *); virtual Vector Center(void); virtual bool Collided(Vector); virtual void PointerMoved(Vector); virtual void PointerReleased(void); virtual bool NeedsUpdate(void); 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); ObjectState GetState(void); + void Reparent(Object *); + Dimension * GetAttachedDimension(void); +//Hm. Object * Connect(Object *); // Class methods static void SetFixedAngle(bool state = true); @@ -31,6 +42,8 @@ class Object static void SetFont(QFont *); 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) @@ -40,8 +53,8 @@ class Object ObjectState state; ObjectState oldState; bool needUpdate; - Dimension * dimPoint1; - Dimension * dimPoint2; + Dimension * attachedDimension; + std::vector connected; // Class variables static QFont * font; @@ -49,6 +62,8 @@ class Object static bool fixedLength; static int viewportHeight; static bool deleteActive; + static bool dimensionActive; + static bool snapToGrid; }; #endif // __OBJECT_H__