Code

fix bug #1568462 boolean operation remove mask/clip-path
[inkscape.git] / src / document.h
index 7cf1dc2de9a3dad23487c951b9767e346cba60be..12848aa68f469442a75d50be0448ed805d031588 100644 (file)
 #include "gc-managed.h"
 #include "gc-finalized.h"
 #include "gc-anchored.h"
+#include <glibmm/ustring.h>
+#include "verbs.h"
 
 namespace Avoid {
 class Router;
 }
 
+struct NRRect;
 struct SPDesktop;
 struct SPItem;
 struct SPObject;
@@ -40,6 +43,7 @@ namespace Inkscape {
     struct Application;
     class Selection; 
     class UndoStackObserver;
+    class EventLog;
     namespace XML {
         class Document;
         class Node;
@@ -60,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();
@@ -89,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);
@@ -97,6 +103,8 @@ struct SPDocument : public Inkscape::GC::Managed<>,
        void bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object);
        SPObject *getObjectByRepr(Inkscape::XML::Node *repr);
 
+    Glib::ustring getLanguage();
+
        void queueForOrphanCollection(SPObject *object);
        void collectOrphans();
 
@@ -107,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
@@ -120,6 +130,8 @@ public:
         void reset_key (void *dummy);
         sigc::connection _selection_changed_connection;
         sigc::connection _desktop_activated_connection;
+
+       void fitToRect(NRRect const & rect);
 };
 
 SPDocument *sp_document_new (const gchar *uri, unsigned int keepalive, bool make_new = false);
@@ -129,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
  */
@@ -158,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);
@@ -175,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 */