41 TClass *last_class =
nullptr;
42 bool has_editor =
false;
44 auto match = [](
const TObject *
v,
const char *
name) {
return !strcmp(
v->GetName(),
name); };
46 while ((
m = (
TMethod *)iter()) !=
nullptr) {
49 bool is_editor =
false;
52 if (match(m_cl,
"TH1")) {
53 if (match(
m,
"SetHighlight"))
continue;
54 if (match(
m,
"DrawPanel")) is_editor =
true;
55 }
else if (match(m_cl,
"TGraph")) {
56 if (match(
m,
"SetHighlight"))
continue;
57 if (match(
m,
"DrawPanel")) is_editor =
true;
58 }
else if (match(m_cl,
"TAttFill")) {
59 if (match(
m,
"SetFillAttributes")) is_editor =
true;
60 }
else if (match(m_cl,
"TAttLine")) {
61 if (match(
m,
"SetLineAttributes")) is_editor =
true;
62 }
else if (match(m_cl,
"TAttMarker")) {
63 if (match(
m,
"SetMarkerAttributes")) is_editor =
true;
64 }
else if (match(m_cl,
"TAttText")) {
65 if (match(
m,
"SetTextAttributes")) is_editor =
true;
66 }
else if (match(m_cl,
"TNamed")) {
74 AddMenuItem(
"Editor",
"Attributes editor",
"Show:Editor", last_class ? last_class : m_cl);
84 if (
m->Getter() && strlen(
m->Getter()) > 0) {
86 }
else if (strncmp(
m->
GetName(),
"Set", 3) == 0) {
89 getter =
TString(
"Has") + getter;
91 getter =
TString(
"Get") + getter;
93 getter =
TString(
"Is") + getter;
101 auto call = std::make_unique<TMethodCall>(cl, getter,
"");
114 TList *args =
m->GetListOfMethodArgs();
116 if (!args || (args->
GetSize() == 0)) {
119 auto item = std::make_unique<Detail::RArgsMenuItem>(
m->
GetName(),
m->
GetTitle());
121 item->SetClassName(m_cl->
GetName());
123 TIter args_iter(args);
126 while ((arg =
dynamic_cast<TMethodArg *
>(args_iter())) !=
nullptr) {
128 if (tn && match(
m,
"SetTitle"))
130 else if (tn && match(
m,
"SetName"))
134 item->AddArg(menu_arg);
137 Add(std::move(item));
149 if (!drawable)
return nullptr;
153 drawable->PopulateMenu(*items);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
const RDrawable::RDisplayContext & GetContext() const
RDrawable * GetDrawable() const
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.
static const EReturnType kLong
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.
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=nullptr)
Execute method on this object with the given parameter string, e.g.
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.