]> Shamusworld >> Repos - architektonas/blob - src/base/rs_undoable.h
Fixed thumbnail rendering in LibraryWidget and DXF detection.
[architektonas] / src / base / rs_undoable.h
1 #ifndef RS_UNDOABLE_H
2 #define RS_UNDOABLE_H
3
4 #include "rs.h"
5 #include "rs_flags.h"
6
7 class RS_UndoCycle;
8
9 /**
10  * Base class for something that can be added and deleted and every
11  * addition and deletion can be undone.
12  *
13  * @see RS_Undo
14  * @author Andrew Mustun
15  */
16 class RS_Undoable: public RS_Flags
17 {
18         public:
19                 RS_Undoable();
20                 virtual ~RS_Undoable();
21
22                 virtual RS2::UndoableType undoRtti();
23                 virtual void setUndoCycle(RS_UndoCycle * cycle);
24                 virtual void changeUndoState();
25                 virtual void setUndoState(bool undone);
26                 virtual bool isUndone() const;
27                 virtual void undoStateChanged(bool /*undone*/);
28                 //friend std::ostream& operator << (std::ostream& os, RS_Undoable& a);
29
30         private:
31                 RS_UndoCycle * cycle;
32 };
33
34 #endif