1 #ifndef SEEN_SP_DOCUMENT_UNDO_H
2 #define SEEN_SP_DOCUMENT_UNDO_H
5 namespace Inkscape {
7 class DocumentUndo
8 {
9 public:
11 /**
12 * Set undo sensitivity.
13 *
14 * \note
15 * Since undo sensitivity needs to be nested, setting undo sensitivity
16 * should be done like this:
17 *\verbatim
18 bool saved = sp_document_get_undo_sensitive(document);
19 sp_document_set_undo_sensitive(document, false);
20 ... do stuff ...
21 sp_document_set_undo_sensitive(document, saved); \endverbatim
22 */
23 static void setUndoSensitive(SPDocument *doc, bool sensitive);
25 static bool getUndoSensitive(SPDocument const *document);
27 static void clearUndo(SPDocument *document);
29 static void clearRedo(SPDocument *document);
31 static void done(SPDocument *document, unsigned int event_type, Glib::ustring const &event_description);
33 static void maybeDone(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring const &event_description);
35 static void resetKey(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base);
37 static void cancel(SPDocument *document);
39 static gboolean undo(SPDocument *document);
41 static gboolean redo(SPDocument *document);
42 };
44 } // namespace Inkscape
46 #endif // SEEN_SP_DOCUMENT_UNDO_H
48 /*
49 Local Variables:
50 mode:c++
51 c-file-style:"stroustrup"
52 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
53 indent-tabs-mode:nil
54 fill-column:99
55 End:
56 */
57 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :