]> Shamusworld >> Repos - architektonas/blob - src/circle.h
1f0d38723836822e32ba82089f163dfde45ca9c2
[architektonas] / src / circle.h
1 #ifndef __CIRCLE_H__
2 #define __CIRCLE_H__
3
4 #include "object.h"
5
6 class Circle: public Object
7 {
8         public:
9                 Circle(Vector, double, Object * p = 0);
10                 ~Circle();
11
12                 virtual void Draw(Painter *);
13                 virtual Vector Center(void);
14                 virtual bool Collided(Vector);
15                 virtual void PointerMoved(Vector);
16                 virtual void PointerReleased(void);
17                 virtual bool HitTest(Point);
18                 virtual void Enumerate(FILE *);
19                 virtual QRectF Extents(void);
20 //              virtual Object * Copy(void);
21 //              virtual ObjectType Type(void);
22
23         protected:
24                 void SaveState(void);
25                 bool StateChanged(void);
26
27         protected:
28                 double radius;                                          // Center is Object::position
29                 Vector dragPoint;                                       // Used for rendering edge dragging
30
31         private:
32                 bool draggingEdge;
33                 bool draggingCenter;
34                 bool objectWasDragged;
35                 bool hitCenter, hitCircle;
36                 bool oldHitCenter, oldHitCircle;
37 };
38
39 #endif  // __CIRCLE_H__