summaryrefslogtreecommitdiff
path: root/fluid/class.C
blob: e547cf2a728c276fdb5fe4dbf3e17b14ec78ca5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// generated by Fast Light User Interface Designer (fluid) version 0.99

#include "class.H"

inline void essai::cb_button_i(Fl_Button*, void*) {
  printf("button\n");
}
void essai::cb_button(Fl_Button* o, void* v) {
  ((essai*)(o->parent()->user_data()))->cb_button_i(o,v);
}

inline void essai::cb_unnamed_i(Fl_Button*, void*) {
  printf("unnamed\n");
}
void essai::cb_unnamed(Fl_Button* o, void* v) {
  ((essai*)(o->parent()->user_data()))->cb_unnamed_i(o,v);
}

inline void essai::cb_src_i(Fl_Button*, void*) {
  (new essai)->win->show();
}
void essai::cb_src(Fl_Button* o, void* v) {
  ((essai*)(o->parent()->user_data()))->cb_src_i(o,v);
}

#include <FL/Fl_Bitmap.H>
static char bits_ew_mask[] = {  
0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 28, 56, 254, 127, 255, 255, 255, 255, 254, 127, 28, 56, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0
};
static Fl_Bitmap bitmap_ew_mask(bits_ew_mask, 16, 16);

inline void essai::cb_change_i(Fl_Menu_*, void*) {
  cbox->color(cbox->color()+1);
cbox->redraw();
}
void essai::cb_change(Fl_Menu_* o, void* v) {
  ((essai*)(o->parent()->user_data()))->cb_change_i(o,v);
}

Fl_Menu_Item essai::menu_menu[] = {
 {"change color", 0,  (Fl_Callback*)essai::cb_change, 0, 0, 0, 3, 14, 0},
 {"radio off", 0,  0, 0, 8, 0, 3, 14, 0},
 {"radio on", 0,  0, 0, 12, 0, 3, 14, 0},
 {"toggle off", 0,  0, 0, 2, 0, 3, 14, 0},
 {"toggle on", 0,  0, 0, 6, 0, 3, 14, 0},
 {"new item 5", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 6", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 7", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 8", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 9", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 10", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 11", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 12", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 13", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 14", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 15", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 16", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 17", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 18", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 19", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 20", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 21", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 22", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 23", 0,  0, 0, 0, 0, 3, 14, 0},
 {"new item 24", 0,  0, 0, 0, 0, 3, 14, 0},
 {0}
};

inline void essai::cb_color_i(Fl_Button*, void*) {
  cbox->color(cbox->color()+1);
cbox->redraw();
}
void essai::cb_color(Fl_Button* o, void* v) {
  ((essai*)(o->parent()->user_data()))->cb_color_i(o,v);
}

inline void essai::cb_delete_i(Fl_Button*, void*) {
  delete this;
}
void essai::cb_delete(Fl_Button* o, void* v) {
  ((essai*)(o->parent()->user_data()))->cb_delete_i(o,v);
}

essai::essai() {
  Fl_Window *w;
  { Fl_Window* o = win = w = new Fl_Window(282, 193);
    o->user_data((void*)(this));
    { Fl_Button* o = new Fl_Button(10, 10, 55, 35, "button");
      o->callback((Fl_Callback*)cb_button);
    }
    { Fl_Button* o = new Fl_Button(10, 45, 145, 35, "unnamed");
      o->callback((Fl_Callback*)cb_unnamed);
    }
    { Fl_Button* o = new Fl_Button(10, 80, 145, 35);
      bitmap_ew_mask.label(o);
      o->callback((Fl_Callback*)cb_src);
    }
    { Fl_Menu_Button* o = new Fl_Menu_Button(10, 115, 145, 35, "menu");
      o->menu(menu_menu);
    }
    { Fl_Button* o = new Fl_Button(70, 150, 85, 35, "color");
      o->callback((Fl_Callback*)cb_color);
    }
    new Fl_Button(200, 10, 55, 35, "boring");
    { Fl_Box* o = cbox = new Fl_Box(165, 80, 55, 35, "color");
      o->box(FL_FLAT_BOX);
    }
    { Fl_Button* o = new Fl_Button(200, 125, 55, 35, "delete this");
      o->callback((Fl_Callback*)cb_delete);
    }
    button_variable = new Fl_Button(100, 10, 55, 35, "button");
    w->end();
  }
}

essai::~essai() {
  delete win;
}

int main(int argc, char **argv) {
  essai E; E.win->show();
  return Fl::run();
}