]> Shamusworld >> Repos - architektonas/blobdiff - src/object.h
Fix tool handling and circle highlighting.
[architektonas] / src / object.h
index b6f9558e452b9386a80cab88f841f49651dfa88c..2e2efffa5f5b14bb14c196052115ea84b0d6f521 100644 (file)
@@ -1,12 +1,15 @@
 #ifndef __OBJECT_H__
 #define __OBJECT_H__
 
+#include <stdio.h>
 #include <vector>                                                      // 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,8 +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
@@ -37,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)
@@ -46,8 +58,8 @@ class Object
                ObjectState state;
                ObjectState oldState;
                bool needUpdate;
-               Dimension * attachedDimension;
-               std::vector<Object *> connected;
+//             Dimension * attachedDimension;
+               std::vector<Connection> connected;
 
                // Class variables
                static QFont * font;
@@ -56,6 +68,7 @@ class Object
                static int viewportHeight;
                static bool deleteActive;
                static bool dimensionActive;
+               static bool snapToGrid;
 };
 
 #endif // __OBJECT_H__