]> Shamusworld >> Repos - architektonas/blob - src/base/rs_previewactioninterface.h
Scrubbed out all references to RS2::qtToRsButton(). Gone!
[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, RS_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                 void xorPreview();
33
34         protected:
35                 /**
36                 * Preview that holds the entities to be previewed.
37                 */
38                 RS_Preview * preview;
39                 /**
40                 * Keeps track of the drawings in XOR mode.
41                 */
42                 bool visible;
43                 /**
44                 * Current offset of the preview.
45                 */
46                 Vector offset;
47 };
48
49 #endif