set annotation draw function by type
[mussa.git] / alg / glsequence.hpp
index 190401a956644ddc3aed36af42857be5bba7715f..6f16a199e8c747cd89146316883a934ce8d51d42 100644 (file)
@@ -36,7 +36,15 @@ public:
   static DrawableRef copy_drawable(DrawableRef s);
   
   //! search through sequence and add an annotation highlighting all the non AGCT characters
-  void add_annotations_for_undefined_sequence(Drawable::draw_func_ptr draw=0);
+  void add_annotations_for_defined_sequence(Drawable::draw_func_ptr draw=0);
+  /**!search through our annotations and set the draw function for a particular "type"
+   * this is really a temporary solution to configuring annotation display styles
+   */
+  void update_annotation_draw_function(
+         std::string type, 
+         Drawable::draw_func_ptr draw, 
+         ColorRef color
+       );
   //! set our starting x (horizontal) coordinate
   void setX(float x);
   //! get our starting x (horizontal) coordinate
@@ -63,7 +71,8 @@ public:
   static
   void draw_box(GLfloat world_left, GLfloat world_right, 
                 GLfloat left, GLfloat right, GLfloat height,
-                GLfloat y, GLfloat z);
+                GLfloat y, GLfloat z,
+                GLint primitive=GL_QUADS);
   //! draw a track 
   /*! left and right are the edges of the current viewport
    */
@@ -115,10 +124,12 @@ protected:
   const GLfloat char_pix_per_world_unit;
 
   //! initalize a SeqSpanRef covering start, count
-  SeqSpanRef make_undefined_sequence_annotation(
+  SeqSpanRef make_drawable_annotation(
     Drawable::draw_func_ptr draw,
+    std::string name,
     size_type start,
-    size_type count);
+    size_type count,
+    ColorRef color);
 
   //! draw sequence as a bar
   void draw_track(GLfloat, GLfloat) const;
@@ -129,5 +140,6 @@ protected:
   void draw_sequence(GLfloat, GLfloat) const;
 };
 
+void draw_track(SeqSpanRef ref, float left, float right);
 void draw_narrow_track(SeqSpanRef ref, float left, float right);
 #endif