diff --git a/src/selection.h b/src/selection.h
index d8427108f344eece726a6846e5e5b66f2ded30ed..f3ab8e1c1a07ed48954bea58d97a020dd9823af9 100644 (file)
--- a/src/selection.h
+++ b/src/selection.h
#include <vector>
#include <map>
+#include <list>
#include <sigc++/sigc++.h>
-#include "libnr/nr-rect.h"
+//#include "libnr/nr-rect.h"
#include "libnr/nr-convex-hull.h"
#include "forward.h"
#include "gc-managed.h"
#include "sp-item.h"
class SPItem;
+class SPBox3D;
+class Persp3D;
namespace Inkscape {
namespace XML {
/// method for that
GSList const *reprList();
+ /* list of all perspectives which have a 3D box in the current selection
+ (these may also be nested in groups) */
+ std::list<Persp3D *> const perspList();
+
+ std::list<SPBox3D *> const box3DList();
+
/** @brief Returns the number of layers in which there are selected objects */
guint numberOfLayers();
/** @brief Returns the bounding rectangle of the selection */
NRRect *bounds(NRRect *dest, SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) const;
/** @brief Returns the bounding rectangle of the selection */
- NR::Maybe<NR::Rect> bounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) const;
+ Geom::OptRect bounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) const;
/**
* @brief Returns the bounding rectangle of the selection
*
* \todo how is this different from bounds()?
*/
- NR::Maybe<NR::Rect> boundsInDocument(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) const;
+ Geom::OptRect boundsInDocument(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) const;
/**
* @brief Returns the rotation/skew center of the selection
*/
- NR::Maybe<NR::Point> center() const;
+ boost::optional<Geom::Point> center() const;
/**
* @brief Gets the selection's snap points.
* @return Selection's snap points
*/
- std::vector<NR::Point> getSnapPoints() const;
+ std::vector<Geom::Point> getSnapPoints(SnapPreferences const *snapprefs) const;
/**
* @brief Gets the snap points of a selection that form a convex hull.
* @return Selection's convex hull points
*/
- std::vector<NR::Point> getSnapPointsConvexHull() const;
+ std::vector<Geom::Point> getSnapPointsConvexHull(SnapPreferences const *snapprefs) const;
/**
* @brief Connects a slot to be notified of selection changes
mutable GSList *_reprs;
mutable GSList *_items;
+ void add_box_perspective(SPBox3D *box);
+ void add_3D_boxes_recursively(SPObject *obj);
+ void remove_box_perspective(SPBox3D *box);
+ void remove_3D_boxes_recursively(SPObject *obj);
+
+ std::map<Persp3D *, unsigned int> _persps;
+ std::list<SPBox3D *> _3dboxes;
+
GC::soft_ptr<SPDesktop> _desktop;
SPObject* _selection_context;
guint _flags;