Code

Added skeleton files for other filter primitives' SP-objects. Added blur slider on...
[inkscape.git] / src / document.h
index f601b15ff168a705f614ef9715a5daab62c03cea..b0afba5ec50e05e7b914eb0cf64ad5845f8a33ae 100644 (file)
@@ -27,6 +27,7 @@
 #include "gc-finalized.h"
 #include "gc-anchored.h"
 #include <glibmm/ustring.h>
+#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<void, double, double> ResizedSignal;
        typedef sigc::signal<void> ReconstructionStart;
        typedef sigc::signal<void> ReconstructionFinish;
+  typedef sigc::signal<void> 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 */