本文整理汇总了C++中Fl_Check_Button::tooltip方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Check_Button::tooltip方法的具体用法?C++ Fl_Check_Button::tooltip怎么用?C++ Fl_Check_Button::tooltip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Check_Button
的用法示例。
在下文中一共展示了Fl_Check_Button::tooltip方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create_dlg
//-----------------------------------------------------------------------------
void NrmDlg::create_dlg()
{
Fl_Menu_Item k[]={{"x"}, {"y"}, { "z"}, {0}};
wnd = new Fl_Double_Window(135, 215);
min = new Fl_Value_Input(10, 25, 115, 25, mgl_gettext("Minimal value (v1)"));
min->align(FL_ALIGN_TOP_LEFT);
min->tooltip(mgl_gettext("Minimal value for resulting data values"));
max = new Fl_Value_Input(10, 70, 115, 25, mgl_gettext("Maximal value (v2)"));
max->align(FL_ALIGN_TOP_LEFT);
max->tooltip(mgl_gettext("Maximal value for resulting data values"));
dir = new Fl_Choice(10, 115, 115, 25, mgl_gettext("Direction"));
dir->align(FL_ALIGN_TOP_LEFT); dir->copy(k);
dir->tooltip(mgl_gettext("Direction along which data will be filled"));
sym = new Fl_Check_Button(10, 115, 115, 25, mgl_gettext("Symetrical range"));
sym->tooltip(mgl_gettext("Normalize in symmetrical range: -max(|v1|,|v2|) ... max(|v1|,|v2|)"));
Fl_Button *o;
o = new Fl_Button(25, 150, 85, 25, mgl_gettext("Cancel")); o->callback(close_dlg_cb,wnd);
o->box(UDAV_UP_BOX); o->down_box(UDAV_DOWN_BOX);
o->tooltip(mgl_gettext("Do nothing and close this window"));
o = new Fl_Return_Button(25, 180, 85, 25, mgl_gettext("Change"));o->callback(nrm_dlg_cb,wnd);
o->box(UDAV_UP_BOX); o->down_box(UDAV_DOWN_BOX);
o->tooltip(mgl_gettext("Change data values and close this window"));
wnd->end();
}
示例2: make_formant_window
Fl_Double_Window* FilterUI::make_formant_window() {
{ formantparswindow = new Fl_Double_Window(700, 205, "Formant Filter Parameters");
formantparswindow->user_data((void*)(this));
{ Fl_Group* o = new Fl_Group(485, 47, 105, 113);
o->box(FL_THIN_UP_BOX);
{ Fl_Counter* o = new Fl_Counter(545, 80, 40, 15, "Formant ");
o->type(1);
o->labelfont(1);
o->labelsize(10);
o->minimum(0);
o->maximum(127);
o->step(1);
o->textsize(10);
o->callback((Fl_Callback*)cb_Formant);
o->align(FL_ALIGN_LEFT);
o->bounds(0,FF_MAX_FORMANTS-1);
o->value(nformant);
} // Fl_Counter* o
{ Fl_Counter* o = new Fl_Counter(545, 55, 40, 20, "Vowel no.");
o->type(1);
o->labelfont(1);
o->labelsize(10);
o->minimum(0);
o->maximum(127);
o->step(1);
o->textfont(1);
o->textsize(11);
o->callback((Fl_Callback*)cb_Vowel);
o->align(FL_ALIGN_LEFT);
o->bounds(0,FF_MAX_VOWELS-1);
o->value(nvowel);
} // Fl_Counter* o
{ formantparsgroup = new Fl_Group(490, 105, 95, 50);
formantparsgroup->box(FL_ENGRAVED_FRAME);
{ formant_freq_dial = new WidgetPDial(495, 115, 25, 25, "freq");
formant_freq_dial->tooltip("Formant frequency");
formant_freq_dial->box(FL_ROUND_UP_BOX);
formant_freq_dial->color(FL_BACKGROUND_COLOR);
formant_freq_dial->selection_color(FL_INACTIVE_COLOR);
formant_freq_dial->labeltype(FL_NORMAL_LABEL);
formant_freq_dial->labelfont(0);
formant_freq_dial->labelsize(10);
formant_freq_dial->labelcolor(FL_FOREGROUND_COLOR);
formant_freq_dial->maximum(127);
formant_freq_dial->step(1);
formant_freq_dial->callback((Fl_Callback*)cb_formant_freq_dial);
formant_freq_dial->align(FL_ALIGN_BOTTOM);
formant_freq_dial->when(FL_WHEN_CHANGED);
} // WidgetPDial* formant_freq_dial
{ formant_q_dial = new WidgetPDial(525, 115, 24, 25, "Q");
formant_q_dial->tooltip("Formant\'s Q");
formant_q_dial->box(FL_ROUND_UP_BOX);
formant_q_dial->color(FL_BACKGROUND_COLOR);
formant_q_dial->selection_color(FL_INACTIVE_COLOR);
formant_q_dial->labeltype(FL_NORMAL_LABEL);
formant_q_dial->labelfont(0);
formant_q_dial->labelsize(10);
formant_q_dial->labelcolor(FL_FOREGROUND_COLOR);
formant_q_dial->maximum(127);
formant_q_dial->step(1);
formant_q_dial->callback((Fl_Callback*)cb_formant_q_dial);
formant_q_dial->align(FL_ALIGN_BOTTOM);
formant_q_dial->when(FL_WHEN_CHANGED);
} // WidgetPDial* formant_q_dial
{ formant_amp_dial = new WidgetPDial(555, 115, 24, 25, "amp");
formant_amp_dial->tooltip("Formant amplitude");
formant_amp_dial->box(FL_ROUND_UP_BOX);
formant_amp_dial->color(FL_BACKGROUND_COLOR);
formant_amp_dial->selection_color(FL_INACTIVE_COLOR);
formant_amp_dial->labeltype(FL_NORMAL_LABEL);
formant_amp_dial->labelfont(0);
formant_amp_dial->labelsize(10);
formant_amp_dial->labelcolor(FL_FOREGROUND_COLOR);
formant_amp_dial->maximum(127);
formant_amp_dial->step(1);
formant_amp_dial->callback((Fl_Callback*)cb_formant_amp_dial);
formant_amp_dial->align(FL_ALIGN_BOTTOM);
formant_amp_dial->when(FL_WHEN_CHANGED);
} // WidgetPDial* formant_amp_dial
formantparsgroup->end();
} // Fl_Group* formantparsgroup
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(590, 47, 100, 113);
o->box(FL_THIN_UP_BOX);
{ Fl_Counter* o = new Fl_Counter(595, 62, 55, 20, "Seq.Size");
o->type(1);
o->labelfont(1);
o->labelsize(10);
o->minimum(0);
o->maximum(127);
o->step(1);
o->textfont(1);
o->textsize(11);
o->callback((Fl_Callback*)cb_Seq);
o->align(FL_ALIGN_TOP_LEFT);
o->bounds(1,FF_MAX_SEQUENCE-1);
o->value(pars->Psequencesize);
} // Fl_Counter* o
{ Fl_Counter* o = new Fl_Counter(595, 97, 40, 15, "S.Pos.");
//.........这里部分代码省略.........
示例3: make_window
Fl_Double_Window* make_window() {
Fl_Double_Window* w;
{Fl_Double_Window* o = new Fl_Double_Window(560, 489);
w = o;
o->type(241);
{Fl_Box* o = imbox = new Fl_Box(5, 30, 385, 455);
o->box(FL_ENGRAVED_BOX);
o->align(FL_ALIGN_CLIP);
Fl_Group::current()->resizable(o);
}
{Fl_Box* o = filename_box = new Fl_Box(5, 5, 385, 20, "No file loaded...");
o->box(FL_THIN_DOWN_BOX);
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
{Fl_Group* o = new Fl_Group(395, 5, 160, 480);
o->box(FL_THIN_DOWN_BOX);
{Fl_Button* o = new Fl_Button(10, 10, 140, 25, "Load File");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Load);
}
{Fl_Button* o = new Fl_Button(10, 40, 140, 25, "Exit");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Exit);
}
new Fl_Divider(10, 75, 140, 15, "label");
{Fl_Button* o = new Fl_Button(10, 100, 140, 25, "Fit To Box");
o->type(Fl_Button::TOGGLE);
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Fit);
}
{Fl_Button* o = new Fl_Button(10, 130, 140, 25, "Tile");
o->type(Fl_Button::TOGGLE);
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Tile);
}
{Fl_Choice* o = filter_choice = new Fl_Choice(10, 335, 140, 25, "Filter:"); o->begin();
o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
o->tooltip("Choose filter");
{Fl_Item* o = new Fl_Item("None");
o->user_data((void*)(0));
}
{Fl_Item* o = new Fl_Item("Brightness");
o->user_data((void*)(FILTER_BRIGHTNESS));
}
{Fl_Item* o = new Fl_Item("Contrast");
o->user_data((void*)(FILTER_CONTRAST));
}
{Fl_Item* o = new Fl_Item("Grayscale");
o->user_data((void*)(FILTER_GRAYSCALE));
}
{Fl_Item* o = new Fl_Item("Gamma");
o->user_data((void*)(FILTER_GAMMA));
}
{Fl_Item* o = new Fl_Item("Fore Blend");
o->user_data((void*)(FILTER_FOREBLEND));
}
{Fl_Item* o = new Fl_Item("Back Blend");
o->user_data((void*)(FILTER_BACKBLEND));
}
o->end();
}
{Fl_Box* o = new Fl_Box(10, 160, 140, 160);
o->parent()->resizable(o);
}
{Fl_Value_Slider* o = Rslider = new Fl_Value_Slider(25, 380, 125, 15, "R");
o->type(Fl_Value_Slider::HORIZONTAL);
o->label_size(10);
o->text_size(10);
o->minimum(-3);
o->maximum(3);
o->value(1);
o->slider_size(5);
o->align(FL_ALIGN_LEFT);
o->tooltip("Red value for filter");
}
{Fl_Value_Slider* o = Gslider = new Fl_Value_Slider(25, 400, 125, 15, "G");
o->type(Fl_Value_Slider::HORIZONTAL);
o->label_size(10);
o->text_size(10);
o->minimum(-3);
o->maximum(3);
o->value(1);
o->slider_size(5);
o->align(FL_ALIGN_LEFT);
o->tooltip("Green value for filter");
}
{Fl_Value_Slider* o = Bslider = new Fl_Value_Slider(25, 420, 125, 15, "B");
o->type(Fl_Value_Slider::HORIZONTAL);
o->label_size(10);
o->text_size(10);
o->minimum(-3);
o->maximum(3);
o->value(1);
o->slider_size(5);
o->align(FL_ALIGN_LEFT);
o->tooltip("Blue value for filter");
}
{Fl_Button* o = new Fl_Button(10, 445, 140, 25, "Apply");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Apply);
//.........这里部分代码省略.........
示例4: main
int main(int argc, char **argv) {
fl_open_display();
/* start daemon if not started */
xscreensaver_run_daemon(fl_display);
SaverPrefs* sp = xscreensaver_read_config();
main_win = new Fl_Double_Window(340, 445, _("Screensaver options"));
/* so ESC does not interrupt running process */
main_win->callback(close_cb);
main_win->begin();
/* monitor */
Fl_Box* b1 = new Fl_Box(120, 163, 100, 15);
b1->box(FL_BORDER_BOX);
Fl_Box* b2 = new Fl_Box(65, 10, 210, 158);
b2->box(FL_THIN_UP_BOX);
Fl_Box* b3 = new Fl_Box(78, 20, 184, 138);
b3->color(FL_BLACK);
b3->box(FL_DOWN_BOX);
/* preview window in 'b3' box */
preview_win = new Fl_Double_Window(80, 22, 180, 134);
preview_win->color(FL_BLACK);
preview_win->begin();
/* if failed to load any screensaver */
if(!sp) {
Fl_Box* b4 = new Fl_Box(0, 0, 180, 134, _("No screensavers found"));
b4->labelcolor(FL_GRAY);
b4->align(FL_ALIGN_INSIDE | FL_ALIGN_WRAP);
}
preview_win->end();
Fl_Box* b4 = new Fl_Box(95, 173, 146, 14);
b4->box(FL_THIN_UP_BOX);
Fl_Group* g1 = new Fl_Group(10, 215, 320, 45, _("Screensaver"));
g1->box(FL_ENGRAVED_BOX);
g1->align(FL_ALIGN_TOP_LEFT);
g1->begin();
Fl_Choice* saver_list = new Fl_Choice(19, 225, 180, 25);
saver_list->down_box(FL_BORDER_BOX);
saver_list->add("(None)", 0, 0);
if(sp) {
int sel = 0;
saver_list->callback((Fl_Callback*)choice_cb, sp);
/* fix possible error */
if(sp->curr_hack >= sp->hacks.size())
sp->curr_hack = 0;
HackListIter it = sp->hacks.begin(), it_end = sp->hacks.end();
for(int i = 1; it != it_end; ++it, i++) {
saver_list->add((*it)->name.c_str(), 0, 0);
/*
* Check real hack index number against current one and let it match
* position in our Fl_Choice list. Note that first item is '(None)'
* so 'i' starts from 1
*/
if(sp->mode != SAVER_OFF && (*it)->sindex == sp->curr_hack)
sel = i;
}
saver_list->value(sel);
}
timeout_val = new Fl_Spinner(275, 226, 45, 25, _("Timeout:"));
timeout_val->tooltip(_("Idle time in minutes after screensaver is started"));
timeout_val->range(1, 500);
if(sp)
timeout_val->value(sp->timeout);
else
timeout_val->value(1);
g1->end();
Fl_Group* g2 = new Fl_Group(10, 290, 320, 110, _("Power management"));
g2->box(FL_ENGRAVED_BOX);
g2->align(FL_ALIGN_TOP_LEFT);
g2->begin();
Fl_Check_Button* denabled = new Fl_Check_Button(20, 299, 180, 26, _("Enabled"));
denabled->down_box(FL_DOWN_BOX);
denabled->tooltip(_("Enable or disable Display Power Management Signaling support"));
if(sp) {
denabled->callback((Fl_Callback*)dpms_enable_cb, sp);
denabled->value(sp->dpms_enabled);
} else {
denabled->value(1);
}
Fl_Box* energy_image = new Fl_Box(20, 341, 75, 49);
energy_image->image(image_energy);
standby_val = new Fl_Spinner(275, 301, 45, 24, _("Standby:"));
standby_val->tooltip(_("Minutes for standby"));
//.........这里部分代码省略.........
示例5: _editor
//.........这里部分代码省略.........
if(lcall>0)
tmp[i].user_data_=&(*keepUserdat)[cidx++];
}
lua_pop(Lconf,1);
}
lua_pop(Lconf,1);
}
lua_pop(Lconf,1);
menu->copy(tmp.data());
}
tile_placer_tile_offset_y=default_tile_placer_tile_offset_y;
true_color_box_x=default_true_color_box_x;
true_color_box_y=default_true_color_box_y;
tile_edit_truecolor_off_x=default_tile_edit_truecolor_off_x;
tile_edit_truecolor_off_y=default_tile_edit_truecolor_off_y;
std::fill(tabsHidden,&tabsHidden[shareAmtPj],false);
{
the_tabs = new Fl_Tabs(0, 24, 800, 576);
the_tabs->callback(set_mode_tabs);
int rx,ry,rw,rh;
the_tabs->client_area(rx,ry,rw,rh);
{
tabsMain.emplace_back(new Fl_Group(rx, ry, rw, rh, "Palette editor"));
//stuff related to this group should go here
palBar.addTab(0,true);
pal_size = new Fl_Hor_Value_Slider(128,384,320,24,"Palette box size");
pal_size->minimum(1);
pal_size->maximum(42);
pal_size->step(1);
pal_size->value(32);
pal_size->align(FL_ALIGN_LEFT);
pal_size->callback(redrawOnlyCB);
ditherPower = new Fl_Hor_Value_Slider(128,416,320,24,"Dither Power");
ditherPower->tooltip("A lower value results in more dithering artifacts a higher value results in less artifacts");
ditherPower->minimum(1);
ditherPower->maximum(256);
ditherPower->step(1);
ditherPower->value(16);
ditherPower->align(FL_ALIGN_LEFT);
ditherPower->callback(setSubditherSetting);
gameSysSel=new Fl_Choice(96, 312, 192, 24);
gameSysSel->copy(gameSysMenuSel);
ditherAlgSel=new Fl_Choice(64, 464, 144, 24);
ditherAlgSel->copy(ditherChoices);
subSysC=new Fl_Choice(208, 464, 128, 24);
subSysC->copy(subSysGenesis);
subSysC->value(0);
{ Fl_Group *o = new Fl_Group(306, 188, 88, 96);
{
palType[0] = new Fl_Round_Button(306, 188, 64, 32, "Free");
palType[0]->type(FL_RADIO_BUTTON);
palType[0]->set();
palType[0]->callback((Fl_Callback*) setPalType,(void *)0);
palType[0]->tooltip(freeDes);
palType[1] = new Fl_Round_Button(306, 220, 72, 32, "Locked");
palType[1]->type(FL_RADIO_BUTTON);
palType[1]->callback((Fl_Callback*) setPalType,(void *)1);
palType[1]->tooltip(lockedDes);
palType[2] = new Fl_Round_Button(306, 252, 88, 32, "Reserved");
palType[2]->type(FL_RADIO_BUTTON);
palType[2]->callback((Fl_Callback*) setPalType,(void *)2);
palType[2]->tooltip(reservedDes);
o->end();
} // End of buttons
}//end of group
示例6: 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();
}