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