31 TClass *last_class =
nullptr;
33 while ((
m = (
TMethod *)iter()) !=
nullptr) {
37 if (strcmp(
m->GetClass()->GetName(),
"TH1") == 0) {
38 if (strcmp(
m->GetName(),
"SetHighlight") == 0)
continue;
39 if (strcmp(
m->GetName(),
"DrawPanel") == 0) is_editor =
kTRUE;
40 }
else if (strcmp(
m->GetClass()->GetName(),
"TGraph") == 0) {
41 if (strcmp(
m->GetName(),
"SetHighlight") == 0)
continue;
42 if (strcmp(
m->GetName(),
"DrawPanel") == 0) is_editor =
kTRUE;
43 }
else if (strcmp(
m->GetClass()->GetName(),
"TAttFill") == 0) {
44 if (strcmp(
m->GetName(),
"SetFillAttributes") == 0) is_editor =
kTRUE;
45 }
else if (strcmp(
m->GetClass()->GetName(),
"TAttLine") == 0) {
46 if (strcmp(
m->GetName(),
"SetLineAttributes") == 0) is_editor =
kTRUE;
47 }
else if (strcmp(
m->GetClass()->GetName(),
"TAttMarker") == 0) {
48 if (strcmp(
m->GetName(),
"SetMarkerAttributes") == 0) is_editor =
kTRUE;
49 }
else if (strcmp(
m->GetClass()->GetName(),
"TAttText") == 0) {
50 if (strcmp(
m->GetName(),
"SetTextAttributes") == 0) is_editor =
kTRUE;
55 AddMenuItem(
"Editor",
"Attributes editor",
"Show:Editor", last_class ? last_class :
m->GetClass());
65 if (
m->Getter() && strlen(
m->Getter()) > 0) {
67 }
else if (strncmp(
m->GetName(),
"Set", 3) == 0) {
68 getter =
TString(
m->GetName())(3, strlen(
m->GetName()) - 3);
70 getter =
TString(
"Has") + getter;
72 getter =
TString(
"Get") + getter;
74 getter =
TString(
"Is") + getter;
88 AddChkMenuItem(
m->GetName(),
m->GetTitle(),
l != 0,
Form(
"%s(%s)",
m->GetName(), (
l != 0) ?
"0" :
"1"),
m->GetClass());
97 TList *args =
m->GetListOfMethodArgs();
99 if (!args || (args->
GetSize() == 0)) {
106 TIter args_iter(args);
109 while ((arg =
dynamic_cast<TMethodArg *
>(args_iter())) !=
nullptr) {
111 if (!dflt) dflt =
"";
char * Form(const char *fmt,...)
TClass instances represent classes, structs and namespaces in the ROOT type system.
void GetMenuItems(TList *listitems)
Returns list of methods accessible by context menu.
TMethod * GetMethodAllAny(const char *method)
Return pointer to method without looking at parameters.
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.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Each ROOT method (see TMethod) has a linked list of its arguments.
const char * GetFullTypeName() const
Get full type description of method argument, e.g.: "class TDirectory*".
const char * GetDefault() const
Get default value of method argument.
Method or function calling interface.
EReturnType ReturnType()
Returns the return type of the method.
static const EReturnType kLong
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.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.