summaryrefslogtreecommitdiffstats
path: root/src/document-undo.h
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-12-12 08:40:34 +0000
committerJon A. Cruz <jon@joncruz.org>2010-12-12 08:40:34 +0000
commitaadfea4113abc6863d7ab03d21b973802c41c503 (patch)
tree3f890c0c112433fd850d59558208addf1baa85da /src/document-undo.h
parentPot and Dutch translation update (diff)
parentA simple layout document as to what, why and how is cppification. (diff)
downloadinkscape-aadfea4113abc6863d7ab03d21b973802c41c503.tar.gz
inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.zip
Merge and cleanup of GSoC C++-ification project.
(bzr r9945.1.1)
Diffstat (limited to 'src/document-undo.h')
-rw-r--r--src/document-undo.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/document-undo.h b/src/document-undo.h
new file mode 100644
index 000000000..9be260fa2
--- /dev/null
+++ b/src/document-undo.h
@@ -0,0 +1,57 @@
+#ifndef SEEN_SP_DOCUMENT_UNDO_H
+#define SEEN_SP_DOCUMENT_UNDO_H
+
+
+namespace Inkscape {
+
+class DocumentUndo
+{
+public:
+
+ /**
+ * Set undo sensitivity.
+ *
+ * \note
+ * Since undo sensitivity needs to be nested, setting undo sensitivity
+ * should be done like this:
+ *\verbatim
+ bool saved = sp_document_get_undo_sensitive(document);
+ sp_document_set_undo_sensitive(document, false);
+ ... do stuff ...
+ sp_document_set_undo_sensitive(document, saved); \endverbatim
+ */
+ static void setUndoSensitive(SPDocument *doc, bool sensitive);
+
+ static bool getUndoSensitive(SPDocument const *document);
+
+ static void clearUndo(SPDocument *document);
+
+ static void clearRedo(SPDocument *document);
+
+ static void done(SPDocument *document, unsigned int event_type, Glib::ustring const &event_description);
+
+ static void maybeDone(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring const &event_description);
+
+ static void resetKey(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base);
+
+ static void cancel(SPDocument *document);
+
+ static gboolean undo(SPDocument *document);
+
+ static gboolean redo(SPDocument *document);
+};
+
+} // namespace Inkscape
+
+#endif // SEEN_SP_DOCUMENT_UNDO_H
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :