25 #ifndef __SYNFIGAPP_ACTIONSYSTEM_H
26 #define __SYNFIGAPP_ACTIONSYSTEM_H
31 #include <sigc++/signal.h>
32 #include <sigc++/object.h>
34 #include <synfig/canvas.h>
45 class CanvasInterface;
58 etl::loose_handle<System> instance_;
60 bool redraw_requested_;
62 etl::handle<CanvasInterface> canvas_interface_;
65 PassiveGrouper(etl::loose_handle<System> instance_,synfig::String name_);
69 const synfig::String &
get_name()
const {
return name_; }
71 void set_name(
const synfig::String &x) { name_=x; }
86 typedef std::list< etl::handle<Action::Undoable> >
Stack;
88 class System :
public etl::shared_object,
public sigc::trackable
110 Stack undo_action_stack_;
111 Stack redo_action_stack_;
113 synfig::String most_recent_action_name_;
115 std::list<PassiveGrouper*> group_stack_;
117 sigc::signal<void,bool> signal_undo_status_;
118 sigc::signal<void,bool> signal_redo_status_;
119 sigc::signal<void,etl::handle<Action::Undoable> > signal_new_action_;
120 sigc::signal<void> signal_undo_stack_cleared_;
121 sigc::signal<void> signal_redo_stack_cleared_;
122 sigc::signal<void> signal_undo_;
123 sigc::signal<void> signal_redo_;
124 sigc::signal<void,etl::handle<Action::Undoable> > signal_action_status_changed_;
126 mutable sigc::signal<void,bool> signal_unsaved_status_changed_;
129 mutable int action_count_;
133 bool clear_redo_stack_on_new_action_;
141 bool undo_(etl::handle<UIInterface> uim);
142 bool redo_(etl::handle<UIInterface> uim);
238 sigc::signal<void,etl::handle<Action::Undoable> >&
signal_new_action() {
return signal_new_action_; }