本文整理汇总了C++中Fl_Tabs::color方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Tabs::color方法的具体用法?C++ Fl_Tabs::color怎么用?C++ Fl_Tabs::color使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Tabs
的用法示例。
在下文中一共展示了Fl_Tabs::color方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: make_window
void ColorFltkMenu::make_window() {
size(400, 305);
{
{ Fl_Hold_Browser* o = categorybrowser = new Fl_Hold_Browser(10, 55, 125, 100, "Categories");
o->align(FL_ALIGN_TOP);
o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
o->callback(category_cb, this);
VMDFLTKTOOLTIP(o, "Select color category then name to set active color")
}
{ Fl_Hold_Browser* o = itembrowser = new Fl_Hold_Browser(140, 55, 120, 100, "Names");
o->align(FL_ALIGN_TOP);
o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
o->callback(item_cb, this);
VMDFLTKTOOLTIP(o, "Select color category then name to set active color")
}
{ Fl_Hold_Browser* o = colorbrowser = new Fl_Hold_Browser(265, 55, 125, 100, "Colors");
o->align(FL_ALIGN_TOP);
o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
o->callback(color_cb, this);
VMDFLTKTOOLTIP(o, "Select color category then name to set active color")
}
new Fl_Box(10, 10, 190, 25, "Assign colors to categories:");
{ Fl_Tabs* o = new Fl_Tabs(0, 165, 400, 150);
#if defined(VMDMENU_WINDOW)
o->color(VMDMENU_WINDOW, FL_GRAY);
o->selection_color(VMDMENU_WINDOW);
#endif
{ Fl_Group* o = new Fl_Group(0, 185, 400, 125, "Color Definitions");
#if defined(VMDMENU_WINDOW)
o->color(VMDMENU_WINDOW, FL_GRAY);
o->selection_color(VMDMENU_WINDOW);
#endif
{ Fl_Hold_Browser* o = colordefbrowser = new Fl_Hold_Browser(15, 195, 135, 100);
o->labeltype(FL_NO_LABEL);
o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
o->callback(colordef_cb, this);
VMDFLTKTOOLTIP(o, "Select color name to adjust RGB color definition")
}
{ Fl_Value_Slider* o = redscale = new Fl_Value_Slider(160, 195, 225, 20);
o->type(FL_HORIZONTAL);
o->color(VMDMENU_COLOR_RSLIDER);
o->callback(rgb_cb, this);
VMDFLTKTOOLTIP(o, "Adjust slider to change RGB color definition")
}
{ Fl_Value_Slider* o = greenscale = new Fl_Value_Slider(160, 215, 225, 20);
o->type(FL_HORIZONTAL);
o->color(VMDMENU_COLOR_GSLIDER);
o->callback(rgb_cb, this);
VMDFLTKTOOLTIP(o, "Adjust slider to change RGB color definition")
}
{ Fl_Value_Slider* o = bluescale = new Fl_Value_Slider(160, 235, 225, 20);
o->type(FL_HORIZONTAL);
o->color(VMDMENU_COLOR_BSLIDER);
o->callback(rgb_cb, this);
VMDFLTKTOOLTIP(o, "Adjust slider to change RGB color definition")
}
{ Fl_Button* o = grayscalebutton = new Fl_Button(165, 265, 85, 25, "Grayscale");
o->type(FL_TOGGLE_BUTTON);
#if defined(VMDMENU_WINDOW)
o->color(VMDMENU_WINDOW, FL_GRAY);
#endif
VMDFLTKTOOLTIP(o, "Lock sliders for grayscale color")
}
defaultbutton = new Fl_Button(290, 265, 85, 25, "Default");
#if defined(VMDMENU_WINDOW)
defaultbutton->color(VMDMENU_WINDOW, FL_GRAY);
#endif
defaultbutton->callback(default_cb, this);
VMDFLTKTOOLTIP(defaultbutton, "Reset to original RGB color")
o->end();
}
{ Fl_Group* o = new Fl_Group(0, 185, 400, 125, "Color Scale");
#if defined(VMDMENU_WINDOW)
o->color(VMDMENU_WINDOW, FL_GRAY);
o->selection_color(VMDMENU_WINDOW);
#endif
o->hide();
{ Fl_Choice* o = scalemethod = new Fl_Choice(15, 220, 80, 25, "Method");
o->color(VMDMENU_CHOOSER_BG, VMDMENU_CHOOSER_SEL);
o->down_box(FL_BORDER_BOX);
o->align(FL_ALIGN_TOP);
o->callback(scalemethod_cb, this);
}
offsetvalue = new Fl_Value_Slider(160, 205, 180, 20, "Offset");
offsetvalue->type(FL_HORIZONTAL);
offsetvalue->color(VMDMENU_SLIDER_BG, VMDMENU_SLIDER_FG);
offsetvalue->align(FL_ALIGN_LEFT);
offsetvalue->range(-1.0, 1.0);
offsetvalue->callback(scalesettings_cb, this);
{ Fl_Value_Slider* o = midpointvalue = new Fl_Value_Slider(160, 235, 180, 20, "Midpoint");
o->type(FL_HORIZONTAL);
midpointvalue->align(FL_ALIGN_LEFT);
midpointvalue->color(VMDMENU_SLIDER_BG, VMDMENU_SLIDER_FG);
o->range(0.0, 1.0);
o->callback(scalesettings_cb, this);
}
image = new ColorscaleImage(10, 265, 380, 25, app);
o->end();
}
//.........这里部分代码省略.........
示例2: make_codingstyle_window
Fl_Window* make_codingstyle_window() {
Fl_Window* w;
{Fl_Window* o = new Fl_Window(310, 255);
w = o;
o->shortcut(0xff1b);
{Fl_Tabs* o = new Fl_Tabs(0, 0, 303, 220);
o->color((Fl_Color)0xfffffffe);
{Fl_Group* o = new Fl_Group(1, 24, 301, 195, _("Brace Style"));
{Fl_Group* o = new Fl_Group(14, 22, 282, 122, _("Brace Style"));
o->box(FL_ENGRAVED_BOX);
o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
{Fl_Box* o = new Fl_Box(20, 6, 47, 20, _("if ( x ) {"));
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = new Fl_Box(20, 25, 45, 20, _("++y;"));
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = new Fl_Box(20, 41, 36, 20, _("}"));
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = new Fl_Box(114, 6, 47, 20, _("if ( x )"));
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = new Fl_Box(114, 25, 36, 20, _("{"));
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = new Fl_Box(115, 42, 46, 20, _("++y;"));
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = new Fl_Box(114, 59, 36, 20, _("}"));
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
{Fl_Round_Button* o = pStyle1 = new Fl_Round_Button(16, 84, 66, 25, _("Style 1"));
o->type(Fl_Round_Button::RADIO);
o->value(1);
o->callback((Fl_Callback*)cb_pStyle1);
}
{Fl_Box* o = new Fl_Box(201, 6, 47, 20, _("if ( x )"));
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = new Fl_Box(201, 25, 36, 20, _("{"));
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = new Fl_Box(227, 42, 34, 22, _("++y;"));
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = new Fl_Box(201, 59, 36, 20, _("}"));
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
}
{Fl_Round_Button* o = pStyle2 = new Fl_Round_Button(109, 84, 66, 25, _("Style 2"));
o->type(Fl_Round_Button::RADIO);
o->callback((Fl_Callback*)cb_pStyle2);
}
{Fl_Round_Button* o = pStyle3 = new Fl_Round_Button(200, 84, 66, 25, _("Style 3"));
o->type(Fl_Round_Button::RADIO);
o->callback((Fl_Callback*)cb_pStyle3);
}
o->end();
}
{Fl_Check_Button* o = pNoSpaceParens = new Fl_Check_Button(15, 147, 195, 22, _("No space before parentheses"));
o->callback((Fl_Callback*)cb_pNoSpaceParens);
}
{Fl_Check_Button* o = pBraceFuncs = new Fl_Check_Button(15, 170, 174, 22, _("Apply to function braces"));
o->value(1);
o->callback((Fl_Callback*)cb_pBraceFuncs);
}
o->end();
}
{Fl_Group* o = new Fl_Group(1, 24, 301, 195, _("Other"));
o->hide();
{Fl_Group* o = new Fl_Group(11, 22, 284, 90, _("Indentation"));
o->box(FL_ENGRAVED_BOX);
o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
{Fl_Value_Input* o = pTabSize = new Fl_Value_Input(129, 33, 60, 22, _("Tab size for indents"));
o->maximum(12);
o->value(2);
o->callback((Fl_Callback*)cb_pTabSize);
}
{Fl_Check_Button* o = pIndentTabs = new Fl_Check_Button(13, 7, 114, 22, _("Indent with tabs"));
o->callback((Fl_Callback*)cb_pIndentTabs);
}
{Fl_Check_Button* o = pIndentCode = new Fl_Check_Button(14, 58, 151, 22, _("Indent code blocks"));
o->callback((Fl_Callback*)cb_pIndentCode);
}
o->end();
}
{Fl_Check_Button* o = pReturnParens = new Fl_Check_Button(10, 120, 220, 22, _("Always use parentheses on return"));
o->callback((Fl_Callback*)cb_pReturnParens);
}
o->end();
}
o->end();
}
{Fl_Button* o = new Fl_Button(115, 227, 59, 23, _("Cancel"));
o->callback((Fl_Callback*)cb_Cancel);
}
{Fl_Button* o = new Fl_Button(180, 227, 59, 23, _("Save"));
o->callback((Fl_Callback*)cb_Save);
}
{Fl_Button* o = new Fl_Button(245, 227, 59, 23, _("Use"));
//.........这里部分代码省略.........
示例3: main
int main (int argc, char **argv) {
Fl_Window* w;
fl_init_locale_support("ewmconf", PREFIX"/share/locale");
readConfiguration();
{Fl_Window* o = new Fl_Window(320, 370, _("Window manager settings"));
w = o;
{Fl_Tabs* o = new Fl_Tabs(2, 5, 318, 325);
o->color((Fl_Color)16);
{Fl_Group* o = new Fl_Group(1, 29, 316, 295, _("&Titlebar"));
o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
{Fl_Choice* o = new Fl_Choice(83, 13, 105, 22, _("Text align:")); o->begin();
o->callback((Fl_Callback*)cb_Text);
new Fl_Item(_("Left"));
new Fl_Item(_("Right"));
new Fl_Item(_("Center"));
o->value(title_align);
o->end();
}
{Fl_Value_Input* o = new Fl_Value_Input(243, 13, 60, 22, _("Height:"));
o->minimum(10);
o->maximum(50);
o->step(1);
o->value(20);
o->callback((Fl_Callback*)cb_Height);
o->value(title_height);
}
{Fl_Button* o = titlebarLabelColorButton = new Fl_Button(85, 55, 60, 20, _("Titlebar label color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_titlebarLabelColorButton);
o->align(132);
o->color((Fl_Color)title_normal_color_text);
}
{Fl_Button* o = titlebarColorButton = new Fl_Button(85, 120, 60, 20, _("Titlebar color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_titlebarColorButton);
o->align(132);
o->color((Fl_Color) title_normal_color);
}
{Fl_Group* o = new Fl_Group(153, 45, 160, 110);
{Fl_Button* o = titlebarActiveLabelColorButton = new Fl_Button(90, 10, 60, 20, _("Titlebar active label color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_titlebarActiveLabelColorButton);
o->align(132);
o->color((Fl_Color) title_active_color_text);
}
{Fl_Button* o = titlebarActiveColorButton = new Fl_Button(90, 75, 60, 20, _("Titlebar active color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_titlebarActiveColorButton);
o->align(132);
o->color((Fl_Color)title_active_color);
}
o->end();
}
{Fl_Choice* o = titlebarDrawGrad = new Fl_Choice(85, 157, 163, 23, _("Box type:")); o->begin();
o->callback((Fl_Callback*)cb_titlebarDrawGrad);
o->align(132);
new Fl_Item(_("Flat"));
new Fl_Item(_("Horizontal shade"));
new Fl_Item(_("Thin down"));
new Fl_Item(_("Up box"));
new Fl_Item(_("Down box"));
new Fl_Item(_("Plastic"));
o->value(title_draw_grad);
o->end();
}
{Fl_Check_Button* o = useThemeButton = new Fl_Check_Button(8, 220, 300, 20, _("&Use theme"));
o->callback((Fl_Callback*)cb_useThemeButton);
o->value(use_theme);
}
{Fl_Input* o = themePathInput = new Fl_Input(65, 247, 210, 23, _("Path:"));
o->callback((Fl_Callback*)cb_themePathInput);
o->deactivate();
themePathInput->value(theme_path);
}
{Fl_Button* o = browse_btn = new Fl_Button(280, 247, 25, 23, _("..."));
o->callback((Fl_Callback*)cb_browse_btn);
o->deactivate();
}
{Fl_Divider* o = new Fl_Divider(8, 190, 300, 25, _("label"));
o->color((Fl_Color)16);
}
{Fl_Divider* o = new Fl_Divider(8, 85, 297, 25, _("label"));
o->color((Fl_Color)16);
}
o->end();
}
{Fl_Group* o = new Fl_Group(3, 20, 310, 305, _("&Resizing"));
o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
o->hide();
{Fl_Check_Button* o = animateButton = new Fl_Check_Button(10, 10, 300, 20, _("Animate size changes"));
o->value(1);
o->callback((Fl_Callback*)cb_animateButton);
o->value(animate);
}
{Fl_Value_Slider* o = animateSlider = new Fl_Value_Slider(70, 35, 235, 20, _("Speed:"));
o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
o->box(FL_DOWN_BOX);
o->text_size(10);
o->minimum(5);
//.........这里部分代码省略.........
示例4: main
int main (int argc, char **argv) {
Fl_Window* w;
fl_init_locale_support("eiconsconf", PREFIX"/share/locale");
readIconsConfiguration();
{Fl_Window* o = iconsConfWindow = new Fl_Window(265, 314, _("Icons settings"));
w = o;
o->shortcut(0xff1b);
{Fl_Button* o = new Fl_Button(25, 280, 75, 25, _("&OK"));
o->callback((Fl_Callback*)cb_OK);
}
{Fl_Button* o = new Fl_Button(185, 280, 75, 25, _("&Cancel"));
o->callback((Fl_Callback*)cb_Cancel);
}
{Fl_Button* o = new Fl_Button(105, 280, 75, 25, _("&Apply"));
o->callback((Fl_Callback*)cb_Apply);
}
{Fl_Tabs* o = new Fl_Tabs(3, 5, 257, 265);
o->color((Fl_Color)0xfffffffe);
{Fl_Group* o = new Fl_Group(1, 23, 255, 241, _("Look&&feel"));
o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
{Fl_Button* o = colorButton = new Fl_Button(165, 17, 60, 18, _("Background color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_colorButton);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->color((Fl_Color) label_background);
if(label_trans) o->deactivate();
}
{Fl_Button* o = colorButton1 = new Fl_Button(165, 47, 60, 18, _("Label color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_colorButton1);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->color((Fl_Color) label_foreground);
}
{Fl_Value_Slider* o = maxWidthSlider = new Fl_Value_Slider(115, 95, 125, 20, _("Maximum width: "));
o->type(Fl_Value_Slider::HORIZONTAL);
o->minimum(48);
o->maximum(200);
o->step(1);
o->value(50);
o->slider_size(10);
o->callback((Fl_Callback*)cb_maxWidthSlider);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->value(label_maxwidth);
}
{Fl_Value_Slider* o = fontsizeSlider = new Fl_Value_Slider(115, 125, 125, 20, _("Font height: "));
o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
o->minimum(8);
o->maximum(48);
o->step(1);
o->value(10);
o->slider_size(10);
o->callback((Fl_Callback*)cb_fontsizeSlider);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->value(label_fontsize);
}
{Fl_Value_Slider* o = gridspaceSlider = new Fl_Value_Slider(115, 155, 125, 20, _("Grid spacing: "));
o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
o->minimum(1);
o->maximum(50);
o->step(1);
o->value(10);
o->slider_size(10);
o->callback((Fl_Callback*)cb_gridspaceSlider);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->value(label_gridspacing);
}
{Fl_Check_Button* o = autoArrButton = new Fl_Check_Button(25, 215, 222, 20, _("Auto arrange icons"));
o->callback((Fl_Callback*)cb_autoArrButton);
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
o->value(auto_arr);
}
{Fl_Check_Button* o = engageButton = new Fl_Check_Button(25, 190, 222, 20, _("Engage with just one click"));
o->callback((Fl_Callback*)cb_engageButton);
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
o->value(label_engage_1click);
}
{Fl_Check_Button* o = bg_color_check = new Fl_Check_Button(227, 17, 20, 18);
o->callback((Fl_Callback*)cb_bg_color_check);
o->tooltip(_("Clear this, to get transparent background."));
if(!label_trans) o->set_value();
}
o->end();
}
o->end();
}
o->end();
o->resizable(o);
}
w->show(argc, argv);
return Fl::run();
}