1 /* 2 * Copyright 2006-2112, Stephan Aßmus <superstippi@gmx.de> 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #ifndef COMPOUND_EDIT_H 7 #define COMPOUND_EDIT_H 8 9 #include <String.h> 10 11 #include "List.h" 12 #include "UndoableEdit.h" 13 14 class CompoundEdit : public UndoableEdit { 15 public: 16 CompoundEdit(const char* name); 17 virtual ~CompoundEdit(); 18 19 virtual status_t InitCheck(); 20 21 virtual status_t Perform(EditContext& context); 22 virtual status_t Undo(EditContext& context); 23 virtual status_t Redo(EditContext& context); 24 25 virtual void GetName(BString& name); 26 27 bool AppendEdit(const UndoableEditRef& edit); 28 29 private: 30 typedef List<UndoableEditRef, false, 2> EditList; 31 32 EditList fEdits; 33 BString fName; 34 }; 35 36 #endif // COMPOUND_EDIT_H 37