]> Shamusworld >> Repos - architektonas/blob - src/container.h
Added Architektonas drawing file loading/saving infrastructure.
[architektonas] / src / container.h
1 #ifndef __CONTAINER_H__
2 #define __CONTAINER_H__
3
4 #include <vector>
5 #include "object.h"
6
7 class Container: public Object
8 {
9         public:
10 //              Container(void);
11                 Container(Vector, Object * p = 0);
12                 Container(const Container &);
13                 ~Container();
14
15                 Container & operator=(const Container &);
16                 virtual void Draw(Painter *);
17                 virtual Vector Center(void);
18                 virtual bool Collided(Vector);
19                 virtual void PointerMoved(Vector);
20                 virtual void PointerReleased(void);
21                 virtual bool NeedsUpdate(void);
22                 virtual void Add(Object *);
23                 void Clear(void);
24
25         protected:
26                 Vector oldPoint;                                        // Used for dragging
27
28         private:
29                 std::vector<Object *> objects;
30                 bool dragging;
31                 bool draggingHandle1;
32                 bool draggingHandle2;
33 //              bool needUpdate;
34                 bool objectWasDragged;
35 };
36
37 #endif  // __CONTAINER_H__