From 80a911db81b651f38205c1eb926af4986bc033e8 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Wed, 10 Jul 2013 22:24:38 -0400 Subject: Step 2 refactoring the align functions, added some functionality to selection. (bzr r12413) --- src/selection.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/selection.h') diff --git a/src/selection.h b/src/selection.h index f076cf7aa..25c018f7b 100644 --- a/src/selection.h +++ b/src/selection.h @@ -27,6 +27,7 @@ #include "sp-item.h" #include "snapped-point.h" + class SPDesktop; class SPItem; class SPBox3D; @@ -63,6 +64,7 @@ class Selection : public Inkscape::GC::Managed<>, public Inkscape::GC::Anchored { public: + enum CompareSize { HORIZONTAL, VERTICAL, AREA }; /** * Constructs an selection object, bound to a particular * layer model @@ -219,6 +221,16 @@ public: */ SPItem *singleItem(); + /** + * Returns the smallest item from this selection. + */ + SPItem *smallestItem(CompareSize compare); + + /** + * Returns the largest item from this selection. + */ + SPItem *largestItem(CompareSize compare); + /** * Returns a single selected object's xml node. * @@ -308,6 +320,11 @@ public: return _modified_signal.connect(slot); } + /** + * Selection wants to be aligned to this point, not bbox + */ + Geom::Point *align_point; + private: /** no copy. */ Selection(Selection const &); @@ -349,6 +366,7 @@ private: void add_3D_boxes_recursively(SPObject *obj); void remove_box_perspective(SPBox3D *box); void remove_3D_boxes_recursively(SPObject *obj); + SPItem *_sizeistItem(bool small, CompareSize compare); std::list _3dboxes; -- cgit v1.2.3