ce23f49244344d172b6b86f2f6ecac6670167a68
[mussa.git] / mussa_gui_load_window.hh
1 #include "mussa_gui_annot_window.hh"
2 #include <FL/Fl_File_Chooser.H>
3 #include <FL/Fl_Scroll.H>
4
5 class SetupWindow : public Fl_Window
6
7   public:
8     SetupWindow(int w, int h, const char* title, Mussa *an_analysis);
9     ~SetupWindow();
10
11     bool done();
12
13   //did I put these in public for a reason?
14     Fl_Button* test;
15     Fl_Input *name_input;
16     Fl_Input *win_input;
17     Fl_Input *thres_input;
18     Fl_Input *seq_num_input;
19     Fl_Scroll *seq_scroll;
20     // need to keep track of these so a browsed file search can set the input
21     // fields to teh selected file
22     vector<Fl_Input*> seq_inputs, annot_inputs;
23
24
25     // callback receiver functions
26
27     void real_do_analysis();
28
29     void real_set_ana_name_cb(Fl_Input* o);
30     void real_set_win_size_cb(Fl_Input* o);
31     void real_set_threshold_cb(Fl_Input* o);
32     void real_set_seq_num_cb(Fl_Input* o);
33
34     void real_seq_file_in_cb(Fl_Input* o, int i);
35     void real_choose_seq_file_cb(int i);
36     void real_annot_file_in_cb(Fl_Input* o, int i);
37     void real_choose_annot_file_cb(int i);
38
39     void real_fa_index_in_cb(Fl_Input* o, int i);
40     void real_sub_start_in_cb(Fl_Input* o, int i);
41     void real_sub_end_in_cb(Fl_Input* o, int i);
42
43   private:
44     Mussa *an_analysis;
45     string ana_name;
46     int window, threshold, seq_num;
47     vector<string> seq_files, annot_files;
48     vector<int> fasta_indices, sub_seq_starts, sub_seq_ends;
49     bool win_append, thres_append;
50
51     bool all_done;
52     static void print_cb(Fl_Button*, void*);
53     inline void print_cb_real(Fl_Button*, void*);
54
55     void add_seq_input(int index);
56 };
57
58 // crazy whacked shite Titus taught me to do to get an index value associated
59 // with each instance of an input associated with the callback... 
60
61 struct seq_data_instance
62 {
63   SetupWindow * sw_ptr;
64   int index;
65 };