920d49671499e4bbb324ada0fb005e1d61226143
[mussa.git] / gui / SeqWindow.hpp
1 #ifndef _MUSSA_GUI_SEQ_H_
2 #define _MUSSA_GUI_SEQ_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 <iostream>
13 #include <list>
14 #include <string>
15 #include <vector>
16
17 #include "gui/SeqView.hpp"
18
19 #include <FL/Fl_Menu_Bar.H>
20 #include <FL/Fl_Menu_Item.H>
21 #include <FL/Fl_Menu_Button.H>
22 #include <FL/Fl_Double_Window.H>
23
24 class SeqWindow : public Fl_Double_Window
25 {
26   private:
27     std::string analysis_name;
28     int base_window_len;
29
30     //this data is passed as pointers to the instantiated classes
31     std::vector<Sequence> *S;
32     // list of paths in selection box
33     std::list<ConservedPath > P;
34     std::vector<int> seq_lens;
35     //pointer to passed fltk_motif data
36     std::vector<fltk_motif> *the_motifs;
37
38     int x_max, y_max;
39     Fl_Menu_Button *choose_align_menu;
40     Fl_Menu_Button *show_align_menu;
41     Fl_Button *toggle_bars;
42     SeqView *seq_box;
43
44   public:
45     int seq_num;
46
47     SeqWindow(int w, int h, const char* title, int sq_num,
48               std::vector<Sequence> *some_seqs, 
49               std::list<ConservedPath > some_paths, 
50               std::vector<int> some_lens,
51               std::vector<fltk_motif> *some_motifs);
52     virtual ~SeqWindow(){ std::cout << "dying\n"; }
53
54     void make_choose_menu();
55     void make_show_menu();
56     void real_set_align_cb(int which_align);
57     void real_show_align_cb(int which_align);
58     void real_toggle_bars_cb();
59     void real_toggle_motifs_cb();
60 };
61
62
63 struct menu_align_data_bundle
64 {
65   SeqWindow * swm_ptr;
66   int which_align;
67 };
68 #endif