make headers less interdependent
[mussa.git] / mussa_gui_load_window.hh
1 #ifndef _MUSSA_GUI_LOAD_WINDOW_H_
2 #define _MUSSA_GUI_LOAD_WINDOW_H_
3
4 //  This file is part of the Mussa source distribution.
5 //  http://mussa.caltech.edu/
6 //  Contact author: Tristan  De Buysscher, tristan@caltech.edu
7
8 // This program and all associated source code files are Copyright (C) 2005
9 // the California Institute of Technology, Pasadena, CA, 91125 USA.  It is
10 // under the GNU Public License; please see the included LICENSE.txt
11 // file for more information, or contact Tristan directly.
12
13 #include <FL/Fl_Button.H>
14 #include <FL/Fl_Input.H>
15 #include <FL/Fl_Scroll.H>
16 #include <FL/Fl_Window.H>
17
18 #include "mussa_class.hh"
19 #include "mussa_gui_load_window.hh"
20
21 class SetupWindow : public Fl_Window
22
23   public:
24     SetupWindow(int w, int h, const char* title, Mussa *an_analysis);
25     ~SetupWindow();
26
27     bool done();
28
29   //did I put these in public for a reason?
30     Fl_Button* test;
31     Fl_Input *name_input;
32     Fl_Input *win_input;
33     Fl_Input *thres_input;
34     Fl_Input *seq_num_input;
35     Fl_Scroll *seq_scroll;
36     // need to keep track of these so a browsed file search can set the input
37     // fields to teh selected file
38     std::vector<Fl_Input*> seq_inputs, annot_inputs;
39
40
41     // callback receiver functions
42
43     void real_do_analysis();
44
45     void real_set_ana_name_cb(Fl_Input* o);
46     void real_set_win_size_cb(Fl_Input* o);
47     void real_set_threshold_cb(Fl_Input* o);
48     void real_set_seq_num_cb(Fl_Input* o);
49
50     void real_seq_file_in_cb(Fl_Input* o, int i);
51     void real_choose_seq_file_cb(int i);
52     void real_annot_file_in_cb(Fl_Input* o, int i);
53     void real_choose_annot_file_cb(int i);
54
55     void real_fa_index_in_cb(Fl_Input* o, int i);
56     void real_sub_start_in_cb(Fl_Input* o, int i);
57     void real_sub_end_in_cb(Fl_Input* o, int i);
58
59   private:
60     Mussa *an_analysis;
61     std::string ana_name;
62     int window, threshold, seq_num;
63     std::vector<std::string> seq_files, annot_files;
64     std::vector<int> fasta_indices, sub_seq_starts, sub_seq_ends;
65     bool win_append, thres_append;
66
67     bool all_done;
68     static void print_cb(Fl_Button*, void*);
69     inline void print_cb_real(Fl_Button*, void*);
70
71     void add_seq_input(int index);
72 };
73
74 // crazy whacked shite Titus taught me to do to get an index value associated
75 // with each instance of an input associated with the callback... 
76
77 struct seq_data_instance
78 {
79   SetupWindow * sw_ptr;
80   int index;
81 };
82
83 #endif