make headers less interdependent
[mussa.git] / mussa_gui_conn_view.hh
1 #ifndef _MUSSA_GUI_CONN_VIEW_H_
2 #define _MUSSA_GUI_CONN_VIEW_H_
3 //  This file is part of the Mussa source distribution.
4 //  http://mussa.caltech.edu/
5 //  Contact author: Tristan  De Buysscher, tristan@caltech.edu
6
7 // This program and all associated source code files are Copyright (C) 2005
8 // the California Institute of Technology, Pasadena, CA, 91125 USA.  It is
9 // under the GNU Public License; please see the included LICENSE.txt
10 // file for more information, or contact Tristan directly.
11
12 #include <list>
13 #include <sstream>
14 #include <string>
15 #include <vector>
16
17 #include "mussa_gui_annot_window.hh"
18 #include "mussa_gui_subana.hh"
19
20
21 class ConnView : public Fl_Box
22 {
23   public:
24     ConnView(int x_top,int y_top,int x_bot,int y_bot) :
25       Fl_Box(x_top,y_top,x_bot,y_bot)
26     {}
27
28     void setup(std::string name, int sq_num, int win_len,
29                std::vector<Sequence> *, Nway_Paths *);
30     void scale_paths();
31
32     void spawnSeq();
33     void find_motifs();
34     void annot_win();
35
36     void toggle_bars();
37     void set_bar_interval(int new_bar_len);
38     void toggle_lines();
39     void set_line_interval(int new_line_len);
40
41
42   private:
43     std::string ana_name;
44     int seq_num, window, threshold;
45     bool win_append, thres_append;
46
47   //this data is passed as pointers to the instantiated classes
48     std::vector<Sequence> *S;
49     Nway_Paths *P;
50
51     int name_pad, y_pad;
52     float x_scale_factor;
53     int y_seq_incre;
54     int drag_start, drag_end;
55     float y_drag_start;
56     int ref_seq_num, max_seq_len;
57     bool dragging, selected;
58     std::list<bool> highlight;
59
60   //path data scaled for current view size
61     std::list<std::vector<int> > scaled_pathz;
62     std::vector<int> seq_lens;
63     std::vector<int> seq_scales;
64     int bar_interval, line_interval;
65     bool show_bars, show_lines;
66
67   //keeps track of all the motifs the user has inputed
68     std::vector<motif> some_motifs;
69     MotifWindow *motif_find_window;
70
71   //keeps track of the colors assigned to each motif type
72     std::vector<annot_color> some_annots;
73     AnnotWindow *annot_color_window;
74
75     SeqWindow *a_seq_win;
76
77     void draw();
78     void draw_paths();
79     void draw_sequence_stuff();
80
81     void resize(int x, int y, int w, int h); 
82     int handle(int e);
83     void check_new_motifs();
84
85   //for drawing function debugging
86     void reporter(std::string var, int value);
87     void report_float(std::string var, float value);
88 };
89 #endif