/*! The idea is this will keep track of the location of where the sequence
* is being rendered, and handle displaying annotations on that track
*/
-class GlSequence
+class GlSequence : public Sequence
{
public:
- GlSequence(boost::shared_ptr<Sequence> s,
+ GlSequence(const Sequence & s,
boost::shared_ptr<AnnotationColors> cm);
GlSequence(const GlSequence & s);
+ GlSequence(const GlSequence *);
GlSequence &operator=(const GlSequence &s);
//! draw a track
*/
void draw(GLfloat left, GLfloat right) const;
- boost::shared_ptr<Sequence> sequence();
//! set our starting x (horizontal) coordinate
void setX(GLfloat);
//! get our starting x (horizontal) coordinate
//! done mostly so all the iterator logic continues to work correctly.
Sequence::size_type rightbase(GLfloat right) const;
- //! return iterator to the start of the stored sequence
- Sequence::const_iterator sequence_begin() const;
- //! return iterator to the end of the stored sequence
- Sequence::const_iterator sequence_end() const;
//! provide an iterator to the sequence starting at world coordinate left
- Sequence::const_iterator sequence_begin(GLfloat left, GLfloat right) const;
+ Sequence::const_iterator region_begin(GLfloat left, GLfloat right) const;
//! provide an iterator to the sequence ending at world coordinate right
- Sequence::const_iterator sequence_end(GLfloat left, GLfloat right) const;
+ Sequence::const_iterator region_end(GLfloat left, GLfloat right) const;
+ //! return a subsequence as a GlSequence (instead of a Sequence subsequence)
+ GlSequence subseq(size_type start, size_type count) const;
+
//! set track color
- void setColor(Color &);
- Color color();
+ void setColor(boost::shared_ptr<Color> &);
+ boost::shared_ptr<Color> color();
//! how big is a pixel in world coordinats
GLfloat get_pixel_width(GLfloat, GLfloat) const;
//! how big is a pixel in world coordinats (specifying viewport size)
- GLfloat get_pixel_width(GLfloat, GLfloat, int) const;
+ GLfloat pixelWidth(GLfloat, GLfloat, int) const;
//! are we close enough that it would make sense to view the base pairs?
bool is_sequence_renderable(GLfloat left, GLfloat right) const;
friend bool operator==(const GlSequence &left, const GlSequence &right);
protected:
- boost::shared_ptr<Sequence> seq;
GLfloat seq_x;
GLfloat seq_y;
GLfloat seq_z;
GLfloat seq_height;
boost::shared_ptr<AnnotationColors> color_mapper;
- Color drawColor;
+ boost::shared_ptr<Color> drawColor;
const GLfloat char_pix_per_world_unit;
//! Return the pixel width of the opengl viewport.