f9039b2ae2
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
86 lines
2.3 KiB
C
86 lines
2.3 KiB
C
// generated by Fast Light User Interface Designer (fluid) version 0.99
|
|
|
|
#include "penne.H"
|
|
|
|
inline void UserInterface::cb_New_i(Fl_Button*, void*) {
|
|
new UserInterface;
|
|
}
|
|
void UserInterface::cb_New(Fl_Button* o, void* v) {
|
|
((UserInterface*)(o->parent()->user_data()))->cb_New_i(o,v);
|
|
}
|
|
|
|
inline void UserInterface::cb_Delete_i(Fl_Button*, void*) {
|
|
delete this;
|
|
}
|
|
void UserInterface::cb_Delete(Fl_Button* o, void* v) {
|
|
((UserInterface*)(o->parent()->user_data()))->cb_Delete_i(o,v);
|
|
}
|
|
|
|
inline void UserInterface::cb_button1_i(Fl_Light_Button* o, void*) {
|
|
Button->value(o->value());
|
|
}
|
|
void UserInterface::cb_button1(Fl_Light_Button* o, void* v) {
|
|
((UserInterface*)(o->parent()->user_data()))->cb_button1_i(o,v);
|
|
}
|
|
|
|
inline void UserInterface::cb_When_i(Fl_Menu_* o, void*) {
|
|
Button->value(o->value());
|
|
}
|
|
void UserInterface::cb_When(Fl_Menu_* o, void* v) {
|
|
((UserInterface*)(o->parent()->user_data()))->cb_When_i(o,v);
|
|
}
|
|
|
|
Fl_Menu_Item UserInterface::menu_[] = {
|
|
{"coucou", 0, 0, 0, 64, 0, 3, 14, 0},
|
|
{"When you press this, it should crash !", 0, (Fl_Callback*)UserInterface::cb_When, 0, 2, 0, 3, 14, 0},
|
|
{0},
|
|
{0}
|
|
};
|
|
|
|
UserInterface::UserInterface() {
|
|
Fl_Window *w;
|
|
{ Fl_Window* o = new Fl_Window(375, 199);
|
|
w = Win = o;
|
|
o->user_data((void*)(this));
|
|
{ Fl_Button* o = new Fl_Button(35, 145, 120, 35, "New window");
|
|
o->callback((Fl_Callback*)cb_New);
|
|
}
|
|
{ Fl_Button* o = new Fl_Button(215, 145, 120, 35, "Delete window");
|
|
o->callback((Fl_Callback*)cb_Delete);
|
|
}
|
|
{ Fl_Light_Button* o = new Fl_Light_Button(45, 25, 95, 25, "button1");
|
|
o->callback((Fl_Callback*)cb_button1);
|
|
}
|
|
{ Fl_Check_Button* o = new Fl_Check_Button(220, 25, 95, 25, "button2");
|
|
Button = o;
|
|
o->down_box(FL_DIAMOND_DOWN_BOX);
|
|
}
|
|
{ Fl_Tile* o = new Fl_Tile(110, 55, 165, 80);
|
|
{ Fl_Box* o = new Fl_Box(110, 55, 165, 50, "label");
|
|
o->box(FL_DOWN_BOX);
|
|
}
|
|
{ Fl_Box* o = new Fl_Box(110, 105, 80, 30, "label");
|
|
o->box(FL_DOWN_BOX);
|
|
}
|
|
{ Fl_Box* o = new Fl_Box(190, 105, 85, 30, "label");
|
|
o->box(FL_DOWN_BOX);
|
|
}
|
|
o->end();
|
|
}
|
|
{ Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 375, 25);
|
|
o->menu(menu_);
|
|
}
|
|
w->end();
|
|
}
|
|
Win->show();
|
|
}
|
|
|
|
UserInterface::~UserInterface() {
|
|
delete Win;
|
|
}
|
|
|
|
int main() {
|
|
new UserInterface;
|
|
return Fl::run();
|
|
}
|