pay some attention to the special guest of the night: KDE window stacking
[ardour.git] / gtk2_ardour / route_sorter.h
index c203afa188b301217154549ea8b0dc746b4a3304..e84788243cfd474ce0c0317aaa960d3a036d146f 100644 (file)
 #include <stdint.h>
 #include <vector>
 
-namespace ARDOUR {
-       class Route;
-}
+#include "ardour/stripable.h"
 
-struct RoutePlusOrderKey {
-    boost::shared_ptr<ARDOUR::Route> route; /* we don't really need this, but its handy to keep around */
+struct OrderKeys {
     uint32_t old_display_order;
     uint32_t new_display_order;
 
-    RoutePlusOrderKey (boost::shared_ptr<ARDOUR::Route> r, uint32_t ok, uint32_t nk)
-           : route (r)
-           , old_display_order (ok)
-           , new_display_order (nk) {}
+       OrderKeys (uint32_t ok, uint32_t nk)
+               : old_display_order (ok)
+               , new_display_order (nk) {}
 };
 
-typedef std::vector<RoutePlusOrderKey> OrderKeySortedRoutes;
+typedef std::vector<OrderKeys> OrderingKeys;
 
 struct SortByNewDisplayOrder {
-    bool operator() (const RoutePlusOrderKey& a, const RoutePlusOrderKey& b) {
+    bool operator() (const OrderKeys& a, const OrderKeys& b) {
            return a.new_display_order < b.new_display_order;
     }
 };
 
+struct StripablePresentationInfoSorter {
+       bool operator() (boost::shared_ptr<ARDOUR::Stripable> a, boost::shared_ptr<ARDOUR::Stripable> b) {
+               return a->presentation_info().order () < b->presentation_info().order ();
+       }
+};
+
 #endif /* __gtk2_ardour_route_sorter_h__ */