31 TClass *last_class =
nullptr;
33 while ((
m = (
TMethod *)iter()) !=
nullptr) {
38 if (strcmp(
m->GetClass()->GetName(),
"TH1") == 0) {
39 if (strcmp(
m->GetName(),
"SetHighlight") == 0)
continue;
40 if (strcmp(
m->GetName(),
"DrawPanel") == 0) is_editor =
kTRUE;
41 }
else if (strcmp(
m->GetClass()->GetName(),
"TGraph") == 0) {
42 if (strcmp(
m->GetName(),
"SetHighlight") == 0)
continue;
43 if (strcmp(
m->GetName(),
"DrawPanel") == 0) is_editor =
kTRUE;
44 }
else if (strcmp(
m->GetClass()->GetName(),
"TAttFill") == 0) {
45 if (strcmp(
m->GetName(),
"SetFillAttributes") == 0) is_editor =
kTRUE;
46 }
else if (strcmp(
m->GetClass()->GetName(),
"TAttLine") == 0) {
47 if (strcmp(
m->GetName(),
"SetLineAttributes") == 0) is_editor =
kTRUE;
48 }
else if (strcmp(
m->GetClass()->GetName(),
"TAttMarker") == 0) {
49 if (strcmp(
m->GetName(),
"SetMarkerAttributes") == 0) is_editor =
kTRUE;
50 }
else if (strcmp(
m->GetClass()->GetName(),
"TAttText") == 0) {
51 if (strcmp(
m->GetName(),
"SetTextAttributes") == 0) is_editor =
kTRUE;
52 }
else if (strcmp(
m->GetClass()->GetName(),
"TNamed") == 0) {
55 tn = (
TNamed *) ((
char *) obj + offset);
60 AddMenuItem(
"Editor",
"Attributes editor",
"Show:Editor", last_class ? last_class :
m->GetClass());
66 last_class =
m->GetClass();
70 if (
m->Getter() && strlen(
m->Getter()) > 0) {
72 }
else if (strncmp(
m->GetName(),
"Set", 3) == 0) {
73 getter =
TString(
m->GetName())(3, strlen(
m->GetName()) - 3);
75 getter =
TString(
"Has") + getter;
77 getter =
TString(
"Get") + getter;
79 getter =
TString(
"Is") + getter;
102 TList *args =
m->GetListOfMethodArgs();
104 if (!args || (args->
GetSize() == 0)) {
111 TIter args_iter(args);
114 while ((arg =
dynamic_cast<TMethodArg *
>(args_iter())) !=
nullptr) {
115 const char *dflt =
"";
116 if (tn && (strcmp(
m->GetName(),
"SetTitle") == 0))
118 else if (tn && (strcmp(
m->GetName(),
"SetName") == 0))
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
bool Bool_t
Boolean (0=false, 1=true) (bool).
TClass instances represent classes, structs and namespaces in the ROOT type system.
Int_t GetBaseClassOffset(const TClass *toBase, void *address=nullptr, bool isDerivedObject=true)
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.
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 *=nullptr) override
Execute method on this object with the given parameter string, e.g.
Each ROOT class (see TClass) has a linked list of methods.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.