Implement UI for subanalysis mode
[mussa.git] / alg / glseqbrowser.hpp
index fab880fdba11c1ecae442e23a76e96811de2d35b..b5be3a6743d9dbd4af377aef9435e7c0ee0a2673 100644 (file)
@@ -10,6 +10,7 @@
 #include "alg/sequence.hpp"
 #include "alg/glsequence.hpp"
 #include "alg/sequence_location.hpp"
+#include "alg/track_region.hpp"
 
 //! Manage rendering a collection of glSequences
 class GlSeqBrowser
@@ -81,8 +82,17 @@ public:
   void clear_links();
   //! define a path
   void link(const std::vector<int>& path, const std::vector<bool>& isRC, int length);
+  //! set selected paths (it'd be nice if this could be a templated function)
+  void setSelectedPaths(std::vector<int> c);
   //! returns the index of pathids based on order added by link
   const std::set<int>& selectedPaths() const;
+
+  //! set selected tracks (it'd be nice if this could be a templated function)
+  void appendSelectedTrack(GLuint track_index, int left, int right);
+
+  //! return list of selected tracks
+  std::list<TrackRegion> selectedTracks() const;
+
   //! copy sequence from selected track using formating function
   template<class Item>
   void copySelectedTracks(std::list<Item>& result, 
@@ -145,20 +155,6 @@ public:
   typedef std::vector<pair_segment_map> path_segment_map_vector;
   path_segment_map_vector path_segments;
 
-  struct TrackRegion
-  {
-    GLuint track_id;
-    int left;
-    int right;
-
-    TrackRegion():track_id(0), left(0), right(0) {};
-    TrackRegion(const TrackRegion& o)
-      : track_id(o.track_id), left(o.left), right(o.right) {}
-    TrackRegion(GLuint id, int l, int r)
-      : track_id(id), left(l), right(r) {}
-    void set(GLuint id, int l, int r) { track_id = id; left=l; right=r; };
-  };
-
 private:
   //! recalculate the viewable world
   /*! depending on the size of our canvas, our zoom level and