9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz#ifndef SEEN_SP_DOCUMENT_UNDO_H
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz#define SEEN_SP_DOCUMENT_UNDO_H
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
a4142717644b885998f4de2b27be4e8648315decMarkus Engelnamespace Glib {
a4142717644b885998f4de2b27be4e8648315decMarkus Engel class ustring;
a4142717644b885998f4de2b27be4e8648315decMarkus Engel}
a4142717644b885998f4de2b27be4e8648315decMarkus Engel
5c0a225af3510483730df7a138bb5c397e2fffc7Alex Valavanistypedef struct _GObject GObject;
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
ce476a1fb346f635574c285a4815b8de8a6cdb68Jon A. Cruzclass SPDesktop;
a4142717644b885998f4de2b27be4e8648315decMarkus Engelclass SPDocument;
2f64b614754d1f1ca1265fdb3624407f93933a15Alex Valavanisstruct InkscapeApplication;
ce476a1fb346f635574c285a4815b8de8a6cdb68Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruznamespace Inkscape {
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruzclass DocumentUndo
e6a72368cfbd1a572ccf34555c7ef824cd339740Abhishek Sharma Public{
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruzpublic:
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz /**
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz * Set undo sensitivity.
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz *
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz * \note
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz * Since undo sensitivity needs to be nested, setting undo sensitivity
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz * should be done like this:
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz *\verbatim
a63dbee6633e3ed991bb2b34cbed7c9f02c1a839Jon A. Cruz bool saved = DocumentUndo::getUndoSensitive(document);
a63dbee6633e3ed991bb2b34cbed7c9f02c1a839Jon A. Cruz DocumentUndo::setUndoSensitive(document, false);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz ... do stuff ...
a63dbee6633e3ed991bb2b34cbed7c9f02c1a839Jon A. Cruz DocumentUndo::setUndoSensitive(document, saved); \endverbatim
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz */
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static void setUndoSensitive(SPDocument *doc, bool sensitive);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static bool getUndoSensitive(SPDocument const *document);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static void clearUndo(SPDocument *document);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static void clearRedo(SPDocument *document);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static void done(SPDocument *document, unsigned int event_type, Glib::ustring const &event_description);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static void maybeDone(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring const &event_description);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
cf1b00269e6a363acfe397115fb123d1999759fdLiam P. White static void resetKey(SPDocument *doc);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static void cancel(SPDocument *document);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static gboolean undo(SPDocument *document);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static gboolean redo(SPDocument *document);
e6a72368cfbd1a572ccf34555c7ef824cd339740Abhishek Sharma Public};
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz} // namespace Inkscape
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz#endif // SEEN_SP_DOCUMENT_UNDO_H
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz/*
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz Local Variables:
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz mode:c++
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz c-file-style:"stroustrup"
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz indent-tabs-mode:nil
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz fill-column:99
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz End:
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz*/
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :