本文整理汇总了C++中Fl_Widget::color方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Widget::color方法的具体用法?C++ Fl_Widget::color怎么用?C++ Fl_Widget::color使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Widget
的用法示例。
在下文中一共展示了Fl_Widget::color方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update_active
void TaskBar::update_active(Window active)
{
for(int n=0; n<children(); n++)
{
Fl_Widget *w = child(n);
Window win = w->argument();
if(GetState(win) == IconicState)
w->label_color(fl_inactive(FL_BLACK));
else
w->label_color(Fl_Button::default_style->label_color);
if(active==win) {
TaskBar::active = win;
w->set_value();
w->color(fl_lighter(Fl_Button::default_style->color));
w->highlight_color(fl_lighter(Fl_Button::default_style->color));
} else {
w->clear_value();
w->color(Fl_Button::default_style->color);
w->highlight_color(Fl_Button::default_style->highlight_color);
}
}
redraw();
}
示例2: create_the_forms
void create_the_forms() {
Fl_Widget *obj;
form = new Fl_Window(370, 450);
obj = new Fl_Box(20,20,330,40,"eFLTK Demonstration");
obj->box(FL_ENGRAVED_BOX);
obj->color(FL_GRAY-4);
obj->label_size(26);
obj->label_font(FL_HELVETICA_BOLD);
obj->label_type(FL_SHADOW_LABEL);
obj = new Fl_Box(20,70,330,330,0);
obj->box(FL_ENGRAVED_BOX);
obj->color(FL_GRAY-6);
obj = new Fl_Button(20,20,330,380);
obj->type(Fl_Button::HIDDEN);
obj->callback(doback);
obj = but[0] = new Fl_Button(40,90,90,90);
obj = but[1] = new Fl_Button(140,90,90,90);
obj = but[2] = new Fl_Button(240,90,90,90);
obj = but[3] = new Fl_Button(40,190,90,90);
obj = but[4] = new Fl_Button(140,190,90,90);
obj = but[5] = new Fl_Button(240,190,90,90);
obj = but[6] = new Fl_Button(40,290,90,90);
obj = but[7] = new Fl_Button(140,290,90,90);
obj = but[8] = new Fl_Button(240,290,90,90);
for (int i=0; i<9; i++) {
but[i]->set_flag(FL_ALIGN_WRAP);
but[i]->callback(dobut, i);
}
obj = new Fl_Button(130,410,110,30,"Exit");
obj->callback(doexit);
form->end();
}