refactor glsequence to be more testable
I wanted to make it easier to verify that components of glsequence
actually worked correctly, so chunks of the code that determined when to
draw the sequence as text were broken out into subfunctions so I could test
them. This patch also changes the place that the sequence as text is drawn
from above the sequence as bar to the same place. (AKA you either get
a bar representing a sequence, or text for the sequence, and they're both
(in this patch) approximately in the same place)
And while in there I also made some modifications to sequence to be more
iterator friendly. (And I finally got around to taking tristan's suggestion
and changed filter_sequence into set_filtered_sequence, so it directly
sets the sequence member instead of returning a modified string.
Finally I tossed in a color class that basically maps to the opengl rgba
color model. (To the level of having a function that returns a GLfloat[4)
For the immediate future, I need to make sure that the sequence text
and sequence bar take the same vertical space so when I start connecting
sequence lines together they connect at the right place. I also need
to get the annotations to keep track of their color and draw those colors.
20 files changed: