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