refactor glsequence to be more testable
authorDiane Trout <diane@caltech.edu>
Sat, 11 Mar 2006 07:45:42 +0000 (07:45 +0000)
committerDiane Trout <diane@caltech.edu>
Sat, 11 Mar 2006 07:45:42 +0000 (07:45 +0000)
commit84a8de72b0f9d2bb5b6af5995e070edbbaec77a6
tree034f90f679ac32f2a09ea38e445a1bd608dcb09f
parentc5c817f9b4c6aa0c720247343df6f90b4596596a
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:
alg/color.cxx [new file with mode: 0644]
alg/color.h [new file with mode: 0644]
alg/flp.cxx
alg/flp_seqcomp.cxx
alg/glsequence.cxx
alg/glsequence.h
alg/module.mk
alg/mussa_class.cxx
alg/nway_other.cxx
alg/nway_paths.cxx
alg/sequence.cxx
alg/sequence.hh
alg/test/module.mk
alg/test/test_color.cxx [new file with mode: 0644]
alg/test/test_glsequence.cxx
alg/test/test_nway.cxx
alg/test/test_sequence.cxx
mussagl.pro
py/glsequence.cxx
qui/PathScene.cxx