20 #include "TClassMenuItem.h"
27 using namespace DD4hep;
39 : m_call(cb), m_param(par)
44 ContextMenuHandler::~ContextMenuHandler() {
48 void ContextMenuHandler::Context(
TObject* target) {
49 const void *args[] = {target,m_param,0};
59 throw runtime_error(
"Failure: Cannot create context menu for NULL class!");
64 ContextMenu::~ContextMenu() {
78 if ( m_class->GetMenuList() ) {
79 m_class->GetMenuList()->Delete();
86 TClassMenuItem* item =
87 new TClassMenuItem(TClassMenuItem::kPopupSeparator,ContextMenuHandler::Class(),
"seperator");
88 m_class->GetMenuList()->AddFirst(item);
95 TClassMenuItem* item =
96 new TClassMenuItem(TClassMenuItem::kPopupUserFunction,
97 ContextMenuHandler::Class(),title.c_str(),
98 "Context",handler,
"TObject*",2);
99 m_calls.push_back(handler);
100 m_class->GetMenuList()->AddLast(item);
Definition of the generic callback structure for member functions.
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.