]> Shamusworld >> Repos - architektonas/blob - src/base/rs_preview.h
e1151de3efaae88f51163a13cf03da0deab00899
[architektonas] / src / base / rs_preview.h
1 #ifndef RS_PREVIEW_H
2 #define RS_PREVIEW_H
3
4 #include "rs_entitycontainer.h"
5 #include "vector.h"
6
7 class RS_Entity;
8 class PaintInterface;
9
10 /**
11  * This class supports previewing. The RS_Snapper class uses
12  * an instance of RS_Preview to preview entities, ranges,
13  * lines, arcs, ... on the fly.
14  *
15  * @author Andrew Mustun
16  */
17 class RS_Preview: public RS_EntityContainer
18 {
19         public:
20                 RS_Preview(RS_EntityContainer * parent = NULL);
21                 ~RS_Preview();
22
23                 virtual void addEntity(RS_Entity * entity);
24                 void addCloneOf(RS_Entity * entity);
25                 virtual void addSelectionFrom(RS_EntityContainer & container);
26                 virtual void addAllFrom(RS_EntityContainer & container);
27                 virtual void addStretchablesFrom(RS_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