X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdocument.h;h=b0afba5ec50e05e7b914eb0cf64ad5845f8a33ae;hb=761a541468cc0b8a7fcfb8c65784c0896f0f80f4;hp=f601b15ff168a705f614ef9715a5daab62c03cea;hpb=35e0418c921e7057987f57ba30ba95ec5e03c9e5;p=inkscape.git diff --git a/src/document.h b/src/document.h index f601b15ff..b0afba5ec 100644 --- a/src/document.h +++ b/src/document.h @@ -27,6 +27,7 @@ #include "gc-finalized.h" #include "gc-anchored.h" #include +#include "verbs.h" namespace Avoid { class Router; @@ -42,6 +43,7 @@ namespace Inkscape { struct Application; class Selection; class UndoStackObserver; + class EventLog; namespace XML { class Document; class Node; @@ -62,6 +64,7 @@ struct SPDocument : public Inkscape::GC::Managed<>, typedef sigc::signal ResizedSignal; typedef sigc::signal ReconstructionStart; typedef sigc::signal ReconstructionFinish; + typedef sigc::signal CommitSignal; SPDocument(); ~SPDocument(); @@ -91,6 +94,7 @@ struct SPDocument : public Inkscape::GC::Managed<>, sigc::connection connectModified(ModifiedSignal::slot_type slot); sigc::connection connectURISet(URISetSignal::slot_type slot); sigc::connection connectResized(ResizedSignal::slot_type slot); + sigc::connection connectCommit(CommitSignal::slot_type slot); void bindObjectToId(gchar const *id, SPObject *object); SPObject *getObjectById(gchar const *id); @@ -111,6 +115,10 @@ struct SPDocument : public Inkscape::GC::Managed<>, void addUndoObserver(Inkscape::UndoStackObserver& observer); void removeUndoObserver(Inkscape::UndoStackObserver& observer); + Inkscape::EventLog& getEventLog() const; + + bool _updateDocument(); + private: SPDocument(SPDocument const &); // no copy void operator=(SPDocument const &); // no assign @@ -125,7 +133,7 @@ public: sigc::connection _selection_changed_connection; sigc::connection _desktop_activated_connection; - void SPDocument::fitToRect(NRRect const & rect); + void fitToRect(NRRect const & rect); }; SPDocument *sp_document_new (const gchar *uri, unsigned int keepalive, bool make_new = false); @@ -135,6 +143,9 @@ SPDocument *sp_document_new_dummy(); SPDocument *sp_document_ref (SPDocument *doc); SPDocument *sp_document_unref (SPDocument *doc); + +SPDocument *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive); + /* * Access methods */ @@ -181,8 +192,8 @@ void sp_document_request_modified (SPDocument *doc); gint sp_document_ensure_up_to_date (SPDocument *doc); /* Save all previous actions to stack, as one undo step */ -void sp_document_done (SPDocument *document); -void sp_document_maybe_done (SPDocument *document, const gchar *key); +void sp_document_done (SPDocument *document, unsigned int event_type, Glib::ustring event_description); +void sp_document_maybe_done (SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description); void sp_document_reset_key (Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base); /* Cancel (and revert) current unsaved actions */