[project @ 6]
[mussa.git] / mussa_gui_seq_view.hh
1 #include "mussa_class.hh"
2
3 #include <math.h>
4 #include <FL/Fl.H>
5 #include <FL/Fl_Window.H>
6 #include <FL/Fl_Box.H>
7 #include <FL/fl_draw.H>
8 #include <FL/Fl_Scroll.H>
9
10 class SeqView : public Fl_Box
11 {
12   private:
13     string ana_name;
14     int seq_num;
15     int base_window_len;
16
17     //this data is passed as pointers to the instantiated classes
18     vector<Sequence> *S;
19     // list of paths in selection box
20     list<vector<int> > P;
21     vector<int> seq_lens;
22
23     int x_max, y_max, x_min, y_min;
24     int y_seq_incre;
25     int index_pad;
26     vector<int> seq_align_offsets;
27     vector<string> raw_sequence;
28     bool dragging;
29     int drag_change, scroll_offset;
30
31   public:
32     SeqView(int x_top,int y_top,int x_bot,int y_bot) :
33       Fl_Box(x_top,y_top,x_bot,y_bot)
34     {
35       x_max = x_bot;
36       y_max = y_bot;
37       x_min = x_top;
38       y_min = y_top;
39     }
40              
41     void setup(string, int, vector<Sequence> *some_seqs, 
42                list<vector<int> > some_paths, vector<int>);
43     void draw();
44     void draw_sequence(double ch_width);
45     void draw_match_lines(double ch_width);
46     void draw_indices(double ch_width);
47     void align_offsets(int align_num);
48     int handle(int e);
49     void reporter(string id, int value);
50 };