]> Shamusworld >> Repos - architektonas/blob - src/base/preview.h
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / base / preview.h
1 #ifndef __PREVIEW_H__
2 #define __PREVIEW_H__
3
4 #include "entitycontainer.h"
5 #include "vector.h"
6
7 class Entity;
8 class PaintInterface;
9
10 /**
11  * This class supports previewing. The Snapper class uses
12  * an instance of Preview to preview entities, ranges,
13  * lines, arcs, ... on the fly.
14  *
15  * @author Andrew Mustun
16  */
17 class Preview: public EntityContainer
18 {
19         public:
20                 Preview(EntityContainer * parent = NULL);
21                 ~Preview();
22
23                 virtual void addEntity(Entity * entity);
24                 void addCloneOf(Entity * entity);
25                 virtual void addSelectionFrom(EntityContainer & container);
26                 virtual void addAllFrom(EntityContainer & container);
27                 virtual void addStretchablesFrom(EntityContainer & container,
28                         const Vector & v1, const Vector & v2);
29
30                 void SetOffset(Vector);
31                 Vector Offset(void);
32                 void SetVisible(bool visibility = true);
33                 bool Visible(void);
34                 void Draw(GraphicView *, PaintInterface *);
35
36         private:
37                 int maxEntities;
38                 bool visible;
39                 Vector offset;
40 };
41
42 #endif