Code

Include new routines for building the fill point queue in a standard way
[inkscape.git] / src / document.h
index f957239c16eb4c37a70f0b158d86d060f93f2947..c04ed5441db175af559cb5b8a33b5f65e229ae05 100644 (file)
@@ -28,6 +28,7 @@
 #include "gc-anchored.h"
 #include <glibmm/ustring.h>
 #include "verbs.h"
+#include <vector>
 
 namespace Avoid {
 class Router;
@@ -50,6 +51,13 @@ namespace Inkscape {
     }
 }
 
+class SP3DBox;
+
+namespace Box3D {
+  class Perspective3D;
+  class VanishingPoint;
+}
+
 class SPDocumentPrivate;
 
 /// Typed SVG document implementation.
@@ -91,6 +99,19 @@ struct SPDocument : public Inkscape::GC::Managed<>,
        // Instance of the connector router
        Avoid::Router *router;
 
+        GSList *perspectives;
+        Box3D::Perspective3D *current_perspective;
+
+        // FIXME: Perspectives should be linked to the list of existing ones automatically in the constructor
+        //        and removed in the destructor!
+        void add_perspective (Box3D::Perspective3D * const persp);
+        void remove_perspective (Box3D::Perspective3D * const persp);
+        /* find an existing perspective whose VPs are equal to those of persp */
+        Box3D::Perspective3D * find_perspective (const Box3D::Perspective3D * persp);
+
+        Box3D::Perspective3D * get_persp_of_box (const SP3DBox *box);
+        Box3D::Perspective3D * get_persp_of_VP (const Box3D::VanishingPoint *vp);
+
        sigc::connection connectModified(ModifiedSignal::slot_type slot);
        sigc::connection connectURISet(URISetSignal::slot_type slot);
        sigc::connection connectResized(ResizedSignal::slot_type slot);
@@ -115,10 +136,11 @@ struct SPDocument : public Inkscape::GC::Managed<>,
        void addUndoObserver(Inkscape::UndoStackObserver& observer);
        void removeUndoObserver(Inkscape::UndoStackObserver& observer);
 
-       Inkscape::EventLog& getEventLog() const;
-
         bool _updateDocument();
 
+       /// Are we currently in a transition between two "known good" states of the document?
+       bool isSeeking() const;
+
 private:
        SPDocument(SPDocument const &); // no copy
        void operator=(SPDocument const &); // no assign
@@ -129,16 +151,16 @@ public:
        void emitReconstructionStart (void);
        void emitReconstructionFinish  (void);
 
+       unsigned long serial() const;
         void reset_key (void *dummy);
         sigc::connection _selection_changed_connection;
         sigc::connection _desktop_activated_connection;
 
-       void fitToRect(NRRect const & rect);
+       void fitToRect(NR::Rect const &rect);
 };
 
 SPDocument *sp_document_new (const gchar *uri, unsigned int keepalive, bool make_new = false);
 SPDocument *sp_document_new_from_mem (const gchar *buffer, gint length, unsigned int keepalive);
-SPDocument *sp_document_new_dummy(); 
 
 SPDocument *sp_document_ref (SPDocument *doc);
 SPDocument *sp_document_unref (SPDocument *doc);
@@ -232,7 +254,8 @@ GSList * sp_document_items_in_box(SPDocument *document, unsigned int dkey, NR::R
 GSList * sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, NR::Rect const &box);
 SPItem* sp_document_item_from_list_at_point_bottom (unsigned int dkey, SPGroup *group, const GSList *list, NR::Point const p, bool take_insensitive = false);
 SPItem * sp_document_item_at_point (SPDocument *document, unsigned int key, NR::Point const p, gboolean into_groups, SPItem *upto = NULL);
-SPItem * sp_document_group_at_point (SPDocument *document, unsigned int key,  NR::Point const p);
+GSList *sp_document_items_at_points(SPDocument *document, unsigned const key, std::vector<NR::Point> points);
+SPItem *sp_document_group_at_point (SPDocument *document, unsigned int key,  NR::Point const p);
 
 void sp_document_set_uri (SPDocument *document, const gchar *uri);
 void sp_document_resized_signal_emit (SPDocument *doc, gdouble width, gdouble height);