80e48463e4c642dec2eea81f10e62ef68fbac21d
[mussa.git] / mussa_gui_conn_view.hh
1 #include "mussa_gui_subana.hh"
2
3 #include <sstream>
4
5 class ConnView : public Fl_Box
6 {
7   public:
8     ConnView(int x_top,int y_top,int x_bot,int y_bot) :
9       Fl_Box(x_top,y_top,x_bot,y_bot)
10     {}
11
12     void setup(string name, int sq_num, int win_len,
13                vector<Sequence> *, Nway_Paths *);
14     void scale_paths();
15
16     void spawnSeq();
17     void find_motifs();
18     void annot_win();
19
20     void toggle_bars();
21     void set_bar_interval(int new_bar_len);
22     void toggle_lines();
23     void set_line_interval(int new_line_len);
24
25
26   private:
27     string ana_name;
28     int seq_num, window, threshold;
29     bool win_append, thres_append;
30
31   //this data is passed as pointers to the instantiated classes
32     vector<Sequence> *S;
33     Nway_Paths *P;
34
35     int name_pad, y_pad;
36     float x_scale_factor;
37     int y_seq_incre;
38     int drag_start, drag_end;
39     float y_drag_start;
40     int ref_seq_num, max_seq_len;
41     bool dragging, selected;
42     list<bool> highlight;
43
44   //path data scaled for current view size
45     list<vector<int> > scaled_pathz;
46     vector<int> seq_lens;
47     vector<int> seq_scales;
48     int bar_interval, line_interval;
49     bool show_bars, show_lines;
50
51   //keeps track of all the motifs the user has inputed
52     vector<motif> some_motifs;
53     MotifWindow *motif_find_window;
54
55   //keeps track of the colors assigned to each motif type
56     vector<annot_color> some_annots;
57     AnnotWindow *annot_color_window;
58
59     SeqWindow *a_seq_win;
60
61     void draw();
62     void draw_paths();
63     void draw_sequence_stuff();
64
65     void resize(int x, int y, int w, int h); 
66     int handle(int e);
67     void check_new_motifs();
68
69   //for drawing function debugging
70     void reporter(string var, int value);
71     void report_float(string var, float value);
72 };