本文整理汇总了C++中SelectionList::insert方法的典型用法代码示例。如果您正苦于以下问题:C++ SelectionList::insert方法的具体用法?C++ SelectionList::insert怎么用?C++ SelectionList::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SelectionList
的用法示例。
在下文中一共展示了SelectionList::insert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dialog
void
AnimationFrame::OnCmd_FollowMarcher(wxCommandEvent& event)
{
wxTextEntryDialog dialog(this,
wxT("Please enter a marcher to follow (or -1 to stop following)\n"),
wxT("Follow Marcher"),
wxT(""),
wxOK | wxCANCEL);
if (dialog.ShowModal() == wxID_OK)
{
wxString value = dialog.GetValue();
auto& labels = mAnimationView->GetShow()->GetPointLabels();
auto which = std::find(labels.begin(), labels.end(), value);
if (which == labels.end())
{
wxString upper_value = value.Upper();
which = std::find(labels.begin(), labels.end(), upper_value);
}
if (which == labels.end())
{
wxMessageDialog dialog(this, wxT("Could not find marcher"), wxT("Could not find marcher ") + value, wxOK);
dialog.ShowModal();
return;
}
if (mOmniViewCanvas)
{
mOmniViewCanvas->OnCmd_FollowMarcher(std::distance(labels.begin(), which));
}
SelectionList sl;
sl.insert(std::distance(labels.begin(), which));
mAnimationView->SetSelection(sl);
}
Refresh();
}