Code

fix compile
[inkscape.git] / src / ui / dialog / align-and-distribute.h
index 69fc176736aae8a6785114d047436574e0ff8520..d6cbd377f30be593b46cd2ffacb2204e2e33c9ae 100644 (file)
@@ -29,7 +29,7 @@
 #include "libnr/nr-rect.h"
 
 
-#include "dialog.h"
+#include "ui/widget/panel.h"
 #include "ui/widget/notebook-page.h"
 
 using namespace Inkscape::UI::Widget;
@@ -44,12 +44,12 @@ namespace Dialog {
 class Action;
 
 
-class AlignAndDistribute : public Dialog {
+class AlignAndDistribute : public Widget::Panel {
 public:
     AlignAndDistribute();
     virtual ~AlignAndDistribute();
 
-    static AlignAndDistribute *create() { return new AlignAndDistribute(); }
+    static AlignAndDistribute &getInstance() { return *new AlignAndDistribute(); }
 
     enum AlignTarget { LAST=0, FIRST, BIGGEST, SMALLEST, PAGE, DRAWING, SELECTION };
 
@@ -65,9 +65,7 @@ public:
     std::list<SPItem *>::iterator find_master(std::list <SPItem *> &list, bool horizontal);
     void setMode(bool nodeEdit);
 
-    NR::Rect randomize_bbox;
-    bool randomize_bbox_set;
-
+    NR::Maybe<NR::Rect> randomize_bbox;
 
 protected:
 
@@ -106,6 +104,17 @@ private:
     AlignAndDistribute& operator=(AlignAndDistribute const &d);
 };
 
+
+struct BBoxSort
+{
+    SPItem *item;
+    float anchor;
+    NR::Rect bbox;
+    BBoxSort(SPItem *pItem, NR::Rect bounds, NR::Dim2 orientation, double kBegin, double kEnd);
+    BBoxSort(const BBoxSort &rhs);
+};
+bool operator< (const BBoxSort &a, const BBoxSort &b);
+
 } // namespace Dialog
 } // namespace UI
 } // namespace Inkscape