drawing sequence basepairs.
[mussa.git] / qui / GlSequence.h
1 #ifndef _GL_SEQUENCE_H_
2 #define _GL_SEQUENCE_H_
3
4 #include "alg/sequence.hh"
5 #include <GL/gl.h>
6
7 //! Manage rendering a mussa sequence track
8 /*! The idea is this will keep track of the location of where the sequence
9  *  is being rendered, and handle displaying annotations on that track
10  */
11 class GlSequence
12 {
13 public: 
14   GlSequence(const Sequence & s);
15   GlSequence(const GlSequence & s);
16   GlSequence &operator=(const GlSequence &s);
17
18   //! draw a track 
19   /*! left and right are the current edges of the viewable world
20    */
21   void draw(GLfloat left, GLfloat right) const;
22
23   const Sequence& sequence() const;
24   void setX(GLfloat);
25   GLfloat x() const;
26   void setY(GLfloat);
27   GLfloat y() const;
28   void setWidth(GLfloat);
29   GLfloat width() const;
30
31 protected:
32   const Sequence& seq;
33   GLfloat seq_x;
34   GLfloat seq_y;
35   GLfloat seq_z;
36   GLfloat seq_width;
37   GLfloat seq_height;
38
39   //! render a sequence (if we have enough space
40   /*! left and right are the current edges of the viewable world
41    */
42   void draw_sequence(GLfloat, GLfloat) const;
43 };
44
45 const float gl_track_height = 10.0;
46
47 #endif