15#include <glibmm/i18n.h>
34 auto win = app->get_active_window();
38 auto desktop = win->get_desktop();
53 auto win = app->get_active_window();
57 auto desktop = win->get_desktop();
74 auto undo_action = group->lookup_action(
"undo");
75 auto redo_action = group->lookup_action(
"redo");
76 auto undo_saction = std::dynamic_pointer_cast<Gio::SimpleAction>(undo_action);
77 auto redo_saction = std::dynamic_pointer_cast<Gio::SimpleAction>(redo_action);
81 if (!undo_saction || !redo_saction) {
82 show_output(
"UndoActions: can't find undo or redo action!");
86 undo_saction->set_enabled(
undo);
87 redo_saction->set_enabled(
redo);
90const Glib::ustring
SECTION = NC_(
"Action Section",
"Edit Document");
95 {
"doc.undo", N_(
"Undo"),
SECTION, N_(
"Undo last action")},
96 {
"doc.redo", N_(
"Redo"),
SECTION, N_(
"Do again the last undone action")},
106 group->add_action(
"undo", sigc::bind(sigc::ptr_fun(&
undo), document));
107 group->add_action(
"redo", sigc::bind(sigc::ptr_fun(&
redo), document));
void show_output(Glib::ustring const &data, bool const is_cerr)
void undo(SPDocument *document)
void add_actions_undo_document(SPDocument *document)
const Glib::ustring SECTION
std::vector< std::vector< Glib::ustring > > raw_data_undo_document
void enable_undo_actions(SPDocument *document, bool undo, bool redo)
void redo(SPDocument *document)
Actions for Undo/Redo tied to document.
static InkscapeApplication * instance()
Singleton instance.
static gboolean redo(SPDocument *document)
static gboolean undo(SPDocument *document)
Inkscape::UI::Widget::Canvas * getCanvas() const
Typed SVG document implementation.
Glib::RefPtr< Gio::SimpleActionGroup > getActionGroup()
Editable view implementation.
TODO: insert short description here.
Inkscape - An SVG editor.