document-undo.h revision a63dbee6633e3ed991bb2b34cbed7c9f02c1a839
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental#ifndef SEEN_SP_DOCUMENT_UNDO_H
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental#define SEEN_SP_DOCUMENT_UNDO_H
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mentalnamespace Inkscape {
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
a8f1a69ef0da383f9b413c3043a74084e23b75c2mentalclass DocumentUndo
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental{
a8f1a69ef0da383f9b413c3043a74084e23b75c2mentalpublic:
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental /**
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental * Set undo sensitivity.
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental *
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental * \note
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental * Since undo sensitivity needs to be nested, setting undo sensitivity
c0537dcfe264414d52ad86579d57cb0cb2183dcbAlex Valavanis * should be done like this:
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental *\verbatim
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental bool saved = DocumentUndo::getUndoSensitive(document);
995ef36b2f4a73356bc05e380e05f1a66c8b2c8amental DocumentUndo::setUndoSensitive(document, false);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental ... do stuff ...
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental DocumentUndo::setUndoSensitive(document, saved); \endverbatim
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental */
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental static void setUndoSensitive(SPDocument *doc, bool sensitive);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental static bool getUndoSensitive(SPDocument const *document);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental static void clearUndo(SPDocument *document);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental static void clearRedo(SPDocument *document);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental static void done(SPDocument *document, unsigned int event_type, Glib::ustring const &event_description);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental static void maybeDone(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring const &event_description);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental static void resetKey(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental static void cancel(SPDocument *document);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental static gboolean undo(SPDocument *document);
9c0a44bb47b022c4cdb319d697ccd5a42d3253ddmental
995ef36b2f4a73356bc05e380e05f1a66c8b2c8amental static gboolean redo(SPDocument *document);
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental};
9c0a44bb47b022c4cdb319d697ccd5a42d3253ddmental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental} // namespace Inkscape
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental#endif // SEEN_SP_DOCUMENT_UNDO_H
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental/*
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental Local Variables:
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental mode:c++
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental c-file-style:"stroustrup"
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental indent-tabs-mode:nil
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental fill-column:99
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental End:
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental*/
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
a8f1a69ef0da383f9b413c3043a74084e23b75c2mental