本文整理汇总了C++中Fl_Pack::child方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Pack::child方法的具体用法?C++ Fl_Pack::child怎么用?C++ Fl_Pack::child使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Pack
的用法示例。
在下文中一共展示了Fl_Pack::child方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RemoveCallback
void FolderWindow::RemoveCallback(Fl_Widget* widget, void* userData)
{
FolderWindow* fwindow = (FolderWindow*)(widget->parent()->parent()->parent()->parent());
Fl_Pack* pack = fwindow->folderPack;
for(int i = 0; i < pack->children(); ++i)
{
Fl_Group* tempGroup = (Fl_Group*)pack->child(i);
Fl_Button* childButton = (Fl_Button*)tempGroup->child(1); // <--- here
if (childButton == widget)
{
RNAStructViz* appInstance = RNAStructViz::GetInstance();
const std::vector<DiagramWindow*>& diagrams = appInstance->GetDiagramWindows();
for (unsigned int ui = 0; ui < diagrams.size(); ++ui)
{
if(diagrams[ui]->GetFolderIndex() == fwindow->m_folderIndex)
{
diagrams[ui]->RemoveStructure((intptr_t)userData);
break;
}
}
const std::vector<StatsWindow*>& stats = appInstance->GetStatsWindows();
for (unsigned int ui = 0; ui < stats.size(); ++ui)
{
if(stats[ui]->GetFolderIndex() == fwindow->m_folderIndex)
{
stats[ui]->RemoveStructure((intptr_t)userData);
break;
}
}
Fl_Group* toRemove = (Fl_Group*)pack->child(i); // <--- here
pack->remove(toRemove);
fwindow->folderScroll->redraw();
Fl::delete_widget(toRemove);
appInstance->GetStructureManager()->RemoveStructure((intptr_t)userData);
appInstance->GetStructureManager()->DecreaseStructCount(fwindow->m_folderIndex);
break;
}
}
}