28 #include <sigc++/bind.h>
71 if (
this == &rhs)
return *
this;
106 for (list<Command*>::iterator i =
actions.begin(); i !=
actions.end(); ++i) {
116 for (list<Command*>::iterator i =
actions.begin(); i !=
actions.end(); ++i) {
124 for (list<Command*>::reverse_iterator i =
actions.rbegin(); i !=
actions.rend(); ++i) {
146 list<Command*>::iterator it;
177 uint32_t current_depth =
UndoList.size();
181 if (d > current_depth) {
188 uint32_t cnt = current_depth - d;
201 uint32_t current_depth =
UndoList.size();
210 if ((
_depth > 0) && current_depth && (current_depth >=
_depth)) {
212 uint32_t cnt = 1 + (current_depth -
_depth);
225 for (std::list<UndoTransaction*>::iterator i =
RedoList.begin(); i !=
RedoList.end(); ++i) {
304 for (std::list<UndoTransaction*>::iterator i =
RedoList.begin(); i !=
RedoList.end(); ++i) {
318 for (std::list<UndoTransaction*>::iterator i =
UndoList.begin(); i !=
UndoList.end(); ++i) {
345 }
else if (depth < 0) {
349 for (list<UndoTransaction*>::iterator it =
UndoList.begin(); it !=
UndoList.end(); ++it) {
357 list<UndoTransaction*> in_order;
359 for (list<UndoTransaction*>::reverse_iterator it =
UndoList.rbegin(); it !=
UndoList.rend() && depth; ++it, depth--) {
360 in_order.push_front (*it);
363 for (list<UndoTransaction*>::iterator it = in_order.begin(); it != in_order.end(); it++) {
void redo(unsigned int n)
std::list< Command * > actions
void undo(unsigned int n)
void remove(UndoTransaction *)
PBD::Signal0< void > Changed
PBD::Signal0< void > DropReferences
void command_death(UndoTransaction *ut, Command *c)
UndoTransaction & operator=(const UndoTransaction &)
PBD::Signal0< void > EndUndoRedo
XMLNode & get_state(int32_t depth=0)
void add(UndoTransaction *ut)
PBD::Signal0< void > BeginUndoRedo
std::list< UndoTransaction * > UndoList
void remove_command(Command *const)
void add_command(Command *const)
XMLProperty * add_property(const char *name, const std::string &value)
void add_child_nocopy(XMLNode &)
struct timeval _timestamp
friend void command_death(UndoTransaction *, Command *)
UndoRedoSignaller(UndoHistory &uh)
std::list< UndoTransaction * > RedoList