本文整理汇总了C++中Fl_Group::tooltip方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Group::tooltip方法的具体用法?C++ Fl_Group::tooltip怎么用?C++ Fl_Group::tooltip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Group
的用法示例。
在下文中一共展示了Fl_Group::tooltip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
o->textfont(FL_HELVETICA);
o->textsize(FL_NORMAL_SIZE - 1);
o->box(FL_FLAT_BOX);
std::string s;
s += "<h3>Keyboard Shortcuts</h3>";
s += "<table border=1>";
{
std::vector<std::pair<std::string, std::string> > s0 = GetShortcutsUsage();
for(unsigned int i = 0; i < s0.size(); i++)
s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>";
}
s += "</table>";
s += "<h3>Mouse Actions</h3>";
s += "<table border=1>";
{
std::vector<std::pair<std::string, std::string> > s0 = GetMouseUsage();
for(unsigned int i = 0; i < s0.size(); i++)
s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>";
}
s += "</table>";
s += "For a 2 button mouse, Middle button = Shift+Left button.<p>";
s += "For a 1 button mouse, Middle button = Shift+Left button, "
"Right button = Alt+Left button.";
s += "<h3>Command Line Switches</h3>";
s += "<table border=1>";
{
std::vector<std::pair<std::string, std::string> > s0 = GetUsage();
for(unsigned int i = 0; i < s0.size(); i++)
if(s0[i].first.size() && s0[i].second.size())
s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>";
else if(s0[i].first.size() && s0[i].second.empty())
s += "</table>" + s0[i].first + "<table border=1>";
}
s += "</table>";
o->value(s.c_str());
basic->resizable(o);
basic->position(Fl::x() + Fl::w()/2 - width / 2,
Fl::y() + Fl::h()/2 - height / 2);
basic->end();
}
{
int width = 40 * FL_NORMAL_SIZE;
int height = 18 * BH;
options = new paletteWindow
(width, height, CTX::instance()->nonModalWindows ? true : false,
"Current Options and Workspace");
options->box(GMSH_WINDOW_BOX);
int BW = (width - 4 * WB) / 3;
modified = new Fl_Check_Button
(WB, WB, BW, BH, "Only show modified");
modified->type(FL_TOGGLE_BUTTON);
modified->callback(help_options_cb);
modified->tooltip("Show only values different from defaults");
showhelp = new Fl_Check_Button
(2 * WB + BW, WB, BW, BH, "Show help");
showhelp->type(FL_TOGGLE_BUTTON);
showhelp->callback(help_options_cb);
showhelp->tooltip("Show help strings");
Fl_Group* o = new Fl_Group(3 * WB + 2 * BW, WB, BW, BH);
o->tooltip("Filter values");
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
search = new Fl_Input
(3 * WB + 2 * BW + BH, WB + 2, BW - BH - 2, BH - 4, "@gmsh_search");
search->box(FL_FLAT_BOX);
search->callback(help_options_cb);
search->when(FL_WHEN_CHANGED);
//search->take_focus(); cannot call this here - it triggers show() on Linux in fltk 1.3.3
o->resizable(search);
o->end();
browser = new Fl_Browser(0, BH + 2 * WB, width, height - BH - 2 * WB);
browser->box(GMSH_SIMPLE_TOP_BOX);
browser->textfont(FL_SCREEN);
browser->textsize(FL_NORMAL_SIZE - 2);
browser->type(FL_MULTI_BROWSER);
browser->callback(browser_cb);
browser->tooltip("Double-click to edit value");
browser->scrollbar_size(std::max(10, FL_NORMAL_SIZE - 2)); // thinner scrollbars
options->resizable(browser);
options->position(Fl::x() + Fl::w()/2 - width / 2,
Fl::y() + Fl::h()/2 - height / 2);
options->size_range(width, height);
options->end();
}
}