diff --git a/src/document.h b/src/document.h
index cf2194a952a64ba67a6ba55ad4f8f9bf218a741d..c04ed5441db175af559cb5b8a33b5f65e229ae05 100644 (file)
--- a/src/document.h
+++ b/src/document.h
#include "gc-anchored.h"
#include <glibmm/ustring.h>
#include "verbs.h"
+#include <vector>
namespace Avoid {
class Router;
}
}
+class SP3DBox;
+
+namespace Box3D {
+ class Perspective3D;
+ class VanishingPoint;
+}
+
class SPDocumentPrivate;
/// Typed SVG document implementation.
typedef sigc::signal<void, double, double> ResizedSignal;
typedef sigc::signal<void> ReconstructionStart;
typedef sigc::signal<void> ReconstructionFinish;
+ typedef sigc::signal<void> CommitSignal;
SPDocument();
~SPDocument();
// 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);
+ sigc::connection connectCommit(CommitSignal::slot_type slot);
void bindObjectToId(gchar const *id, SPObject *object);
SPObject *getObjectById(gchar const *id);
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
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);
@@ -173,8 +197,8 @@ void sp_document_set_height (SPDocument * document, gdouble height, const SPUnit
* Undo & redo
*/
-void sp_document_set_undo_sensitive (SPDocument * document, gboolean sensitive);
-gboolean sp_document_get_undo_sensitive (SPDocument const * document);
+void sp_document_set_undo_sensitive (SPDocument * document, bool sensitive);
+bool sp_document_get_undo_sensitive (SPDocument const * document);
void sp_document_clear_undo (SPDocument * document);
void sp_document_clear_redo (SPDocument * document);
@@ -230,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);