#include <action_system.h>
Public Member Functions | |
System () | |
~System () | |
const etl::handle< Action::Base > & | get_most_recent_action () |
bool | get_clear_redo_stack_on_new_action () const |
void | set_clear_redo_stack_on_new_action (bool x) |
bool | perform_action (etl::handle< Action::Base > action) |
bool | set_action_status (etl::handle< Action::Undoable > action, bool x) |
const Stack & | undo_action_stack () const |
const Stack & | redo_action_stack () const |
bool | undo () |
Undoes the last action. | |
bool | redo () |
Redoes the last undone action. | |
void | clear_undo_stack () |
Clears the undo stack. | |
void | clear_redo_stack () |
Clears the redo stack. | |
void | inc_action_count () const |
Increments the action counter. | |
void | dec_action_count () const |
Decrements the action counter. | |
void | reset_action_count () const |
Resets the action counter. | |
int | get_action_count () const |
Returns the number of actions performed since last save. | |
void | set_ui_interface (const etl::handle< UIInterface > &uim) |
void | unset_ui_interface () |
const etl::handle< UIInterface > & | get_ui_interface () |
sigc::signal< void, bool > & | signal_unsaved_status_changed () |
sigc::signal< void, bool > & | signal_undo_status () |
sigc::signal< void, bool > & | signal_redo_status () |
sigc::signal< void > & | signal_undo_stack_cleared () |
sigc::signal< void > & | signal_redo_stack_cleared () |
sigc::signal< void > & | signal_undo () |
sigc::signal< void > & | signal_redo () |
sigc::signal< void, etl::handle< Action::Undoable > > & | signal_new_action () |
Called whenever an undoable action is processed and added to the stack. | |
sigc::signal< void, etl::handle< Action::Undoable > > & | signal_action_status_changed () |
Friends | |
class | PassiveGrouper |
Action::System::System | ( | ) |
References unset_ui_interface().
Action::System::~System | ( | ) |
const etl::handle<Action::Base>& synfigapp::Action::System::get_most_recent_action | ( | ) | [inline] |
bool synfigapp::Action::System::get_clear_redo_stack_on_new_action | ( | ) | const [inline] |
void synfigapp::Action::System::set_clear_redo_stack_on_new_action | ( | bool | x | ) | [inline] |
bool Action::System::perform_action | ( | etl::handle< Action::Base > | action | ) |
References _, clear_redo_stack(), clear_undo_stack(), synfigapp::Action::CanvasSpecific::get_canvas(), synfigapp::Action::CanvasSpecific::get_canvas_interface(), synfigapp::Action::Error::get_desc(), synfigapp::Action::Error::get_type(), get_ui_interface(), inc_action_count(), synfigapp::Action::CanvasSpecific::is_dirty(), synfigapp::UIInterface::RESPONSE_NO, signal_new_action(), and synfigapp::Action::Error::TYPE_UNABLE.
Referenced by studio::Instance::process_action().
bool Action::System::set_action_status | ( | etl::handle< Action::Undoable > | action, | |
bool | x | |||
) |
bool synfigapp::Action::System::undo | ( | ) |
Undoes the last action.
References _, synfigapp::Action::CanvasSpecific::get_canvas(), synfigapp::Action::CanvasSpecific::get_canvas_interface(), get_ui_interface(), synfigapp::Action::CanvasSpecific::is_dirty(), and undo_action_stack().
bool Action::System::redo | ( | ) |
Redoes the last undone action.
References _, synfigapp::Action::CanvasSpecific::get_canvas(), synfigapp::Action::CanvasSpecific::get_canvas_interface(), get_ui_interface(), synfigapp::Action::CanvasSpecific::is_dirty(), and redo_action_stack().
void Action::System::clear_undo_stack | ( | ) |
void Action::System::clear_redo_stack | ( | ) |
void Action::System::inc_action_count | ( | ) | const |
Increments the action counter.
Referenced by perform_action().
void Action::System::dec_action_count | ( | ) | const |
Decrements the action counter.
void Action::System::reset_action_count | ( | ) | const |
Resets the action counter.
Referenced by synfigapp::Instance::save(), and synfigapp::Instance::save_as().
int synfigapp::Action::System::get_action_count | ( | ) | const [inline] |
Returns the number of actions performed since last save.
Referenced by studio::Instance::dialog_cvs_commit(), studio::Instance::dialog_cvs_update(), studio::Instance::safe_close(), and studio::Instance::safe_revert().
void synfigapp::Action::System::set_ui_interface | ( | const etl::handle< UIInterface > & | uim | ) | [inline] |
References ui_interface_.
void synfigapp::Action::System::unset_ui_interface | ( | ) | [inline] |
const etl::handle<UIInterface>& synfigapp::Action::System::get_ui_interface | ( | ) | [inline] |
sigc::signal<void,bool>& synfigapp::Action::System::signal_unsaved_status_changed | ( | ) | [inline] |
Referenced by studio::Instance::Instance().
sigc::signal<void,bool>& synfigapp::Action::System::signal_undo_status | ( | ) | [inline] |
Referenced by studio::Instance::Instance().
sigc::signal<void,bool>& synfigapp::Action::System::signal_redo_status | ( | ) | [inline] |
Referenced by studio::Instance::Instance().
sigc::signal<void>& synfigapp::Action::System::signal_undo_stack_cleared | ( | ) | [inline] |
sigc::signal<void>& synfigapp::Action::System::signal_redo_stack_cleared | ( | ) | [inline] |
sigc::signal<void>& synfigapp::Action::System::signal_undo | ( | ) | [inline] |
sigc::signal<void>& synfigapp::Action::System::signal_redo | ( | ) | [inline] |
sigc::signal<void,etl::handle<Action::Undoable> >& synfigapp::Action::System::signal_new_action | ( | ) | [inline] |
Called whenever an undoable action is processed and added to the stack.
Referenced by perform_action().
sigc::signal<void,etl::handle<Action::Undoable> >& synfigapp::Action::System::signal_action_status_changed | ( | ) | [inline] |
friend class PassiveGrouper [friend] |
Reimplemented in synfigapp::Instance.