From b7010ffde22a6845f1ceee7d74750da69cd53149 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 29 Oct 2018 10:10:24 +0100 Subject: Move contents of document-private.h to document.h. --- src/document.h | 71 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 13 deletions(-) (limited to 'src/document.h') diff --git a/src/document.h b/src/document.h index 142f6a2e3..5b93261de 100644 --- a/src/document.h +++ b/src/document.h @@ -18,17 +18,24 @@ */ #include +#include +#include +#include + +#include #include -#include "3rdparty/libcroco/cr-cascade.h" +#include #include <2geom/forward.h> -#include "inkgc/gc-managed.h" -#include "gc-finalized.h" + +#include "3rdparty/libcroco/cr-cascade.h" +#include "event.h" #include "gc-anchored.h" -#include -#include -#include -#include -#include +#include "gc-finalized.h" +#include "inkgc/gc-managed.h" + +#include "composite-undo-stack-observer.h" +// XXX only for testing! +#include "console-output-undo-observer.h" // This variable is introduced with 0.92.1 // with the introduction of automatic fix @@ -82,8 +89,6 @@ namespace Proj { class TransfMat3x4; } -struct SPDocumentPrivate; - /// Typed SVG document implementation. class SPDocument : public Inkscape::GC::Managed<>, public Inkscape::GC::Finalized, @@ -128,8 +133,6 @@ protected: public: - SPDocumentPrivate *priv; - /// Last action key Glib::ustring actionkey; @@ -284,7 +287,7 @@ public: int ensureUpToDate(); bool addResource(char const *key, SPObject *object); bool removeResource(char const *key, SPObject *object); - const std::vector getResourceList(char const *key) const; + std::vector const getResourceList(char const *key); std::vector getItemsInBox(unsigned int dkey, Geom::Rect const &box, bool take_insensitive = false, bool into_groups = false) const; std::vector getItemsPartiallyInBox(unsigned int dkey, Geom::Rect const &box, bool take_insensitive = false, bool into_groups = false) const; SPItem *getItemAtPoint(unsigned int key, Geom::Point const &p, bool into_groups, SPItem *upto = nullptr) const; @@ -305,6 +308,48 @@ private: void build_flat_item_list(unsigned int dkey, SPGroup *group, gboolean into_groups) const; mutable std::deque _node_cache; mutable bool _node_cache_valid; + + // The following were in document-private.h and despite being called "private", they weren't. +public: + typedef std::map IDChangedSignalMap; + typedef std::map ResourcesChangedSignalMap; + + std::map iddef; + std::map reprdef; + + unsigned long _serial; + + /** Dictionary of signals for id changes */ + IDChangedSignalMap id_changed_signals; + + /* Resources */ + std::map > resources; + ResourcesChangedSignalMap resources_changed_signals; + + sigc::signal destroySignal; + SPDocument::ModifiedSignal modified_signal; + SPDocument::URISetSignal uri_set_signal; + SPDocument::ResizedSignal resized_signal; + SPDocument::ReconstructionStart _reconstruction_start_signal; + SPDocument::ReconstructionFinish _reconstruction_finish_signal; + SPDocument::CommitSignal commit_signal; + + /* Undo/Redo state */ + bool sensitive; /* If we save actions to undo stack */ + Inkscape::XML::Event * partial; /* partial undo log when interrupted */ + int history_size; + std::vector undo; /* Undo stack of reprs */ + std::vector redo; /* Redo stack of reprs */ + + /* Undo listener */ + Inkscape::CompositeUndoStackObserver undoStackObservers; + + // XXX only for testing! + Inkscape::ConsoleOutputUndoObserver console_output_undo_observer; + + bool seeking; + sigc::connection selChangeConnection; + sigc::connection desktopActivatedConnection; }; /* -- cgit v1.2.3