escape clears a sequence browser selection
[mussa.git] / alg / glseqbrowser.hpp
index 5cc06720f20837ecbc32b1a56d57d283ee86f406..3e7510770d485c4d3701b8689242583ef5f907e8 100644 (file)
@@ -28,6 +28,8 @@ public:
 
   //! select a region (using canvas coordinates)
   void selectRegion(int top, int left, int bottom, int right);
+  //! turn off selection
+  void clearSelection();
 
   //! border size
   float border() const;
@@ -69,7 +71,7 @@ public:
   void centerOnPath(const std::vector<int>&);
 
   void setColorMapper(boost::shared_ptr<AnnotationColors> cm);
-  const AnnotationColors& colorMapper();
+  const AnnotationColorsRef colorMapper();
 
   //! clear our tracks and connections
   void clear();
@@ -105,9 +107,7 @@ public:
   //! copy sequence from selected track using formating function
   template<class Item>
   size_t copySelectedTracks(std::list<Item>& result, 
-             Item (*format_track)(boost::shared_ptr<Sequence> s,
-                                  int left, 
-                                  int right));
+             Item (*format_track)(const Sequence& s, int left, int right));
   //! copy sequence from selected tracks as FASTA sequences
   /*! \return number of base pairs copied
    */
@@ -210,13 +210,13 @@ private:
   //! the center of our current viewport (world coord) (used for scrollbar)
   float viewport_center;
   double zoom_level;
-  boost::shared_ptr<AnnotationColors> color_mapper;
-  //! container of all the GlSequences loaded into our scene
-  std::vector<boost::shared_ptr<GlSequence> > track_container;
+  AnnotationColorsRef color_mapper;
   //! counter for each path added to us via connect
   int pathid;
 
 protected:
+  //! container of all the GlSequences loaded into our scene
+  std::vector<GlSequenceRef > track_container;
   //! where to draw our box (world coordinates)
   rect<float> selectedRegion;
   //! true if we have a selection