diff options
Diffstat (limited to 'src/document.h')
| -rw-r--r-- | src/document.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/document.h b/src/document.h index dd1e295a2..825049cd5 100644 --- a/src/document.h +++ b/src/document.h @@ -27,6 +27,8 @@ #include <glibmm/ustring.h> #include <boost/ptr_container/ptr_list.hpp> #include <vector> +#include <set> +#include <deque> namespace Avoid { class Router; @@ -121,7 +123,7 @@ public: // Instance of the connector router Avoid::Router *router; - GSList *_collection_queue; + std::vector<SPObject *> _collection_queue; bool oldSignalsConnected; @@ -258,11 +260,11 @@ public: int ensureUpToDate(); bool addResource(char const *key, SPObject *object); bool removeResource(char const *key, SPObject *object); - const GSList *getResourceList(char const *key) const; - std::vector<SPItem*> getItemsInBox(unsigned int dkey, Geom::Rect const &box) const; - std::vector<SPItem*> getItemsPartiallyInBox(unsigned int dkey, Geom::Rect const &box) const; + const std::set<SPObject *> getResourceList(char const *key) const; + std::vector<SPItem*> getItemsInBox(unsigned int dkey, Geom::Rect const &box, bool into_groups = false) const; + std::vector<SPItem*> getItemsPartiallyInBox(unsigned int dkey, Geom::Rect const &box, bool into_groups = false) const; SPItem *getItemAtPoint(unsigned int key, Geom::Point const &p, bool into_groups, SPItem *upto = NULL) const; - std::vector<SPItem*> getItemsAtPoints(unsigned const key, std::vector<Geom::Point> points) const; + std::vector<SPItem*> getItemsAtPoints(unsigned const key, std::vector<Geom::Point> points, bool all_layers = true, size_t limit = 0) const ; SPItem *getGroupAtPoint(unsigned int key, Geom::Point const &p) const; void changeUriAndHrefs(char const *uri); @@ -276,6 +278,9 @@ private: void do_change_uri(char const *const filename, bool const rebase); void setupViewport(SPItemCtx *ctx); void importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, Inkscape::XML::Node *target_defs); + 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; }; /* |
