HaikuDepot: notify work status from main window
[haiku.git] / src / apps / haikudepot / edits_generic / UndoableEdit.h
blobd6c8ad36d2c939a61bfe4529f819876e8c4bcd6d
1 /*
2 * Copyright 2006-2012 Stephan Aßmus <superstippi@gmx.de>
3 * Distributed under the terms of the MIT License.
4 */
6 #ifndef UNDOABLE_EDIT_H
7 #define UNDOABLE_EDIT_H
9 #include <Referenceable.h>
11 class BString;
12 class EditContext;
14 class UndoableEdit : public BReferenceable {
15 public:
16 UndoableEdit();
17 virtual ~UndoableEdit();
19 virtual status_t InitCheck();
21 virtual status_t Perform(EditContext& context);
22 virtual status_t Undo(EditContext& context);
23 virtual status_t Redo(EditContext& context);
25 virtual void GetName(BString& name);
27 virtual bool UndoesPrevious(const UndoableEdit* previous);
28 virtual bool CombineWithNext(const UndoableEdit* next);
29 virtual bool CombineWithPrevious(
30 const UndoableEdit* previous);
32 inline bigtime_t TimeStamp() const
33 { return fTimeStamp; }
35 protected:
36 bigtime_t fTimeStamp;
39 typedef BReference<UndoableEdit> UndoableEditRef;
41 #endif // UNDOABLE_EDIT_H