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