Logo ROOT  
Reference Guide
TRootContextMenu.cxx
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 12/02/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TRootContextMenu //
15 // //
16 // This class provides an interface to context sensitive popup menus. //
17 // These menus pop up when the user hits the right mouse button, and //
18 // are destroyed when the menu pops downs. //
19 // The picture below shows a canvas with a pop-up menu. //
20 // //
21 //Begin_Html <img src="gif/hsumMenu.gif"> End_Html //
22 // //
23 // The picture below shows a canvas with a pop-up menu and a dialog box.//
24 // //
25 //Begin_Html <img src="gif/hsumDialog.gif"> End_Html //
26 // //
27 //////////////////////////////////////////////////////////////////////////
28 
29 #include "TRootContextMenu.h"
30 #include "TROOT.h"
31 #include "TGClient.h"
32 #include "TEnv.h"
33 #include "TList.h"
34 #include "TObjArray.h"
35 #include "TContextMenu.h"
36 #include "TMethod.h"
37 #include "TMethodArg.h"
38 #include "TMethodCall.h"
39 #include "TClass.h"
40 #include "TVirtualX.h"
41 #include "TCanvas.h"
42 #include "TDataMember.h"
43 #include "TToggle.h"
44 #include "TRootDialog.h"
45 #include "TDataType.h"
46 #include "TBrowser.h"
47 #include "TRootCanvas.h"
48 #include "TRootBrowser.h"
49 #include "TClassMenuItem.h"
50 #include "TObjectSpy.h"
51 #include "KeySymbols.h"
52 #include "RConfigure.h"
53 #include "strlcpy.h"
54 #include "snprintf.h"
55 
57  kToggleStart = 1000, // first id of toggle menu items
58  kToggleListStart = 2000, // first id of toggle list menu items
59  kUserFunctionStart = 3000 // first id of user added functions/methods, etc...
60 };
61 
62 
64 
65 ////////////////////////////////////////////////////////////////////////////////
66 /// Create context menu.
67 
69  : TGPopupMenu(gClient->GetDefaultRoot()), TContextMenuImp(c)
70 {
71  fDialog = 0;
72  fTrash = new TList;
73 
75  gROOT->GetListOfCleanups()->Add(this);
76  // Context menu handles its own messages
77  Associate(this);
78 }
79 
80 ////////////////////////////////////////////////////////////////////////////////
81 /// Delete a context menu.
82 
84 {
85  gROOT->GetListOfCleanups()->Remove(this);
86  delete fDialog;
87  if (fTrash) fTrash->Delete();
88  delete fTrash;
89 }
90 
91 ////////////////////////////////////////////////////////////////////////////////
92 /// Display context popup menu for currently selected object.
93 
95 {
96  if (fClient->IsEditable()) return;
97 
98  // delete menu items releated to previous object and reset menu size
100  fCurrent = 0;
101  if (fTrash) fTrash->Delete();
102  fMenuHeight = 6;
103  fMenuWidth = 8;
104 
105  // delete previous dialog
106  if (fDialog) {
107  delete fDialog;
108  fDialog = 0;
109  }
110 
111  // add menu items to popup menu
113 
114  int xx, yy, topx = 0, topy = 0;
115  UInt_t w, h;
116 
119  topx, topy, w, h);
120 
121  xx = topx + x + 1;
122  yy = topy + y + 1;
123 
124 #ifdef R__HAS_COCOA
125  //Context menu must be transient for a canvas, otherwise it's possible
126  //to break the z-order (for example, using alt-tab to switch between
127  //different aplications). This hint works ONLY for canvas though
128  //(otherwise selected canvas is null).
129  TGWindow *parent = 0;
131  parent = dynamic_cast<TGWindow *>(pad->GetCanvasImp());
132  else if ((pad = fContextMenu->GetSelectedPad()) && pad->GetCanvasImp())
133  parent = dynamic_cast<TGWindow *>(pad->GetCanvasImp());
134  else if (TBrowser * const browser = fContextMenu->GetBrowser())
135  parent = dynamic_cast<TGWindow *>(browser->GetBrowserImp());
136 
137  if (parent)
138  gVirtualX->SetWMTransientHint(GetId(), parent->GetId());
139 #endif
140 
141  PlaceMenu(xx, yy, kTRUE, kTRUE);
142  // add some space for the right-side '?' (help)
143  fMenuWidth += 5;
145 }
146 
147 ////////////////////////////////////////////////////////////////////////////////
148 /// Decodes the Hierarchy="Level0/Level1/Level2/..." statement from the comment field
149 /// and returns the - if needed - created sub menu "Level0/Level1"
150 /// Returns the last component in last_component.
151 
152 TGPopupMenu * TRootContextMenu::FindHierarchy(const char *commentstring, TString & last_component)
153 {
154  TString cmd(commentstring);
155  TString option;
156  TString hierarchy;
157  TGPopupMenu *currentMenu = 0;
158 
159  // search for arguments to the MENU statement
160  // strcpy(cmd,commentstring);
161  Ssiz_t opt_ptr;
162  if ((opt_ptr=cmd.Index("*MENU={")) != kNPOS ||
163  (opt_ptr=cmd.Index("*SUBMENU={"))!= kNPOS ||
164  (opt_ptr=cmd.Index("*TOGGLE={")) != kNPOS ) {
165 
166  Ssiz_t start = cmd.Index("{",opt_ptr) + 1;
167  Ssiz_t end = cmd.Index("}",start);
168  option = cmd(start,end - start);
169 
170  // Look for Hierarchy token
171  TObjArray * array = option.Tokenize(";");
172  TIter iter(array);
173  TObject *obj;
174  while((obj = iter())) {
175  TString token(obj->GetName());
176  if (token.Index("Hierarchy=\"") != kNPOS) {
177  Ssiz_t tstart = token.Index("\"") + 1;
178  Ssiz_t tend = token.Index("\"",tstart+1);
179  if (tend == kNPOS) continue;
180  hierarchy = token(tstart,tend - tstart);
181  }
182  }
183  delete array;
184  }
185 
186  // Build Hierarchy
187  currentMenu = this;
188  TObjArray * array = hierarchy.Tokenize("/");
189  TIter iter(array);
190  TObject *obj = iter();
191  while(obj) {
192  last_component = obj->GetName();
193  obj = iter();
194  if (obj) {
195  TGMenuEntry *ptr;
196  TIter next(currentMenu->GetListOfEntries());
197  // Search for popup with corresponding name
198  while ((ptr = (TGMenuEntry *) next()) &&
199  (ptr->GetType() != kMenuPopup ||
200  last_component.CompareTo(ptr->GetName()))) { }
201  if (ptr)
202  currentMenu = ptr->GetPopup();
203  else {
204  TGPopupMenu *r = new TGPopupMenu(gClient->GetDefaultRoot());
205  // Alphabetical ordering
206  TGMenuEntry *ptr2;
207  TIter next2(currentMenu->GetListOfEntries());
208  // Search for popup with corresponding name
209  while ((ptr2 = (TGMenuEntry *) next2()) &&
210  (ptr2->GetType() != kMenuPopup ||
211  last_component.CompareTo(ptr2->GetName()) > 0 )) { }
212 
213  currentMenu->AddPopup(last_component, r,ptr2);
214  currentMenu = r;
215  fTrash->Add(r);
216  last_component = obj->GetName();
217  }
218  }
219  }
220 
221  delete array;
222  return currentMenu;
223 }
224 
225 ////////////////////////////////////////////////////////////////////////////////
226 /// Add a entry to current menu with alphabetical ordering.
227 
228 void TRootContextMenu::AddEntrySorted(TGPopupMenu *currentMenu, const char *s, Int_t id, void *ud,
229  const TGPicture *p , Bool_t sorted)
230 {
231  TGMenuEntry *ptr2 = 0;
232  if (sorted) {
233  TIter next(currentMenu->GetListOfEntries());
234  // Search for popup with corresponding name
235  while ((ptr2 = (TGMenuEntry *) next()) &&
236  (ptr2->GetType() != kMenuEntry ||
237  strcmp(ptr2->GetName(), s)<0 )) { }
238  }
239  currentMenu->AddEntry(s,id,ud,p,ptr2);
240 }
241 
242 ////////////////////////////////////////////////////////////////////////////////
243 /// Create the context menu depending on the selected object.
244 
246 {
247  if (!object || fClient->IsEditable()) return;
248 
249  int entry = 0, toggle = kToggleStart, togglelist = kToggleListStart;
250  int userfunction = kUserFunctionStart;
251 
252  // Add a title
254  AddSeparator();
255 
256  // Get list of menu items from the selected object's class
257  TList *menuItemList = object->IsA()->GetMenuList();
258 
259  TClassMenuItem *menuItem;
260  TIter nextItem(menuItemList);
261 
262  while ((menuItem = (TClassMenuItem*) nextItem())) {
263  switch (menuItem->GetType()) {
265  {
267  if (last && last->GetType() != kMenuSeparator)
268  AddSeparator();
269  break;
270  }
272  {
273  // Standard list of class methods. Rebuild from scratch.
274  // Get linked list of objects menu items (i.e. member functions
275  // with the token *MENU in their comment fields.
276  TList *methodList = new TList;
277  object->IsA()->GetMenuItems(methodList);
278 
279  TMethod *method;
280  TClass *classPtr = 0;
281  TIter next(methodList);
282  Bool_t needSep = kFALSE;
283 
284  while ((method = (TMethod*) next())) {
285  if (classPtr != method->GetClass()) {
286  needSep = kTRUE;
287  classPtr = method->GetClass();
288  }
289 
290  TDataMember *m;
291  EMenuItemKind menuKind = method->IsMenuItem();
292  TGPopupMenu *currentMenu = 0;
293  TString last_component;
294 
295  switch (menuKind) {
296  case kMenuDialog:
297  // search for arguments to the MENU statement
298  currentMenu = FindHierarchy(method->GetCommentString(),last_component);
299  if (needSep && currentMenu == this) {
300  AddSeparator();
301  needSep = kFALSE;
302  }
303  AddEntrySorted(currentMenu,last_component.Length() ? last_component.Data() : method->GetName(), entry++, method,0,currentMenu != this);
304  break;
305  case kMenuSubMenu:
306  if ((m = method->FindDataMember())) {
307 
308  // search for arguments to the MENU statement
309  currentMenu = FindHierarchy(method->GetCommentString(),last_component);
310 
311  if (m->GetterMethod()) {
312  TGPopupMenu *r = new TGPopupMenu(gClient->GetDefaultRoot());
313  if (needSep && currentMenu == this) {
314  AddSeparator();
315  needSep = kFALSE;
316  }
317  if (last_component.Length()) {
318  currentMenu->AddPopup(last_component, r);
319  } else {
320  currentMenu->AddPopup(method->GetName(), r);
321  }
322  fTrash->Add(r);
323  TIter nxt(m->GetOptions());
324  TOptionListItem *it;
325  while ((it = (TOptionListItem*) nxt())) {
326  const char *name = it->fOptName;
327  Long_t val = it->fValue;
328 
329  TToggle *t = new TToggle;
330  t->SetToggledObject(object, method);
331  t->SetOnValue(val);
332  fTrash->Add(t);
333 
334  r->AddEntry(name, togglelist++, t);
335  if (t->GetState())
336  r->CheckEntry(togglelist-1);
337  }
338  } else {
339  if (needSep && currentMenu == this) {
340  AddSeparator();
341  needSep = kFALSE;
342  }
343  AddEntrySorted(currentMenu,last_component.Length() ? last_component.Data() : method->GetName(), entry++, method,0,currentMenu != this);
344  }
345  }
346  break;
347 
348  case kMenuToggle:
349  {
350  TToggle *t = new TToggle;
351  t->SetToggledObject(object, method);
352  t->SetOnValue(1);
353  fTrash->Add(t);
354  // search for arguments to the MENU statement
355  currentMenu = FindHierarchy(method->GetCommentString(),last_component);
356  if (needSep && currentMenu == this) {
357  AddSeparator();
358  needSep = kFALSE;
359  }
360  AddEntrySorted(currentMenu,last_component.Length() ? last_component.Data() : method->GetName(), toggle++, t,0,currentMenu != this);
361  if (t->GetState()) currentMenu->CheckEntry(toggle-1);
362  }
363  break;
364 
365  default:
366  break;
367  }
368  }
369  delete methodList;
370  }
371  break;
373  {
374  const char* menuItemTitle = menuItem->GetTitle();
375  if (menuItem->IsToggle()) {
376  TMethod* method =
377  object->IsA()->GetMethodWithPrototype(menuItem->GetFunctionName(),menuItem->GetArgs());
378  if (method) {
379  TToggle *t = new TToggle;
380  t->SetToggledObject(object, method);
381  t->SetOnValue(1);
382  fTrash->Add(t);
383 
384  if (strlen(menuItemTitle)==0) menuItemTitle = method->GetName();
385  AddEntry(menuItemTitle, toggle++, t);
386  if (t->GetState()) CheckEntry(toggle-1);
387  }
388  } else {
389  if (strlen(menuItemTitle)==0) menuItemTitle = menuItem->GetFunctionName();
390  AddEntry(menuItemTitle,userfunction++,menuItem);
391  }
392  }
393  break;
394  default:
395  break;
396  }
397  }
398 }
399 
400 ////////////////////////////////////////////////////////////////////////////////
401 /// Create dialog object with OK and Cancel buttons. This dialog
402 /// prompts for the arguments of "method".
403 
405 {
406  Dialog(object,(TFunction*)method);
407 }
408 
409 ////////////////////////////////////////////////////////////////////////////////
410 /// Create dialog object with OK and Cancel buttons. This dialog
411 /// prompts for the arguments of "function".
412 /// function may be a global function or a method
413 
415 {
416  Int_t selfobjpos;
417 
418  if (!function) return;
419 
420  // Position, if it exists, of the argument that correspond to the object itself
423  else selfobjpos = -1;
424 
425  const TGWindow *w;
428  // Embedded canvas has no canvasimp that is a TGFrame
429  // coverity[returned_null]
430  // coverity[dereference]
431  if (c->GetCanvasImp()->IsA()->InheritsFrom(TGFrame::Class())) {
432  w = fClient->GetWindowById(gVirtualX->GetWindowID(c->GetCanvasID()));
433  if (!w) w = (TRootCanvas *) c->GetCanvasImp();
434  } else {
435  w = gClient->GetDefaultRoot();
436  }
437  } else if (fContextMenu->GetBrowser()) {
439  w = (TRootBrowser *) b->GetBrowserImp();
440  } else {
441  w = gClient->GetDefaultRoot();
442  }
443  fDialog = new TRootDialog(this, w, fContextMenu->CreateDialogTitle(object, function));
444 
445  // iterate through all arguments and create apropriate input-data objects:
446  // inputlines, option menus...
447  TMethodArg *argument = 0;
448 
449  TIter next(function->GetListOfMethodArgs());
450  Int_t argpos = 0;
451 
452  while ((argument = (TMethodArg *) next())) {
453  // Do not input argument for self object
454  if (selfobjpos != argpos) {
455  const char *argname = fContextMenu->CreateArgumentTitle(argument);
456  const char *type = argument->GetTypeName();
457  TDataType *datatype = gROOT->GetType(type);
458  const char *charstar = "char*";
459  char basictype[32];
460 
461  if (datatype) {
462  strlcpy(basictype, datatype->GetTypeName(), 32);
463  } else {
465  if (strncmp(type, "enum", 4) && (cl && !(cl->Property() & kIsEnum)))
466  Warning("Dialog", "data type is not basic type, assuming (int)");
467  strlcpy(basictype, "int", 32);
468  }
469 
470  if (strchr(argname, '*')) {
471  strlcat(basictype, "*",32);
472  if (!strncmp(type, "char", 4) || !strncmp(type, "Option_t", 8))
473  type = charstar;
474  else if (strstr(argname, "[default:")) {
475  // skip arguments that are pointers (but not char *)
476  // and have a default value
477  argpos++;
478  continue;
479  }
480  }
481 
482  TDataMember *m = argument->GetDataMember();
483  if (m && object && m->GetterMethod(object->IsA())) {
484 
485  // Get the current value and form it as a text:
486 
487  char val[256];
488 
489  if (!strncmp(basictype, "char*", 5)) {
490  char *tdefval;
491  m->GetterMethod()->Execute(object, "", &tdefval);
492  strlcpy(val, tdefval, sizeof(val));
493  } else if (!strncmp(basictype, "float", 5) ||
494  !strncmp(basictype, "double", 6)) {
495  Double_t ddefval;
496  m->GetterMethod()->Execute(object, "", ddefval);
497  snprintf(val,256, "%g", ddefval);
498  } else if (!strncmp(basictype, "char", 4) ||
499  !strncmp(basictype, "bool", 4) ||
500  !strncmp(basictype, "int", 3) ||
501  !strncmp(basictype, "long", 4) ||
502  !strncmp(basictype, "short", 5)) {
503  Long_t ldefval;
504  m->GetterMethod()->Execute(object, "", ldefval);
505  snprintf(val,256, "%li", ldefval);
506  }
507 
508  // Find out whether we have options ...
509 
510  TList *opt;
511  // coverity[returned_pointer]: keep for later use
512  if ((opt = m->GetOptions())) {
513  Warning("Dialog", "option menu not yet implemented");
514 #if 0
515  TMotifOptionMenu *o= new TMotifOptionMenu(argname);
516  TIter nextopt(opt);
517  TOptionListItem *it = 0;
518  while ((it = (TOptionListItem*) nextopt())) {
519  char *name = it->fOptName;
520  char *label = it->fOptLabel;
521  Long_t value = it->fValue;
522  if (value != -9999) {
523  char val[256];
524  snprintf(val,256, "%li", value);
525  o->AddItem(name, val);
526  }else
527  o->AddItem(name, label);
528  }
529  o->SetData(val);
530  fDialog->Add(o);
531 #endif
532  } else {
533  // we haven't got options - textfield ...
534  fDialog->Add(argname, val, type);
535  }
536  } else { // if m not found ...
537 
538  char val[256] = "";
539  const char *tval = argument->GetDefault();
540  if (tval && strlen(tval)) {
541  // Remove leading and trailing quotes
542  strlcpy(val, tval + (tval[0] == '"' ? 1 : 0), sizeof(val));
543  if (val[strlen(val)-1] == '"')
544  val[strlen(val)-1]= 0;
545  }
546  fDialog->Add(argname, val, type);
547  }
548  }
549  argpos++;
550  }
551 
552  fDialog->Popup();
553 }
554 
555 ////////////////////////////////////////////////////////////////////////////////
556 /// Draw context menu entry.
557 
559 {
560  int ty, offset;
561  static int max_ascent = 0, max_descent = 0;
562 
563  TGPopupMenu::DrawEntry(entry);
564  // draw the ? (help) in the right side when highlighting a menu entry
565  if (entry->GetType() == kMenuEntry && (entry->GetStatus() & kMenuActiveMask)) {
566  if (max_ascent == 0) {
567  gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
568  }
569  offset = (entry->GetEh() - (max_ascent + max_descent)) / 2;
570  ty = entry->GetEy() + max_ascent + offset - 1;
571  TGHotString s("&?");
572  s.Draw(fId, fSelGC, fMenuWidth-12, ty);
573  }
574 }
575 
576 ////////////////////////////////////////////////////////////////////////////////
577 /// Handle button event in the context menu.
578 
580 {
581  int id;
582  void *ud = 0;
583 
584  if ((event->fType == kButtonRelease) && (event->fX >= (Int_t)(fMenuWidth-15)) &&
585  (event->fX <= (Int_t)fMenuWidth)) {
586  id = EndMenu(ud);
587  if (fHasGrab) gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE); // ungrab
588  if (ud) {
589  // retrieve the highlighted function
590  TFunction *function = 0;
591  if (id < kToggleStart) {
592  TMethod *m = (TMethod *)ud;
593  function = (TFunction *)m;
594  } else if (id >= kToggleStart && id < kUserFunctionStart) {
595  TToggle *t = (TToggle *)ud;
596  TMethodCall *mc = (TMethodCall *)t->GetSetter();
597  function = (TFunction *)mc->GetMethod();
598  } else {
599  TClassMenuItem *mi = (TClassMenuItem *)ud;
600  function = gROOT->GetGlobalFunctionWithPrototype(mi->GetFunctionName());
601  }
602  if (function)
603  fContextMenu->SetMethod(function);
604  }
605  OnlineHelp();
606  return kTRUE;
607  }
608  return TGPopupMenu::HandleButton(event);
609 }
610 
611 ////////////////////////////////////////////////////////////////////////////////
612 /// Handle pointer crossing event in context menu.
613 
615 {
616  if (event->fType == kLeaveNotify) {
617  // just to reset the mouse pointer...
618  HandleMotion(event);
619  }
620  return TGPopupMenu::HandleCrossing(event);
621 }
622 
623 ////////////////////////////////////////////////////////////////////////////////
624 /// Handle pointer motion event in context menu.
625 
627 {
628  static int toggle = 0;
629  static Cursor_t handCur = kNone, rightCur = kNone;
631 
632  if (handCur == kNone)
633  handCur = gVirtualX->CreateCursor(kHand);
634  if (rightCur == kNone)
635  rightCur = gVirtualX->CreateCursor(kArrowRight);
636 
637  if (event->fType == kLeaveNotify) {
638  gVirtualX->ChangeActivePointerGrab(fId, mask, rightCur);
639  toggle = 0;
640  return kTRUE;
641  }
642  // change the cursot to a small hand when over the ? (help)
643  if ((event->fX >= (Int_t)(fMenuWidth-15)) && (event->fX <= (Int_t)fMenuWidth) &&
644  fCurrent && (fCurrent->GetType() == kMenuEntry)) {
645  if (toggle == 0) {
646  gVirtualX->ChangeActivePointerGrab(fId, mask, handCur);
647  toggle = 1;
648  }
649  }
650  else {
651  if (toggle == 1) {
652  gVirtualX->ChangeActivePointerGrab(fId, mask, rightCur);
653  toggle = 0;
654  }
655  }
656  return TGPopupMenu::HandleMotion(event);
657 }
658 
659 ////////////////////////////////////////////////////////////////////////////////
660 /// Open the online help matching the actual class/method.
661 
663 {
664  TString clname;
665  TString cmd;
666  TString url = gEnv->GetValue("Browser.StartUrl", "http://root.cern.ch/root/html/");
667  if (url.EndsWith(".html", TString::kIgnoreCase)) {
668  if (url.Last('/') != kNPOS)
669  url.Remove(url.Last('/'));
670  }
671  if (!url.EndsWith("/")) {
672  url += '/';
673  }
675  if (obj) {
676  clname = obj->ClassName();
679  TMethod *method = obj->IsA()->GetMethodAllAny(smeth.Data());
680  if (method) clname = method->GetClass()->GetName();
681  url += clname;
682  url += ".html";
683  url += "#";
684  url += clname;
685  url += ":";
686  url += smeth.Data();
687  }
688  else {
689  url += clname;
690  url += ".html";
691  }
692  if (fDialog) delete fDialog;
693  fDialog = 0;
694  cmd = TString::Format("new TGHtmlBrowser(\"%s\", 0, 900, 300);", url.Data());
695  gROOT->ProcessLine(cmd.Data());
696  }
697 }
698 
699 ////////////////////////////////////////////////////////////////////////////////
700 /// Handle context menu messages.
701 
703 {
704  TObjectSpy savedPad;
705  if (GetContextMenu()->GetSelectedPad()) {
706  savedPad.SetObject(gPad);
708  }
709 
710  switch (GET_MSG(msg)) {
711 
712  case kC_COMMAND:
713 
714  switch (GET_SUBMSG(msg)) {
715 
716  case kCM_MENU:
717 
718  if (parm1 < kToggleStart) {
719  TMethod *m = (TMethod *) parm2;
720  GetContextMenu()->Action(m);
721  } else if (parm1 >= kToggleStart && parm1 < kToggleListStart) {
722  TToggle *t = (TToggle *) parm2;
723  GetContextMenu()->Action(t);
724  } else if (parm1 >= kToggleListStart && parm1<kUserFunctionStart) {
725  TToggle *t = (TToggle *) parm2;
726  if (t->GetState() == 0)
727  t->SetState(1);
728  } else {
729  TClassMenuItem *mi = (TClassMenuItem*)parm2;
730  GetContextMenu()->Action(mi);
731  }
732  break;
733 
734  case kCM_BUTTON:
735  if (parm1 == 1) {
736  const char *args = fDialog->GetParameters();
737  GetContextMenu()->Execute((char *)args);
738  delete fDialog;
739  fDialog = 0;
740  }
741  if (parm1 == 2) {
742  const char *args = fDialog->GetParameters();
743  GetContextMenu()->Execute((char *)args);
744  }
745  if (parm1 == 3) {
746  delete fDialog;
747  fDialog = 0;
748  }
749  if (parm1 == 4) {
750  OnlineHelp();
751  }
752  break;
753 
754  default:
755  break;
756  }
757  break;
758 
759  case kC_TEXTENTRY:
760 
761  switch (GET_SUBMSG(msg)) {
762 
763  case kTE_ENTER:
764  {
765  const char *args = fDialog->GetParameters();
766  GetContextMenu()->Execute((char *)args);
767  delete fDialog;
768  fDialog = 0;
769  }
770  break;
771 
772  default:
773  break;
774  }
775  break;
776 
777  default:
778  break;
779  }
780 
781  if (savedPad.GetObject()) gPad = (TVirtualPad*) savedPad.GetObject();
782 
783  return kTRUE;
784 }
785 
786 ////////////////////////////////////////////////////////////////////////////////
787 /// Close the context menu if the object is deleted in the
788 /// RecursiveRemove() operation.
789 
791 {
792  void *ud;
793  if (obj == fContextMenu->GetSelectedCanvas())
795  if (obj == fContextMenu->GetSelectedPad())
796  fContextMenu->SetPad(0);
797  if (obj == fContextMenu->GetSelectedObject()) {
798  // if the object being deleted is the one selected,
799  // ungrab the mouse pointer and terminate (close) the menu
801  if (fHasGrab)
802  gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);
803  EndMenu(ud);
804  }
805 }
806 
c
#define c(i)
Definition: RSha256.hxx:119
Event_t::fType
EGEventType fType
Definition: GuiTypes.h:174
TClassMenuItem::GetSelfObjectPos
virtual Int_t GetSelfObjectPos() const
Definition: TClassMenuItem.h:67
TGPopupMenu::PlaceMenu
virtual void PlaceMenu(Int_t x, Int_t y, Bool_t stick_mode, Bool_t grab_pointer)
Popup a popup menu.
Definition: TGMenu.cxx:1240
m
auto * m
Definition: textangle.C:8
TContextMenu::GetSelectedObject
virtual TObject * GetSelectedObject()
Definition: TContextMenu.h:89
TGPopupMenu::TGPopupMenu
TGPopupMenu(const TGPopupMenu &)
TClassMenuItem::GetTitle
virtual const char * GetTitle() const
Returns title of object.
Definition: TClassMenuItem.h:62
TContextMenu::GetSelectedCanvas
virtual TVirtualPad * GetSelectedCanvas()
Definition: TContextMenu.h:87
GET_MSG
Int_t GET_MSG(Long_t val)
Definition: WidgetMessageTypes.h:112
TRootContextMenu::ProcessMessage
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle context menu messages.
Definition: TRootContextMenu.cxx:702
TGPopupMenu::AddPopup
virtual void AddPopup(TGHotString *s, TGPopupMenu *popup, TGMenuEntry *before=0, const TGPicture *p=0)
Add a (cascading) popup menu to a popup menu.
Definition: TGMenu.cxx:1151
Event_t::fX
Int_t fX
Definition: GuiTypes.h:177
TBrowser
Definition: TBrowser.h:37
kMenuPopup
@ kMenuPopup
Definition: TGMenu.h:50
TGWindow
Definition: TGWindow.h:31
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TClassMenuItem::kPopupSeparator
@ kPopupSeparator
Definition: TClassMenuItem.h:35
TGPopupMenu::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle pointer crossing event in popup menu.
Definition: TGMenu.cxx:1366
TContextMenuImp
Definition: TContextMenuImp.h:33
snprintf
#define snprintf
Definition: civetweb.c:1540
TObjArray
Definition: TObjArray.h:37
TGPicture
Definition: TGPicture.h:36
TGPopupMenu::fMenuWidth
UInt_t fMenuWidth
Definition: TGMenu.h:136
EContextMenu
EContextMenu
Definition: TRootContextMenu.cxx:56
TToggle::GetState
virtual Bool_t GetState()
Returns the state of Toggle according to its current value and fOnValue, returns true if they match.
Definition: TToggle.cxx:69
TRootContextMenu::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
Close the context menu if the object is deleted in the RecursiveRemove() operation.
Definition: TRootContextMenu.cxx:790
kLeaveNotify
@ kLeaveNotify
Definition: GuiTypes.h:60
kPointerMotionMask
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:162
kNPOS
const Ssiz_t kNPOS
Definition: RtypesCore.h:115
ptr2
static byte * ptr2
Definition: gifdecode.c:17
gEnv
R__EXTERN TEnv * gEnv
Definition: TEnv.h:171
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
TList::Delete
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Definition: TList.cxx:469
TRootContextMenu::TRootContextMenu
TRootContextMenu(const TRootContextMenu &)
TString::Data
const char * Data() const
Definition: TString.h:369
TRootCanvas.h
TObjectSpy.h
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TClass::Property
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
Definition: TClass.cxx:5857
TContextMenu::Execute
virtual void Execute(const char *method, const char *params, Int_t *error=nullptr)
Execute method on this object with the given parameter string, e.g.
Definition: TContextMenu.h:79
TRootContextMenu::DrawEntry
virtual void DrawEntry(TGMenuEntry *entry)
Draw context menu entry.
Definition: TRootContextMenu.cxx:558
TRootBrowser.h
r
ROOT::R::TRInterface & r
Definition: Object.C:4
TMethodArg
Definition: TMethodArg.h:36
TMethod.h
TGHotString
Definition: TGString.h:52
EMenuItemKind
EMenuItemKind
Definition: TMethod.h:31
TRootContextMenu::CreateMenu
void CreateMenu(TObject *object)
Create the context menu depending on the selected object.
Definition: TRootContextMenu.cxx:245
TContextMenu::SetCanvas
virtual void SetCanvas(TVirtualPad *c)
Definition: TContextMenu.h:95
TString::kIgnoreCase
@ kIgnoreCase
Definition: TString.h:268
TRootContextMenu
Definition: TRootContextMenu.h:32
TGPopupMenu::AddLabel
virtual void AddLabel(TGHotString *s, const TGPicture *p=0, TGMenuEntry *before=0)
Add a menu label to the menu.
Definition: TGMenu.cxx:1094
TGFrame::GetDefaultHeight
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:216
TRootContextMenu::Dialog
virtual void Dialog(TObject *object, TMethod *method)
Create dialog object with OK and Cancel buttons.
Definition: TRootContextMenu.cxx:404
TOptionListItem
Definition: TDataMember.h:103
kMenuSeparator
@ kMenuSeparator
Definition: TGMenu.h:47
TDataMember.h
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:168
TGClient::IsEditable
Bool_t IsEditable() const
Definition: TGClient.h:98
TGPopupMenu::fEntryList
TList * fEntryList
Definition: TGMenu.h:130
TDataMember
Definition: TDataMember.h:31
TBrowser.h
TGPopupMenu::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle button event in the popup menu.
Definition: TGMenu.cxx:1337
TGMenuEntry
Definition: TGMenu.h:69
TString::EndsWith
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
Definition: TString.cxx:2177
x
Double_t x[n]
Definition: legend1.C:17
TString::Length
Ssiz_t Length() const
Definition: TString.h:410
TClass.h
TList.h
TList::Last
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
Definition: TList.cxx:692
TEnv::GetValue
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition: TEnv.cxx:491
TVirtualX.h
TObjectSpy::SetObject
void SetObject(TObject *obj, Bool_t fixMustCleanupBit=kTRUE)
Set obj as the spy target.
Definition: TObjectSpy.cxx:79
TClassMenuItem::GetFunctionName
virtual const char * GetFunctionName() const
Definition: TClassMenuItem.h:63
TMethodArg::GetDataMember
TDataMember * GetDataMember() const
Returns TDataMember pointed by this methodarg.
Definition: TMethodArg.cxx:120
TString::Format
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition: TString.cxx:2311
TCanvas.h
TGPopupMenu::DrawEntry
virtual void DrawEntry(TGMenuEntry *entry)
Draw popup menu entry.
Definition: TGMenu.cxx:1505
TEnv.h
kMenuActiveMask
@ kMenuActiveMask
Definition: TGMenu.h:41
TGMenuEntry::GetType
EMenuEntryType GetType() const
Definition: TGMenu.h:99
TString
Definition: TString.h:136
TClassMenuItem.h
kButtonPressMask
const Mask_t kButtonPressMask
Definition: GuiTypes.h:160
TContextMenu::GetSelectedMethod
virtual TFunction * GetSelectedMethod()
Definition: TContextMenu.h:88
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:47
TRootDialog::Add
virtual void Add(const char *argname, const char *value, const char *type)
Add a label and text input field.
Definition: TRootDialog.cxx:78
b
#define b(i)
Definition: RSha256.hxx:118
TClassMenuItem::kPopupStandardList
@ kPopupStandardList
Definition: TClassMenuItem.h:35
TRootContextMenu::fTrash
TList * fTrash
Definition: TRootContextMenu.h:36
bool
TGPopupMenu::EndMenu
virtual Int_t EndMenu(void *&userData)
Close menu and return ID of selected menu item.
Definition: TGMenu.cxx:1288
Cursor_t
Handle_t Cursor_t
Definition: GuiTypes.h:33
TGPopupMenu::AddEntry
virtual void AddEntry(TGHotString *s, Int_t id, void *ud=0, const TGPicture *p=0, TGMenuEntry *before=0)
Add a menu entry.
Definition: TGMenu.cxx:989
object
TRootContextMenu::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion event in context menu.
Definition: TRootContextMenu.cxx:626
id
XFontStruct * id
Definition: TGX11.cxx:109
TGPopupMenu::fMenuHeight
UInt_t fMenuHeight
Definition: TGMenu.h:137
TToggle::SetToggledObject
virtual void SetToggledObject(TObject *obj, TMethod *anymethod)
Initializes it to toggle an object's datamember using this object's method.
Definition: TToggle.cxx:135
kArrowRight
@ kArrowRight
Definition: GuiTypes.h:374
TString::Last
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Definition: TString.cxx:892
TToggle
Definition: TToggle.h:47
TOptionListItem::fValue
Long_t fValue
Data member to which this option belongs.
Definition: TDataMember.h:107
TROOT.h
TContextMenuImp::GetContextMenu
virtual TContextMenu * GetContextMenu() const
Definition: TContextMenuImp.h:48
TRootCanvas
Definition: TRootCanvas.h:42
gClient
#define gClient
Definition: TGClient.h:166
TToggle::SetState
virtual void SetState(Bool_t state)
Sets the value of toggle to fOnValue or fOffValue according to passed argument.
Definition: TToggle.cxx:80
TContextMenu
Definition: TContextMenu.h:44
TObject::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:359
TGFrame::AddInput
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:324
TGPopupMenu::AddSeparator
virtual void AddSeparator(TGMenuEntry *before=0)
Add a menu separator to the menu.
Definition: TGMenu.cxx:1059
kNone
const Handle_t kNone
Definition: GuiTypes.h:87
kMenuToggle
@ kMenuToggle
Definition: TMethod.h:34
TContextMenu.h
TRootContextMenu::DisplayPopup
virtual void DisplayPopup(Int_t x, Int_t y)
Display context popup menu for currently selected object.
Definition: TRootContextMenu.cxx:94
TDataType.h
TString::Tokenize
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition: TString.cxx:2197
TObjectSpy
Definition: TObjectSpy.h:30
TMethod::GetCommentString
virtual const char * GetCommentString()
Returns a comment string from the class declaration.
Definition: TMethod.cxx:107
TContextMenu::GetSelectedMenuItem
virtual TClassMenuItem * GetSelectedMenuItem()
Definition: TContextMenu.h:91
TGMenuEntry::GetEh
UInt_t GetEh() const
Definition: TGMenu.h:106
TMethod::FindDataMember
virtual TDataMember * FindDataMember()
Tries to guess DataMember from comment string and Method's name <==(only if 1 Argument!...
Definition: TMethod.cxx:134
TRootDialog
Definition: TRootDialog.h:31
TDataType
Definition: TDataType.h:44
TContextMenu::GetSelectedPad
virtual TVirtualPad * GetSelectedPad()
Definition: TContextMenu.h:92
TRootContextMenu::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle pointer crossing event in context menu.
Definition: TRootContextMenu.cxx:614
h
#define h(i)
Definition: RSha256.hxx:124
TRootContextMenu::fDialog
TRootDialog * fDialog
Definition: TRootContextMenu.h:35
TRootDialog::Popup
virtual void Popup()
Popup dialog.
Definition: TRootDialog.cxx:170
kMenuEntry
@ kMenuEntry
Definition: TGMenu.h:49
TClassMenuItem
Definition: TClassMenuItem.h:31
kToggleStart
@ kToggleStart
Definition: TRootContextMenu.cxx:63
TRootContextMenu::~TRootContextMenu
virtual ~TRootContextMenu()
Delete a context menu.
Definition: TRootContextMenu.cxx:83
TGFrame::Resize
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:590
kToggleListStart
@ kToggleListStart
Definition: TRootContextMenu.cxx:64
TGObject::fId
Handle_t fId
Definition: TGObject.h:36
TString::Remove
TString & Remove(Ssiz_t pos)
Definition: TString.h:673
TMethod::GetClass
TClass * GetClass() const
Definition: TMethod.h:55
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TContextMenu::SetMethod
virtual void SetMethod(TFunction *m)
Definition: TContextMenu.h:97
TClassMenuItem::kPopupUserFunction
@ kPopupUserFunction
Definition: TClassMenuItem.h:35
TRootContextMenu::FindHierarchy
TGPopupMenu * FindHierarchy(const char *commentstring, TString &last_component)
Decodes the Hierarchy="Level0/Level1/Level2/..." statement from the comment field and returns the - i...
Definition: TRootContextMenu.cxx:152
ROOT::R::function
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:151
kCM_BUTTON
@ kCM_BUTTON
Definition: WidgetMessageTypes.h:42
TMethod
Definition: TMethod.h:38
TClassMenuItem::IsToggle
virtual Bool_t IsToggle() const
Definition: TClassMenuItem.h:71
Long_t
long Long_t
Definition: RtypesCore.h:54
TMethodArg::GetDefault
const char * GetDefault() const
Get default value of method argument.
Definition: TMethodArg.cxx:57
kMenuDialog
@ kMenuDialog
Definition: TMethod.h:33
TGClient::GetWindowById
TGWindow * GetWindowById(Window_t sw) const
Find a TGWindow via its handle. If window is not found return 0.
Definition: TGClient.cxx:594
kButtonReleaseMask
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:161
kButtonRelease
@ kButtonRelease
Definition: GuiTypes.h:59
TGPopupMenu::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion event in popup menu.
Definition: TGMenu.cxx:1393
TGPopupMenu::fFontStruct
FontStruct_t fFontStruct
Definition: TGMenu.h:142
TGMenuEntry::GetStatus
virtual Int_t GetStatus() const
Definition: TGMenu.h:98
TRootContextMenu::OnlineHelp
virtual void OnlineHelp()
Open the online help matching the actual class/method.
Definition: TRootContextMenu.cxx:662
kTE_ENTER
@ kTE_ENTER
Definition: WidgetMessageTypes.h:58
TContextMenu::CreateArgumentTitle
virtual const char * CreateArgumentTitle(TMethodArg *argument)
Create string describing argument (for use in dialog box).
Definition: TContextMenu.cxx:246
TClass::GetClass
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition: TClass.cxx:2925
y
Double_t y[n]
Definition: legend1.C:17
TGPopupMenu::Associate
virtual void Associate(const TGWindow *w)
Definition: TGMenu.h:219
TGClient.h
KeySymbols.h
kUserFunctionStart
@ kUserFunctionStart
Definition: TRootContextMenu.cxx:65
TContextMenu::SetObject
virtual void SetObject(TObject *o)
Definition: TContextMenu.h:101
TObject::Warning
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:876
TToggle.h
TGPopupMenu::CheckEntry
virtual void CheckEntry(Int_t id)
Check a menu entry (i.e. add a check mark in front of it).
Definition: TGMenu.cxx:1781
TOptionListItem::fOptName
TString fOptName
Definition: TDataMember.h:110
kHand
@ kHand
Definition: GuiTypes.h:373
unsigned int
TMethodCall::GetMethod
TFunction * GetMethod()
Returns the TMethod describing the method to be executed.
Definition: TMethodCall.cxx:383
TString::Index
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Definition: TString.h:639
TContextMenu::CreatePopupTitle
virtual const char * CreatePopupTitle(TObject *object)
Create title for popup menu.
Definition: TContextMenu.cxx:283
TOptionListItem::fOptLabel
TString fOptLabel
Definition: TDataMember.h:111
TGMenuEntry::GetEy
Int_t GetEy() const
Definition: TGMenu.h:104
TGPopupMenu::fHasGrab
Bool_t fHasGrab
Definition: TGMenu.h:133
kC_TEXTENTRY
@ kC_TEXTENTRY
Definition: WidgetMessageTypes.h:56
TString::CompareTo
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
Definition: TString.cxx:418
Double_t
double Double_t
Definition: RtypesCore.h:59
TVirtualPad
Definition: TVirtualPad.h:50
TGPopupMenu::fSelGC
GContext_t fSelGC
Definition: TGMenu.h:140
TObjArray.h
TCanvas
Definition: TCanvas.h:23
kIsEnum
@ kIsEnum
Definition: TDictionary.h:68
TClassMenuItem::GetType
virtual Int_t GetType() const
Definition: TClassMenuItem.h:66
TGObject::fClient
TGClient * fClient
Definition: TGObject.h:37
TVirtualPad::GetCanvasID
virtual Int_t GetCanvasID() const =0
TClass
Definition: TClass.h:80
TGMenuEntry::GetPopup
TGPopupMenu * GetPopup() const
Definition: TGMenu.h:100
kC_COMMAND
@ kC_COMMAND
Definition: WidgetMessageTypes.h:39
TGPopupMenu::fCurrent
TGMenuEntry * fCurrent
Definition: TGMenu.h:131
TRootDialog::GetParameters
virtual const char * GetParameters()
Get parameter string (called by contextmenu after OK or Apply has been selected).
Definition: TRootDialog.cxx:103
TList::Add
virtual void Add(TObject *obj)
Definition: TList.h:87
TObject
Definition: TObject.h:37
TContextMenuImp::fContextMenu
TContextMenu * fContextMenu
Definition: TContextMenuImp.h:36
TDataType::GetTypeName
TString GetTypeName()
Get basic type of typedef, e,g.
Definition: TDataType.cxx:149
TGPopupMenu
Definition: TGMenu.h:123
TContextMenu::Action
virtual void Action(TObject *object, TMethod *method)
Action to be performed when this menu item is selected.
Definition: TContextMenu.cxx:93
Event_t
Definition: GuiTypes.h:173
GET_SUBMSG
Int_t GET_SUBMSG(Long_t val)
Definition: WidgetMessageTypes.h:113
TToggle::SetOnValue
virtual void SetOnValue(Long_t lon)
Definition: TToggle.h:84
name
char name[80]
Definition: TGX11.cxx:110
TClassMenuItem::GetArgs
virtual const char * GetArgs() const
Definition: TClassMenuItem.h:64
gPad
#define gPad
Definition: TVirtualPad.h:287
TIter
Definition: TCollection.h:233
kMenuSubMenu
@ kMenuSubMenu
Definition: TMethod.h:35
TMethodCall
Definition: TMethodCall.h:37
TRootContextMenu.h
TContextMenu::CreateDialogTitle
virtual const char * CreateDialogTitle(TObject *object, TFunction *method)
Create title for dialog box retrieving argument values.
Definition: TContextMenu.cxx:266
TGMenuEntry::GetName
const char * GetName() const
Returns name of object.
Definition: TGMenu.h:96
TMethodArg.h
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:53
TGPopupMenu::GetListOfEntries
const TList * GetListOfEntries() const
Definition: TGMenu.h:213
type
int type
Definition: TGX11.cxx:121
TObjectSpy::GetObject
TObject * GetObject() const
Definition: TObjectSpy.h:51
TContextMenu::SetPad
virtual void SetPad(TVirtualPad *p)
Definition: TContextMenu.h:102
Class
void Class()
Definition: Class.C:29
TContextMenu::GetBrowser
virtual TBrowser * GetBrowser()
Definition: TContextMenu.h:85
TToggle::GetSetter
TMethodCall * GetSetter() const
Definition: TToggle.h:93
TRootDialog.h
TObject::ClassName
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:130
TGFrame::GetDefaultWidth
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:215
kCM_MENU
@ kCM_MENU
Definition: WidgetMessageTypes.h:40
TRootContextMenu::AddEntrySorted
void AddEntrySorted(TGPopupMenu *current, const char *s, Int_t id, void *ud=0, const TGPicture *p=0, Bool_t sorted=kTRUE)
Add a entry to current menu with alphabetical ordering.
Definition: TRootContextMenu.cxx:228
TFunction
Definition: TFunction.h:30
TRootContextMenu::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle button event in the context menu.
Definition: TRootContextMenu.cxx:579
TList
Definition: TList.h:44
gROOT
#define gROOT
Definition: TROOT.h:406
int
TRootBrowser
Definition: TRootBrowser.h:53
TMethod::IsMenuItem
EMenuItemKind IsMenuItem() const
Definition: TMethod.h:56
TMethodCall.h
TMethodArg::GetTypeName
const char * GetTypeName() const
Get type of method argument, e.g.
Definition: TMethodArg.cxx:66