/*
- Copyright (C) 2002 Brett Viren & Paul Davis
+ Copyright (C) 2002 Brett Viren & Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#ifndef __lib_pbd_undo_h__
void add_command (Command* const);
void remove_command (Command* const);
- void operator() ();
+ void operator() ();
void undo();
void redo();
XMLNode &get_state();
-
- void set_name (const std::string& str) {
- _name = str;
- }
- const std::string& name() const { return _name; }
void set_timestamp (struct timeval &t) {
_timestamp = t;
private:
std::list<Command*> actions;
struct timeval _timestamp;
- std::string _name;
bool _clearing;
+
+ friend void command_death (UndoTransaction*, Command *);
};
-class UndoHistory
+class UndoHistory : public sigc::trackable
{
public:
UndoHistory();
void clear_undo ();
void clear_redo ();
- XMLNode &get_state();
- void save_state();
+ XMLNode &get_state(uint32_t depth = 0);
+ void save_state();
+
+ sigc::signal<void> Changed;
private:
bool _clearing;