4efcfeaa69dc7c98991dc72e4aa89af547c05cbd
[mussa.git] / mussa_gui_seq_view.hh
1 #include "mussa_gui_load_window.hh"
2
3 #include <math.h>
4 #include <FL/Fl_Box.H>
5 #include <FL/fl_draw.H>
6
7 class SeqView : public Fl_Box
8 {
9   public:
10     SeqView(int x_top,int y_top,int x_bot,int y_bot) :
11       Fl_Box(x_top,y_top,x_bot,y_bot)
12     {
13       x_max = x_bot;
14       y_max = y_bot;
15       x_min = x_top;
16       y_min = y_top;
17       show_bars = true;
18       show_motifs = true;
19     }
20              
21     void setup(string name, int sq_num, vector<Sequence> *some_seqs, 
22                list<vector<int> > some_paths, vector<int> some_lens,
23                vector<motif> *some_motifs);
24     void align_offsets(int align_num);
25     void toggle_align(int align_num);
26     void toggle_bars();
27     void toggle_motifs();
28
29   private:
30     string ana_name;
31     int seq_num;
32     int base_window_len;
33
34   //this data is passed as pointers to the instantiated classes
35     vector<Sequence> *S;
36   //list of paths in selection box
37     list<vector<int> > P;
38     vector<int> seq_lens;
39   //pointer to passed motif data
40     vector<motif> *the_motifs;
41
42     int x_max, y_max, x_min, y_min;
43     int y_seq_incre;
44     int index_pad;
45     vector<int> seq_align_offsets;
46     vector<string> raw_sequence;
47     bool dragging;
48     int drag_change, scroll_offset;
49     bool show_bars, show_motifs;
50     vector<bool> show_aligns;
51
52     void resize(int new_x, int new_y, int new_w, int new_h);
53     void draw();
54     void draw_motifs(double ch_width);
55     void draw_sequence(double ch_width);
56     void draw_match_lines(double ch_width);
57     void draw_indices(double ch_width);
58     int handle(int e);
59     void reporter(string id, int value);
60 };