29 m_popup.Connect(
"Activated(int)",
"dd4hep::PopupMenu",
this,
"HandleMenu(int)");
30 InstanceCount::increment(
this);
34 PopupMenu::~PopupMenu() {
35 m_popup.Disconnect(
"Activated(int)",
this,
"HandleMenu(int)");
55 void PopupMenu::AddPopup(
const char* s, TGPopupMenu* popup, TGMenuEntry* before,
const TGPicture* p) {
56 m_popup.AddPopup(s,popup,before,p);
68 Callbacks::const_iterator i =
m_calls.find(
id);
70 TGMenuEntry* e =
m_popup.GetEntry(
id);
71 void* ud = e->GetUserData();
72 const void* args[2] = {&e, ud};
73 printout(INFO,
"PopupMenu",
"+++ HandleMenu: executing callback with ID=%d Arg=%p [%p]",
id,ud,&ud);
74 (*i).second.execute(args);
77 printout(INFO,
"PopupMenu",
"+++ HandleMenu: unhandled callback with ID=%d",
id);
92 return m_popup.IsEntryChecked(
id);