diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2018-10-29 09:10:24 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2018-10-29 09:10:24 +0000 |
| commit | b7010ffde22a6845f1ceee7d74750da69cd53149 (patch) | |
| tree | d738441a0e0ecddf991b2a8b04018567e44ec8ff /src/document.h | |
| parent | SelectedStyle: Ensure constant field width of stroke width (diff) | |
| download | inkscape-b7010ffde22a6845f1ceee7d74750da69cd53149.tar.gz inkscape-b7010ffde22a6845f1ceee7d74750da69cd53149.zip | |
Move contents of document-private.h to document.h.
Diffstat (limited to 'src/document.h')
| -rw-r--r-- | src/document.h | 71 |
1 files changed, 58 insertions, 13 deletions
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 <cstddef> +#include <deque> +#include <set> +#include <vector> + +#include <boost/ptr_container/ptr_list.hpp> #include <sigc++/sigc++.h> -#include "3rdparty/libcroco/cr-cascade.h" +#include <glibmm/ustring.h> #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 <glibmm/ustring.h> -#include <boost/ptr_container/ptr_list.hpp> -#include <vector> -#include <set> -#include <deque> +#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<SPObject *> getResourceList(char const *key) const; + std::vector<SPObject *> const getResourceList(char const *key); std::vector<SPItem*> getItemsInBox(unsigned int dkey, Geom::Rect const &box, bool take_insensitive = false, bool into_groups = false) const; std::vector<SPItem*> 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<SPItem*> _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<GQuark, SPDocument::IDChangedSignal> IDChangedSignalMap; + typedef std::map<GQuark, SPDocument::ResourcesChangedSignal> ResourcesChangedSignalMap; + + std::map<std::string, SPObject *> iddef; + std::map<Inkscape::XML::Node *, SPObject *> reprdef; + + unsigned long _serial; + + /** Dictionary of signals for id changes */ + IDChangedSignalMap id_changed_signals; + + /* Resources */ + std::map<std::string, std::vector<SPObject *> > resources; + ResourcesChangedSignalMap resources_changed_signals; + + sigc::signal<void> 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<Inkscape::Event *> undo; /* Undo stack of reprs */ + std::vector<Inkscape::Event *> 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; }; /* |
