diff --git a/src/selection.h b/src/selection.h
index 6ae462fc36c9b57ce534a252a2d1cd3b8db98e52..b5a511e96f6ffbec9dae54d101d79ba48fb12a0c 100644 (file)
--- a/src/selection.h
+++ b/src/selection.h
#include "gc-soft-ptr.h"
#include "util/list.h"
#include "sp-item.h"
#include "gc-soft-ptr.h"
#include "util/list.h"
#include "sp-item.h"
+#include "snapped-point.h"
class SPItem;
class SPBox3D;
class SPItem;
class SPBox3D;
* at the given desktop. Both SPItem and SPRepr lists can be retrieved
* from the selection. Many actions operate on the selection, so it is
* widely used throughout the code.
* at the given desktop. Both SPItem and SPRepr lists can be retrieved
* from the selection. Many actions operate on the selection, so it is
* widely used throughout the code.
- * It also implements its own asynchronous notification signals that
+ * It also implements its own asynchronous notification signals that
* UI elements can listen to.
*/
class Selection : public Inkscape::GC::Managed<>,
* UI elements can listen to.
*/
class Selection : public Inkscape::GC::Managed<>,
/// method for that
GSList const *reprList();
/// method for that
GSList const *reprList();
- /* list of all perspectives which have a 3D box in the current selection
+ /** @brief Returns a 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();
(these may also be nested in groups) */
std::list<Persp3D *> const perspList();
- std::list<SPBox3D *> const box3DList();
+ /** @brief Returns a list of all 3D boxes in the current selection which are associated to @c
+ persp. If @c pers is @c NULL, return all selected boxes.
+ */
+ std::list<SPBox3D *> const box3DList(Persp3D *persp = NULL);
/** @brief Returns the number of layers in which there are selected objects */
guint numberOfLayers();
/** @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 */
/** @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 */
- boost::optional<Geom::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()?
/**
* @brief Returns the bounding rectangle of the selection
*
* \todo how is this different from bounds()?
- */
+ */
NRRect *boundsInDocument(NRRect *dest, SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) const;
/**
NRRect *boundsInDocument(NRRect *dest, SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) const;
/**
*
* \todo how is this different from bounds()?
*/
*
* \todo how is this different from bounds()?
*/
- boost::optional<Geom::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
/**
* @brief Returns the rotation/skew center of the selection
* @brief Gets the selection's snap points.
* @return Selection's snap points
*/
* @brief Gets the selection's snap points.
* @return Selection's snap points
*/
- std::vector<Geom::Point> getSnapPoints(bool includeItemCenter) const;
+ std::vector<Inkscape::SnapCandidatePoint> getSnapPoints(SnapPreferences const *snapprefs) const;
/**
* @brief Gets the snap points of a selection that form a convex hull.
* @return Selection's convex hull points
*/
/**
* @brief Gets the snap points of a selection that form a convex hull.
* @return Selection's convex hull points
*/
- std::vector<Geom::Point> getSnapPointsConvexHull() const;
+ std::vector<Inkscape::SnapCandidatePoint> getSnapPointsConvexHull(SnapPreferences const *snapprefs) const;
/**
* @brief Connects a slot to be notified of selection changes
/**
* @brief Connects a slot to be notified of selection changes
}
/**
}
/**
- * @brief Connects a slot to be notified of selected
- * object modifications
+ * @brief Connects a slot to be notified of selected
+ * object modifications
*
* This method connects the given slot such that it will
* receive notifications whenever any selected item is
*
* This method connects the given slot such that it will
* receive notifications whenever any selected item is
void remove_box_perspective(SPBox3D *box);
void remove_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;
std::list<SPBox3D *> _3dboxes;
GC::soft_ptr<SPDesktop> _desktop;