There are a couple of different stages to adding a new widget into the control box for an analysis. (The control box is the box containing the color/threshold widgets on the right side of a pairwise display.)

The steps are pretty similar for all of the types of analyses; the details below are for seqcomp analyses.

First, add the widget control (checkbox, pull-down menu, whatever) in the !ParsedSeqcompPairwiseAnalysis::add_control_panel function. ( is in cartwheel-interface/). The !Parsed*Analysis stuff is the way that individual Cartwheel analyses are wrapped in a semi-generic way that lets FRII load/display them without worrying about what they are; the Parsed*Analysis files are responsible for adding maps or feature lists into the view, and adding controls to manipulate them.

After adding a control, also add a callback function to that control. This is the function that's going to be called by the widget control when the value is changed (e.g. for a threshold slider, the position of the slider; for a checkbox, the on/off state of the checkbox).

Now, whenever a seqcomp analysis is loaded, you'll get the widget in the control panel for that analysis. Great. Let's make the control *do* something now!

If you want to modify the way that a seqcomp is drawn, you will want to look in gui/ Ultimately, the function 'draw_on_canvas' is called for each seqcomp, with a canvas that does coordinate conversion so that the drawing function is identical for a dotplot and an alignment view. So this is the actual function that iterates over each feature and draws it. If you wanted to select based on orientation, for example, look for the line 'const int o = m->get_orientation()' and put an if...continue somewhere below that.

So, first build a function that tells MappingContainer to do whatever it is you need it to do (toggles forward/reverse orientation, for example). Then connect that function to the _map_cont variable that is part of the ParsedSeqcompPairwiseAnalysis class in the callback for the control widget you added. Voila!

Now, for the feature that Carolina needs, where it should be an option to display forward or reverse orientations only, or both, I would suggest making an enum that can be set via a getter/setter function, and then connecting that to a drop-down menu or a toggle button. That's up to you.

Hope this helps!