X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdocument.h;h=12848aa68f469442a75d50be0448ed805d031588;hb=ef9d155a8149d4793471047b3836db719b9e0292;hp=f601b15ff168a705f614ef9715a5daab62c03cea;hpb=35e0418c921e7057987f57ba30ba95ec5e03c9e5;p=inkscape.git diff --git a/src/document.h b/src/document.h index f601b15ff..12848aa68 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,8 @@ struct SPDocument : public Inkscape::GC::Managed<>, void addUndoObserver(Inkscape::UndoStackObserver& observer); void removeUndoObserver(Inkscape::UndoStackObserver& observer); + bool _updateDocument(); + private: SPDocument(SPDocument const &); // no copy void operator=(SPDocument const &); // no assign @@ -125,7 +131,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 +141,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 */ @@ -164,8 +173,8 @@ void sp_document_set_height (SPDocument * document, gdouble height, const SPUnit * Undo & redo */ -void sp_document_set_undo_sensitive (SPDocument * document, gboolean sensitive); -gboolean sp_document_get_undo_sensitive (SPDocument const * document); +void sp_document_set_undo_sensitive (SPDocument * document, bool sensitive); +bool sp_document_get_undo_sensitive (SPDocument const * document); void sp_document_clear_undo (SPDocument * document); void sp_document_clear_redo (SPDocument * document); @@ -181,8 +190,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 */