65 static char methodTitle[128];
80 static Char_t argTitle[128];
84 if (arg_def && *arg_def) {
85 strncat(argTitle,
" [default: ", 127 - strlen(argTitle));
86 strncat(argTitle, arg_def, 127 - strlen(argTitle));
87 strncat(argTitle,
"]", 127 - strlen(argTitle));
112 name = name +
"::" + obj->
GetName();
115 fMenu.addSeparator();
119 if (
TMethod *method = dynamic_cast<TMethod*>(item))
120 fMenu.addAction(method->GetName(),
this, SLOT(
Execute(
int)), 0);
128 fMenu.popup(e->globalPos(),
nullptr);
152 gROOT->SetSelectedPad(psave);
153 gROOT->GetSelectedPad()->Update();
154 gROOT->GetSelectedPad()->Modified();
166 if (!(
object && method))
return;
177 const char *charstar =
"char*";
184 if (strncmp(type,
"enum", 4) != 0)
185 std::cout <<
"*** Warning in Dialog(): data type is not basic type, assuming (int)\n";
186 strcpy(basictype,
"int");
189 if (strchr(argname,
'*')) {
190 strcat(basictype,
"*");
196 char gettername[256] =
"";
201 if (!strncmp(basictype,
"char*", 5)) {
204 if (tdefval && strlen(tdefval))
205 strlcpy(val, tdefval, 256);
207 else if (!strncmp(basictype,
"float", 5) ||
208 !strncmp(basictype,
"double", 6)) {
213 else if (!strncmp(basictype,
"char", 4) ||
214 !strncmp(basictype,
"int", 3) ||
215 !strncmp(basictype,
"long", 4) ||
216 !strncmp(basictype,
"short", 5)) {
224 std::cout <<
"*** Warning in Dialog(): option menu not yet implemented " << opt << std::endl;
236 if (tval) strlcpy(val, tval, 256);
virtual const char * GetName() const
Returns name of object.
TMethodCall * GetterMethod(TClass *cl=0)
Return a TMethodCall method responsible for getting the value of data member.
TString GetTypeName()
Get basic type of typedef, e,g.
All ROOT classes may have RTTI (run time type identification) support added.
void SetTCanvas(TCanvas *aCanvas)
TVirtualPad * GetPadSave() const
TList * GetOptions() const
Returns list of options - list of TOptionListItems.
Each ROOT method (see TMethod) has a linked list of its arguments.
const char * GetTypeName() const
Get type of method argument, e.g.
void Add(const char *argname, const char *value, const char *type)
Add widgets for arguments.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void Init(const TFunction *func)
Initialize the method invocation environment based on the TFunction object.
static constexpr double L
TVirtualPad is an abstract base class for the Pad and Canvas classes.
const char * GetMethodName() const
virtual TList * GetListOfMethodArgs()
Returns methodarg list and additionally updates fDataMember in TMethod by calling FindDataMember();...
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Basic data type descriptor (datatype information is obtained from CINT).
virtual void Execute(const char *method, const char *params, Int_t *error=0)
Execute method on this object with the given parameter string, e.g.
The ROOT global object gROOT contains a list of all defined classes.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
TDataMember * GetDataMember() const
Returns TDataMember pointed by this methodarg.
virtual void Modified(Bool_t flag=1)=0
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Mother of all ROOT objects.
const char * GetDefault() const
Get default value of method argument.
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
Each ROOT class (see TClass) has a linked list of methods.
void GetMenuItems(TList *listitems)
Returns list of methods accessible by context menu.
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
virtual const char * GetName() const
Returns name of object.
void Popup()
Show the dialog.
void Modified(Bool_t flag=1)
virtual const char * GetTitle() const
Returns title of object.