]> Shamusworld >> Repos - architektonas/blob - src/base/rs_previewactioninterface.h
Fixed preview rendering for ActionDrawLine...
[architektonas] / src / base / rs_previewactioninterface.h
1 #ifndef RS_PREVIEWACTIONINTERFACE_H
2 #define RS_PREVIEWACTIONINTERFACE_H
3
4 #include "rs_actioninterface.h"
5 #include "vector.h"
6
7 class RS_Preview;
8
9 /**
10  * This is the interface that must be implemented for all
11  * action classes which need a preview.
12  *
13  * @author Andrew Mustun
14  */
15 class RS_PreviewActionInterface: public RS_ActionInterface
16 {
17         public:
18                 RS_PreviewActionInterface(const char * name,
19                         RS_EntityContainer & container, GraphicView & graphicView);
20                 virtual ~RS_PreviewActionInterface();
21
22                 virtual void init(int status = 0);
23                 virtual void finish();
24                 virtual void suspend();
25                 virtual void resume();
26                 virtual void trigger();
27                 void clearPreview();
28                 void drawPreview();
29                 void deletePreview();
30
31 //      private:
32         protected:
33                 void xorPreview();
34
35         protected:
36                 /**
37                  * Preview that holds the entities to be previewed.
38                  */
39                 RS_Preview * preview;
40                 /**
41                  * Keeps track of the drawings in XOR mode.
42                  */
43                 bool visible;
44                 /**
45                  * Current offset of the preview.
46                  */
47                 Vector offset;
48 };
49
50 #endif