summaryrefslogtreecommitdiffstats
path: root/src/document-private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/document-private.h')
-rw-r--r--src/document-private.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/document-private.h b/src/document-private.h
new file mode 100644
index 000000000..34e61a9a0
--- /dev/null
+++ b/src/document-private.h
@@ -0,0 +1,67 @@
+#ifndef __SP_DOCUMENT_PRIVATE_H__
+#define __SP_DOCUMENT_PRIVATE_H__
+
+/*
+ * Seldom needed document data
+ *
+ * Authors:
+ * Lauris Kaplinski <lauris@kaplinski.com>
+ *
+ * Copyright (C) 1999-2002 Lauris Kaplinski
+ * Copyright (C) 2001-2002 Ximian, Inc.
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include <map>
+#include <sigc++/sigc++.h>
+#include "xml/event-fns.h"
+#include "sp-defs.h"
+#include "sp-root.h"
+#include "document.h"
+
+#include "composite-undo-stack-observer.h"
+
+#define SP_DOCUMENT_DEFS(d) ((SPObject *) SP_ROOT (SP_DOCUMENT_ROOT (d))->defs)
+
+namespace Inkscape {
+namespace XML {
+class Event;
+}
+}
+
+
+struct SPDocumentPrivate {
+ typedef std::map<GQuark, SPDocument::IDChangedSignal> IDChangedSignalMap;
+ typedef std::map<GQuark, SPDocument::ResourcesChangedSignal> ResourcesChangedSignalMap;
+
+ GHashTable *iddef; /**< Dictionary of id -> SPObject mappings */
+ GHashTable *reprdef; /**< Dictionary of Inkscape::XML::Node -> SPObject mappings */
+
+ /** Dictionary of signals for id changes */
+ IDChangedSignalMap id_changed_signals;
+
+ /* Resources */
+ /* It is GHashTable of GSLists */
+ GHashTable *resources;
+ ResourcesChangedSignalMap resources_changed_signals;
+
+ SPDocument::ModifiedSignal modified_signal;
+ SPDocument::URISetSignal uri_set_signal;
+ SPDocument::ResizedSignal resized_signal;
+ SPDocument::ReconstructionStart _reconstruction_start_signal;
+ SPDocument::ReconstructionFinish _reconstruction_finish_signal;
+
+ /* Undo/Redo state */
+ guint sensitive: 1; /* If we save actions to undo stack */
+ Inkscape::XML::Event * partial; /* partial undo log when interrupted */
+ int history_size;
+ GSList * undo; /* Undo stack of reprs */
+ GSList * redo; /* Redo stack of reprs */
+
+ /* Undo listener */
+ Inkscape::CompositeUndoStackObserver undoStackObservers;
+
+};
+
+#endif