本文整理汇总了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;
}
示例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;
}