1 #ifndef _MUSSA_GUI_SUBANA_H_
2 #define _MUSSA_GUI_SUBANA_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
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.
15 #include <FL/Fl_Button.H>
16 #include <FL/Fl_Window.H>
17 #include <FL/Fl_Input.H>
18 #include <FL/Fl_File_Chooser.H>
19 #include <FL/Fl_Scroll.H>
21 #include "mussa_class.hh"
22 #include "mussa_gui_seq_text.hh"
24 class SubanaWindow : public Fl_Window
27 SubanaWindow(int w, int h, const char* title, Mussa *an_analysis,
28 std::vector<Sequence> some_Seqs);
37 Fl_Input *thres_input;
38 Fl_Input *seq_num_input;
39 Fl_Scroll *seq_scroll;
40 // need to keep track of these so a browsed file search can set the input
41 // fields to the selected file
42 std::vector<Fl_Input*> seq_inputs, annot_inputs;
45 // callback receiver functions
47 void real_do_subana();
49 void real_set_ana_name_cb(Fl_Input* o);
50 void real_set_win_size_cb(Fl_Input* o);
51 void real_set_threshold_cb(Fl_Input* o);
53 void real_sub_start_in_cb(Fl_Input* o, int i);
54 void real_sub_end_in_cb(Fl_Input* o, int i);
58 std::vector<Sequence> the_Seqs;
61 int window, threshold, seq_num;
62 std::vector<int> sub_seq_starts, sub_seq_ends;
63 bool win_append, thres_append;
66 static void print_cb(Fl_Button*, void*);
67 inline void print_cb_real(Fl_Button*, void*);
69 void add_seq_input(int index, std::string a_name);
72 // crazy whacked shite Titus taught me to do to get an index value associated
73 // with each instance of an input associated with the callback...
76 struct sub_seq_data_instance
78 SubanaWindow * sw_ptr;