X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdocument.h;h=c04ed5441db175af559cb5b8a33b5f65e229ae05;hb=2f0993d11346cad40098fafdcce23e8cb65127a3;hp=f957239c16eb4c37a70f0b158d86d060f93f2947;hpb=c4eb899d30e3e359efe9f708c01a3651b5179f01;p=inkscape.git diff --git a/src/document.h b/src/document.h index f957239c1..c04ed5441 100644 --- a/src/document.h +++ b/src/document.h @@ -28,6 +28,7 @@ #include "gc-anchored.h" #include #include "verbs.h" +#include 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 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);