65 static char methodTitle[128];
68 snprintf(methodTitle, 127,
"%s::%s", object->ClassName(), method->
GetName());
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));
115 fMenu.addSeparator();
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,
"*");
195 if (
m &&
m->GetterMethod()) {
196 char gettername[256] =
"";
197 strlcpy(gettername,
m->GetterMethod()->GetMethodName(),256);
198 m->GetterMethod()->Init(object->IsA(), gettername,
"");
201 if (!strncmp(basictype,
"char*", 5)) {
203 m->GetterMethod()->Execute(
object,
"", &tdefval);
204 if (tdefval && strlen(tdefval))
205 strlcpy(val, tdefval, 256);
207 else if (!strncmp(basictype,
"float", 5) ||
208 !strncmp(basictype,
"double", 6)) {
210 m->GetterMethod()->Execute(
object,
"", ddefval);
213 else if (!strncmp(basictype,
"char", 4) ||
214 !strncmp(basictype,
"int", 3) ||
215 !strncmp(basictype,
"long", 4) ||
216 !strncmp(basictype,
"short", 5)) {
218 m->GetterMethod()->Execute(
object,
"", ldefval);
223 if ((opt =
m->GetOptions())) {
224 std::cout <<
"*** Warning in Dialog(): option menu not yet implemented " << opt << std::endl;
236 if (tval) strlcpy(val, tval, 256);
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
TVirtualPad * GetPadSave() const
The ROOT global object gROOT contains a list of all defined classes.
void GetMenuItems(TList *listitems)
Returns list of methods accessible by context menu.
All ROOT classes may have RTTI (run time type identification) support added.
Basic data type descriptor (datatype information is obtained from CINT).
TString GetTypeName()
Get basic type of typedef, e,g.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Each ROOT method (see TMethod) has a linked list of its arguments.
const char * GetDefault() const
Get default value of method argument.
const char * GetTypeName() const
Get type of method argument, e.g.
TDataMember * GetDataMember() const
Returns TDataMember pointed by this methodarg.
Each ROOT class (see TClass) has a linked list of methods.
virtual TList * GetListOfMethodArgs()
Returns methodarg list and additionally updates fDataMember in TMethod by calling FindDataMember();.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
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.
void Modified(Bool_t flag=1)
void SetTCanvas(TCanvas *aCanvas)
void Add(const char *argname, const char *value, const char *type)
Add widgets for arguments.
void Popup()
Show the dialog.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual void Modified(Bool_t flag=1)=0
static constexpr double L