]> Shamusworld >> Repos - architektonas/blob - src/container.h
905e7572fab7ca8c31ab5688ecd48544dd2ef985
[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                 virtual QRectF Extents(void);
24                 virtual void Enumerate(FILE *);
25                 virtual Object * Copy(void);
26                 void Delete(Object *);
27                 void DeleteSelectedItems(void);
28                 void Clear(void);
29                 void SelectAll(void);
30                 void DeselectAll(void);
31                 int ItemsSelected(void);
32                 Object * SelectedItem(unsigned int);
33                 void MoveContentsTo(Container *);
34                 void MoveSelectedContentsTo(Container *);
35                 void ResizeAllDimensions(double);
36
37         protected:
38                 Vector oldPoint;                                        // Used for dragging
39
40         public:
41                 std::vector<Object *> objects;
42                 bool isTopLevelContainer;
43         private:
44                 bool dragging;
45                 bool draggingHandle1;
46                 bool draggingHandle2;
47                 bool objectWasDragged;
48                 bool hit;
49 };
50
51 #endif  // __CONTAINER_H__