2 * Copyright 2006-2012 Stephan Aßmus <superstippi@gmx.de>
3 * Distributed under the terms of the MIT License.
6 #ifndef UNDOABLE_EDIT_H
7 #define UNDOABLE_EDIT_H
9 #include <Referenceable.h>
14 class UndoableEdit
: public BReferenceable
{
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
; }
39 typedef BReference
<UndoableEdit
> UndoableEditRef
;
41 #endif // UNDOABLE_EDIT_H