void RightDown(Point, dword) { CallbackArgTarget<int> result; MenuBar menu; for(int i = 0; i < 10; i++) menu.Add(AsString(i), result[i]); menu.Separator(); menu.Add("Exit", THISBACK(Exit)); menu.Execute(); if(!IsNull(result)) PromptOK("You have selected " + AsString((int)result)); }
void DockCont::TabContext(int ix) { MenuBar bar; DockContMenu menu(base); DockMenu tabmenu(base); Value v = tabbar.Get(ix); if (IsDockCont(v)) menu.ContainerMenu(bar, ContCast(v), false); else tabmenu.WindowMenuNoClose(bar, DockCast(v)); bar.Separator(); tabbar.ContextMenu(bar); bar.Execute(); }