本文整理汇总了C++中Fl_Box::callback方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Box::callback方法的具体用法?C++ Fl_Box::callback怎么用?C++ Fl_Box::callback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Box
的用法示例。
在下文中一共展示了Fl_Box::callback方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
SciCalc::SciCalc() {
Fl_Window* w;
{Fl_Window* o = win = new Fl_Window(181, 262, "eCalc");
w = o;
o->label_type(FL_NO_LABEL);
o->shortcut(0xff1b);
o->user_data((void*)(this));
o->align();
{Fl_Box* o = leddisplay = new Fl_Box(2, 2, 176, 24, "Welcome");
o->box(FL_THIN_DOWN_BOX);
o->label_font(fl_fonts+4);
o->color((Fl_Color)207);
o->label_color((Fl_Color)59);
o->label_size(14);
o->callback((Fl_Callback*)cb_leddisplay);
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = box_DEGRAD = new Fl_Box(24, 28, 35, 16);
o->box(FL_THIN_DOWN_BOX);
o->label_color((Fl_Color)1);
o->label_size(9);
o->callback((Fl_Callback*)cb_box_DEGRAD);
o->align(FL_ALIGN_INSIDE);
}
{Fl_Box* o = box_bracket = new Fl_Box(59, 28, 65, 16);
o->box(FL_THIN_DOWN_BOX);
o->label_color((Fl_Color)1);
o->label_size(9);
o->align(FL_ALIGN_INSIDE);
}
{Fl_Box* o = box_M = new Fl_Box(124, 28, 35, 16);
o->box(FL_THIN_DOWN_BOX);
o->label_color((Fl_Color)1);
o->label_size(9);
o->callback((Fl_Callback*)cb_box_M);
o->align(FL_ALIGN_INSIDE);
}
{Fl_Group* o = new Fl_Group(46, 46, 93, 22);
o->color((Fl_Color)46);
{Fl_Button* o = radio_2 = new Fl_Button(3, 3, 20, 15, "2");
o->type(Fl_Button::RADIO);
o->label_color((Fl_Color)1);
o->label_size(10);
o->shortcut(0x40062);
o->callback((Fl_Callback*)cb_radio_2);
o->tooltip("Binary mode");
}
{Fl_Button* o = radio_8 = new Fl_Button(24, 3, 21, 15, "8");
o->type(Fl_Button::RADIO);
o->label_color((Fl_Color)1);
o->label_size(10);
o->shortcut(0x4006f);
o->callback((Fl_Callback*)cb_radio_8);
o->tooltip("Octal mode");
}
{Fl_Button* o = radio_10 = new Fl_Button(46, 3, 21, 15, "10");
o->type(Fl_Button::RADIO);
o->label_color((Fl_Color)1);
o->label_size(10);
o->shortcut(0x40064);
o->value(1);
o->callback((Fl_Callback*)cb_radio_10);
o->tooltip("Decimal mode");
}
{Fl_Button* o = radio_16 = new Fl_Button(68, 3, 21, 15, "16");
o->type(Fl_Button::RADIO);
o->label_color((Fl_Color)1);
o->label_size(10);
o->shortcut(0x40068);
o->callback((Fl_Callback*)cb_radio_16);
o->tooltip("Hex mode");
}
o->end();
}
{Fl_Group* o = new Fl_Group(3, 163, 107, 94);
o->box(FL_BORDER_BOX);
o->color((Fl_Color)43);
{Fl_Button* o = but_7 = new Fl_Button(3, 4, 32, 20, "7");
o->label_font(fl_fonts+1);
o->label_size(14);
o->shortcut(0x37);
o->callback((Fl_Callback*)cb_but_7);
}
{Fl_Button* o = but_8 = new Fl_Button(38, 4, 32, 20, "8");
o->label_font(fl_fonts+1);
o->label_size(14);
o->shortcut(0x38);
o->callback((Fl_Callback*)cb_but_8);
}
{Fl_Button* o = but_9 = new Fl_Button(72, 4, 32, 20, "9");
o->label_font(fl_fonts+1);
o->label_size(14);
o->shortcut(0x39);
o->callback((Fl_Callback*)cb_but_9);
}
{Fl_Button* o = but_4 = new Fl_Button(3, 26, 32, 20, "4");
o->label_font(fl_fonts+1);
o->label_size(14);
o->shortcut(0x34);
o->callback((Fl_Callback*)cb_but_4);
//.........这里部分代码省略.........