c0d1151b82d93659eaa94191aa3292a93cbb700f
[mussa.git] / mussa_gui_annot_window.hh
1 #include "mussa_gui_motif_window.hh"
2
3 #include <FL/Fl.H>
4 #include <FL/Fl_Window.H>
5 #include <FL/Fl_Button.H>
6
7 #include <FL/Fl_Input.H>
8 #include <FL/Fl_Output.H>
9 #include <FL/Fl_Pack.H>
10 #include <FL/fl_show_colormap.H>
11
12 struct annot_color
13 {
14   string type;
15   Fl_Color color;
16 };
17
18 //typedef annot_ptr *annot;
19  
20
21 class AnnotWindow : public Fl_Window
22
23   public:
24     AnnotWindow(int w, int h, const char* title, 
25                 vector<annot_color> * some_annots);
26     ~AnnotWindow();
27     Fl_Pack * annot_input_pack;
28     list<Fl_Output*> annot_ins;
29     vector<Fl_Button*> annot_color_buttons;
30     list<Fl_Input*> name_ins;
31     Fl_Button* test;
32     Fl_Button* add_annot;
33
34     void cb_annot_in_i(Fl_Input*, int i);
35     void cb_annot_color_i(Fl_Button* o, int i);
36
37   private:
38     vector<annot_color> * the_annots;
39     int annot_count;
40
41     void add_annot_input(int index);
42
43     static void add_annot_cb(Fl_Button*, void*);
44     inline void add_annot_cb_real(Fl_Button*, void*);
45
46     static void print_cb(Fl_Button*, void*);
47     inline void print_cb_real(Fl_Button*, void*);
48 };
49
50 // crazy whacked shite Titus taught me to do to get an index value associated
51 // with each instance of an input associated with the callback... 
52 struct annot_instance
53 {
54   AnnotWindow * mw_ptr;
55   int index;
56 };
57
58 annot_color new_blank_annot();