本文整理汇总了C++中Fl_Double_Window::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Double_Window::hide方法的具体用法?C++ Fl_Double_Window::hide怎么用?C++ Fl_Double_Window::hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Double_Window
的用法示例。
在下文中一共展示了Fl_Double_Window::hide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadPlugins
//.........这里部分代码省略.........
else Fullpath = pluginPath + *"/" + *i;
ID = PluginManager::Get()->LoadPlugin (Fullpath.c_str());
if (ID!=PluginError) {
#ifdef DEBUG_PLUGINS
cerr << ID << " = Plugin [" << *i << "]" << endl;
#endif
Fl_ToolButton *NewButton = new Fl_ToolButton (0, 0, Width, Height, "");
// we can't set user data, because the callback uses it
// NewButton->user_data ((void*)(this));
NewButton->labelsize (1);
Fl_Pixmap *tPix = new Fl_Pixmap (PluginManager::Get()->GetPlugin(ID)->GetIcon());
NewButton->image(tPix->copy(tPix->w(),tPix->h()));
delete tPix;
const char * gName = PluginManager::Get()->GetPlugin(ID)->GetGroupName();
string GroupName(gName);
Fl_Pack* the_group=NULL;
// find or create this group, and add an icon
map<string,Fl_Pack*>::iterator gi = m_PluginGroupMap.find (GroupName);
if (gi == m_PluginGroupMap.end()) {
the_group = new Fl_Pack (m_GroupTab->x(), 16, m_GroupTab->w(), m_GroupTab->h() - 15, gName);
the_group->type(FL_HORIZONTAL);
the_group->labelsize(8);
the_group->color(SpiralInfo::GUICOL_Button);
the_group->user_data((void*)(this));
//m_GroupTab->add(the_group);
m_GroupTab->value(the_group);
m_PluginGroupMap[GroupName]=the_group;
}
else the_group = gi->second;
NewButton->type (0);
NewButton->box (FL_NO_BOX);
NewButton->down_box (FL_NO_BOX);
//NewButton->color(SpiralInfo::GUICOL_Button);
//NewButton->selection_color(SpiralInfo::GUICOL_Button);
the_group->add (NewButton);
// we need to keep tooltips stored outside their widgets - widgets just have a pointer
// I haven't done anything about cleaning up these strings - which may cause memory leaks?
// But m_DeviceVec - which, I assume, would be used to keep track of / clean up the dynamicly
// created NewButton widgets isn't cleaned up either, so we might have 2 memory leaks
// involved? - but then again, they might be automatically deallocated because they're
// in another widget, in which case there's just one memory leak to deal with. (andy)
string* PluginName = new string (*i);
// find the first slash, if there is one, and get rid of everything before and including it
unsigned int p = PluginName->find ('/');
if (p < PluginName->length()) PluginName->erase (0, p);
// find last . and get rid of everything after and including it
p = PluginName->rfind ('.');
unsigned int l = PluginName->length ();
if (p < l) PluginName->erase (p, l);
NewButton->tooltip (PluginName->c_str());
// Slashes have significance to the menu widgets, remove them from the GroupName
while ((p = GroupName.find ('/')) < PluginName->length())
GroupName = GroupName.replace (p, 1, " and ");
string MenuEntry = "Plugins/" + GroupName + "/" + *PluginName;
m_MainMenu->add (MenuEntry.c_str(), 0, cb_NewDeviceFromMenu, &Numbers[ID], 0);
// when help is working better - this will put the plugins into the help menu
// MenuEntry = "Help/" + MenuEntry;
// m_MainMenu->add (MenuEntry.c_str(), 0, NULL, &Numbers[ID], 0);
// Add the plugins to the canvas menu
m_Canvas->AddPluginName (MenuEntry, PluginManager::Get()->GetPlugin(ID)->ID);
// this overwrites the widget's user_data with that specified for the callback
// so we can't use it for other purposes
NewButton->callback ((Fl_Callback*)cb_NewDevice, &Numbers[ID]);
NewButton->show();
// Nothing else ever touches m_DeviceVec - is this right??? (andy)
m_DeviceVec.push_back (NewButton);
the_group->redraw();
// m_NextPluginButton++;
Fl::check();
splashtext->label (PluginName->c_str());
Splash->redraw();
}
}
map<string,Fl_Pack*>::iterator PlugGrp;
for (PlugGrp = m_PluginGroupMap.begin(); PlugGrp!= m_PluginGroupMap.end(); ++PlugGrp) {
m_GroupTab->add (PlugGrp->second);
PlugGrp->second->add (new Fl_Box (0, 0, 600, 100, ""));
}
// try to show the SpiralSound group
PlugGrp = m_PluginGroupMap.find("SpiralSound");
// can't find it - show the first plugin group
if (PlugGrp==m_PluginGroupMap.end()) PlugGrp=m_PluginGroupMap.begin();
m_GroupTab->value(PlugGrp->second);
bool found_dummy;
int i;
do {
found_dummy = false;
for (i=0; i<m_MainMenu->size(); i++) {
if (m_MainMenu->text (i) != NULL) {
found_dummy = (strcmp ("dummy", m_MainMenu->text (i)) == 0);
if (found_dummy) break;
}
}
if (found_dummy) m_MainMenu->remove (i);
} while (found_dummy);
Splash->hide();
delete Splash;
}