Thicker bars, better letters
[mussa.git] / gui / AnnotWindow.hh
1 #ifndef _MUSSA_GUI_ANNOT_WINDOW_H_
2 #define _MUSSA_GUI_ANNOT_WINDOW_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 <string>
14 #include <vector>
15
16 #include <FL/Fl_Window.H>
17 #include <FL/Fl_Button.H>
18
19 #include <FL/Fl_Input.H>
20 #include <FL/Fl_Output.H>
21 #include <FL/Fl_Pack.H>
22
23 #include "MotifWindow.hh"
24
25 struct annot_color
26 {
27   std::string type;
28   Fl_Color color;
29 };
30
31 //typedef annot_ptr *annot;
32  
33
34 class AnnotWindow : public Fl_Window
35
36   public:
37     AnnotWindow(int w, int h, const char* title, 
38                 std::vector<annot_color> * some_annots);
39     ~AnnotWindow();
40     Fl_Pack * annot_input_pack;
41     std::list<Fl_Output*> annot_ins;
42     std::vector<Fl_Button*> annot_color_buttons;
43     std::list<Fl_Input*> name_ins;
44     Fl_Button* test;
45     Fl_Button* add_annot;
46
47     void cb_annot_in_i(Fl_Input*, int i);
48     void cb_annot_color_i(Fl_Button* o, int i);
49
50   private:
51     std::vector<annot_color> * the_annots;
52     int annot_count;
53
54     void add_annot_input(int index);
55
56     static void add_annot_cb(Fl_Button*, void*);
57     inline void add_annot_cb_real(Fl_Button*, void*);
58
59     static void print_cb(Fl_Button*, void*);
60     inline void print_cb_real(Fl_Button*, void*);
61 };
62
63 // crazy whacked shite Titus taught me to do to get an index value associated
64 // with each instance of an input associated with the callback... 
65 struct annot_instance
66 {
67   AnnotWindow * mw_ptr;
68   int index;
69 };
70
71 annot_color new_blank_annot();
72 #endif