diff options
| author | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-07-02 12:35:42 +0000 |
|---|---|---|
| committer | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-07-02 12:35:42 +0000 |
| commit | d25a9a072143eafa4a9823b84e977c4b85d45efe (patch) | |
| tree | ef59162da575782282a2e127931707a63d7cbbb0 /src/document-undo.cpp | |
| parent | C++fied SPDocument added (diff) | |
| download | inkscape-d25a9a072143eafa4a9823b84e977c4b85d45efe.tar.gz inkscape-d25a9a072143eafa4a9823b84e977c4b85d45efe.zip | |
New Class SPDocumentUndo created which takes care of c++fying some non SPDocument based methods
(bzr r9546.1.3)
Diffstat (limited to 'src/document-undo.cpp')
| -rw-r--r-- | src/document-undo.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/document-undo.cpp b/src/document-undo.cpp index ee15e480f..280eea243 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -63,6 +63,7 @@ #include "xml/repr.h" #include "document-private.h" #include "inkscape.h" +//#include "document-undo.h" #include "debug/event-tracker.h" #include "debug/simple-event.h" #include "debug/timestamp.h" @@ -85,7 +86,7 @@ sp_document_set_undo_sensitive(document, saved); \endverbatim */ void -sp_document_set_undo_sensitive (SPDocument *doc, bool sensitive) +SPDocumentUndo::set_undo_sensitive (SPDocument *doc, bool sensitive) { g_assert (doc != NULL); g_assert (doc->priv != NULL); @@ -112,7 +113,7 @@ sp_document_set_undo_sensitive (SPDocument *doc, bool sensitive) * the saved bools in a stack. Perhaps this is why the above solution is better. */ -bool sp_document_get_undo_sensitive(SPDocument const *document) { +bool SPDocumentUndo::get_undo_sensitive(SPDocument const *document) { g_assert(document != NULL); g_assert(document->priv != NULL); @@ -120,13 +121,13 @@ bool sp_document_get_undo_sensitive(SPDocument const *document) { } void -sp_document_done (SPDocument *doc, const unsigned int event_type, Glib::ustring event_description) +SPDocumentUndo::done (SPDocument *doc, const unsigned int event_type, Glib::ustring event_description) { - sp_document_maybe_done (doc, NULL, event_type, event_description); + maybe_done (doc, NULL, event_type, event_description); } void -sp_document_reset_key (Inkscape::Application */*inkscape*/, SPDesktop */*desktop*/, GtkObject *base) +SPDocumentUndo::reset_key (Inkscape::Application */*inkscape*/, SPDesktop */*desktop*/, GtkObject *base) { SPDocument *doc = (SPDocument *) base; doc->actionkey = NULL; @@ -165,7 +166,7 @@ public: } void -sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int event_type, +SPDocumentUndo::maybe_done (SPDocument *doc, const gchar *key, const unsigned int event_type, Glib::ustring event_description) { g_assert (doc != NULL); @@ -178,7 +179,7 @@ sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int ev doc->ensure_up_to_date (); - sp_document_clear_redo (doc); + SPDocumentUndo::clear_redo (doc); Inkscape::XML::Event *log = sp_repr_coalesce_log (doc->priv->partial, sp_repr_commit_undoable (doc->rdoc)); doc->priv->partial = NULL; @@ -209,7 +210,7 @@ sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int ev } void -sp_document_cancel (SPDocument *doc) +SPDocumentUndo::cancel (SPDocument *doc) { g_assert (doc != NULL); g_assert (doc->priv != NULL); @@ -241,7 +242,7 @@ static void finish_incomplete_transaction(SPDocument &doc) { } gboolean -sp_document_undo (SPDocument *doc) +SPDocumentUndo::undo (SPDocument *doc) { using Inkscape::Debug::EventTracker; using Inkscape::Debug::SimpleEvent; @@ -287,7 +288,7 @@ sp_document_undo (SPDocument *doc) } gboolean -sp_document_redo (SPDocument *doc) +SPDocumentUndo::redo (SPDocument *doc) { using Inkscape::Debug::EventTracker; using Inkscape::Debug::SimpleEvent; @@ -333,7 +334,7 @@ sp_document_redo (SPDocument *doc) } void -sp_document_clear_undo (SPDocument *doc) +SPDocumentUndo::clear_undo (SPDocument *doc) { if (doc->priv->undo) doc->priv->undoStackObservers.notifyClearUndoEvent(); @@ -351,7 +352,7 @@ sp_document_clear_undo (SPDocument *doc) } void -sp_document_clear_redo (SPDocument *doc) +SPDocumentUndo::clear_redo (SPDocument *doc) { if (doc->priv->redo) doc->priv->undoStackObservers.notifyClearRedoEvent(); |
