]> Shamusworld >> Repos - architektonas/blob - src/circle.h
Preliminary start on zooming/circle hover feedback.
[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 NeedsUpdate(void);
18
19         protected:
20                 bool HitTest(Point);
21                 void SaveState(void);
22                 bool StateChanged(void);
23
24         protected:
25                 double radius;                                          // Center is Object::position
26                 Vector oldPoint;                                        // Used for dragging
27
28         private:
29                 bool dragging;
30                 bool draggingHandle1;
31                 bool draggingHandle2;
32 //              bool needUpdate;
33                 bool objectWasDragged;
34                 bool hitCenter, hitCircle;
35                 bool oldHitCenter, oldHitCircle;
36 };
37
38 #endif  // __CIRCLE_H__