当前位置: 首页>>代码示例>>C++>>正文


C++ KnobChoicePtr::setSeparators方法代码示例

本文整理汇总了C++中KnobChoicePtr::setSeparators方法的典型用法代码示例。如果您正苦于以下问题:C++ KnobChoicePtr::setSeparators方法的具体用法?C++ KnobChoicePtr::setSeparators怎么用?C++ KnobChoicePtr::setSeparators使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KnobChoicePtr的用法示例。


在下文中一共展示了KnobChoicePtr::setSeparators方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

void
ViewerNodeOverlay::showRightClickMenu()
{
    KnobChoicePtr menu = _imp->rightClickMenu.lock();
    std::vector<ChoiceOption> entries, showHideEntries;

    std::vector<KnobButtonPtr> entriesButtons;
    entriesButtons.push_back(_imp->rightClickToggleWipe.lock());
    entriesButtons.push_back(_imp->rightClickCenterWipe.lock());
    entriesButtons.push_back(_imp->centerViewerButtonKnob.lock());
    entriesButtons.push_back(_imp->zoomScaleOneAction.lock());
    entriesButtons.push_back(_imp->zoomInAction.lock());
    entriesButtons.push_back(_imp->zoomOutAction.lock());
    entriesButtons.push_back(_imp->rightClickPreviousLayer.lock());
    entriesButtons.push_back(_imp->rightClickNextLayer.lock());
    entriesButtons.push_back(_imp->rightClickPreviousView.lock());
    entriesButtons.push_back(_imp->rightClickNextView.lock());
    entriesButtons.push_back(_imp->rightClickSwitchAB.lock());
    entriesButtons.push_back(_imp->rightClickShowHideOverlays.lock());
    entriesButtons.push_back(_imp->enableStatsAction.lock());

    for (std::size_t i = 0; i < entriesButtons.size(); ++i) {
        entries.push_back(ChoiceOption(entriesButtons[i]->getName(), "", ""));
    }

    entries.push_back(ChoiceOption(kViewerNodeParamRightClickMenuShowHideSubMenu, "", ""));


    KnobChoicePtr showHideMenu = _imp->rightClickShowHideSubMenu.lock();
    showHideEntries.push_back(ChoiceOption(kViewerNodeParamRightClickMenuHideAll, "", ""));
    showHideEntries.push_back(ChoiceOption(kViewerNodeParamRightClickMenuHideAllTop, "", ""));
    showHideEntries.push_back(ChoiceOption(kViewerNodeParamRightClickMenuHideAllBottom, "", ""));
    showHideEntries.push_back(ChoiceOption(kViewerNodeParamRightClickMenuShowHideTopToolbar, "", ""));
    showHideEntries.push_back(ChoiceOption(kViewerNodeParamRightClickMenuShowHideLeftToolbar, "", ""));
    showHideEntries.push_back(ChoiceOption(kViewerNodeParamRightClickMenuShowHidePlayer, "", ""));
    showHideEntries.push_back(ChoiceOption(kViewerNodeParamRightClickMenuShowHideTimeline, "", ""));
    showHideEntries.push_back(ChoiceOption(kViewerNodeParamRightClickMenuShowHideTabHeader, "", ""));
    showHideEntries.push_back(ChoiceOption(kViewerNodeParamEnableColorPicker, "", ""));

    {
        std::vector<int> separators;
        separators.push_back(2);
        showHideMenu->setSeparators(separators);
    }

    showHideMenu->populateChoices(showHideEntries);
    menu->populateChoices(entries);
    
}
开发者ID:kcotugno,项目名称:Natron,代码行数:49,代码来源:ViewerNodeOverlays.cpp


注:本文中的KnobChoicePtr::setSeparators方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。