]> Shamusworld >> Repos - architektonas/blob - src/line.h
Major refactor of Architektonas: Jettisoning old cruft.
[architektonas] / src / line.h
1 #ifndef __LINE_H__
2 #define __LINE_H__
3
4 #include "object.h"
5
6 class Line: public Object
7 {
8         public:
9                 Line(Vector, Vector, Object * p = 0);
10                 ~Line();
11
12                 virtual void Draw(QPainter *);
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                 Vector endpoint;                                        // Starting point is Object::position
21                 Vector oldPoint;                                        // Used for dragging
22
23         private:
24                 bool dragging;
25                 bool draggingHandle1;
26                 bool draggingHandle2;
27 //              bool needUpdate;
28                 bool objectWasDragged;
29                 double length;
30 };
31
32 #endif  // __LINE_H__