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


C++ Menu::Include方法代码示例

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


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

示例1: CreatePropsEntry

Control* ExamineTool::CreatePropsEntry (Selection* s, Editor* ed) {
    Control* ctrl = nil;
    Iterator i;

    if (s->Number() > 1) {
        for (s->First(i); !s->Done(i); s->Next(i)) {
            GraphicComp* comp = s->GetView(i)->GetGraphicComp();
            if (comp->IsA(INTERACTOR_COMP)) {
                if (ctrl == nil) {
                    ctrl = new H_PullrightMenu(
                        new Message("Props...", Center, 2, hfil)
                    );
                }
                Menu* m = (Menu*) ctrl;
                PropsCmd* cmd = new PropsCmd(ed, (InteractorComp*) comp);
                m->Include(
                    new CommandItem(GetName(comp, _shift, false), Center, cmd)
                );
            }
        }
    } else {
	s->First(i);
        GraphicComp* comp = s->GetView(i)->GetGraphicComp();
        if (comp->IsA(INTERACTOR_COMP)) {
            ctrl = new CommandItem(
                "Props...", Center, new PropsCmd(ed, (InteractorComp*) comp)
            );
        }
    }
    return ctrl;
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:31,代码来源:ibtools.c

示例2: CreateInfoEntry

Control* ExamineTool::CreateInfoEntry (Selection* s, Editor* ed) {
    Control* ctrl = nil;
    Iterator i;

    if (s->Number() > 1) {
        Menu* m = new H_PullrightMenu(new Message("Info...", Center, 2, hfil));
        ctrl = m;

        for (s->First(i); !s->Done(i); s->Next(i)) {
	    GraphicView* view = (GraphicView*) s->GetView(i);
            GraphicComp* comp = view->GetGraphicComp();
            InfoCmd* cmd = new InfoCmd(ed, view);
            m->Include(
                new CommandItem(GetName(comp, _shift, true), Center, cmd)
            );
        }
    } else {
	s->First(i);
	GraphicView* view = (GraphicView*) s->GetView(i);
        ctrl = new CommandItem("Info...", Center, new InfoCmd(ed, view));
    }
    return ctrl;
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:23,代码来源:ibtools.c


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