87 snprintf(command,32,
"%s(%d)",action,10*j+i+1);
88 colorpad =
new TGroupButton(
"Color",
"",command,xlow, ylow, xlow+0.9*ws, ylow+0.9*hs);
110 char *params = strchr(method,
'(');
114 char *end = strrchr(params,
')');
120 if (strcmp(method,
"PIXELS")) {
126 auto pad =
gROOT->GetSelectedPad();
132 dy = (pad->AbsPixeltoY(0) - pad->AbsPixeltoY(npixels))/(pl->
GetY2() - pl->
GetY1());
134 obj->
Execute(
"SetTextSize",params);
137 dy = (pad->AbsPixeltoY(0) - pad->AbsPixeltoY(npixels))/(pad->GetY2() - pad->GetY1());
139 obj->
Execute(
"SetTextSize",params);
141 snprintf(params, nmax,
"%d", npixels);
142 obj->
Execute(
"SetTextSizePixels", params);
161 TIter next(
c->GetListOfPrimitives());
181 if (!strcasecmp(
GetName(),
"APPLY")) {
183 if (!strcasecmp(
GetTitle(),
"CLOSE")) {
197 while ((obj = next())) {
198 if (obj ==
this)
continue;
202 if (
button->GetBorderMode() < 0) {
228 out<<
" TGroupButton *";
230 out<<
"grbutton = new TGroupButton("<<quote<<
GetName()<<quote<<
", "<<quote<<
GetTitle()
243 out<<
" grbutton->SetBorderSize("<<
GetBorderSize()<<
");"<<std::endl;
246 out<<
" grbutton->SetBorderMode("<<
GetBorderMode()<<
");"<<std::endl;
248 out<<
" grbutton->Draw();"<<std::endl;
254 while (
auto obj = next()) {
256 out<<
" grbutton->cd();"<<std::endl;
261 out<<
" "<<ctxt.
GetSaved()->GetName()<<
"->cd();"<<std::endl;
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
Option_t Option_t TPoint TPoint const char text
Option_t Option_t TPoint TPoint const char y1
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual void SaveTextAttributes(std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1)
Save text attributes as C++ statement(s) on output stream out.
void Close(Option_t *option="") override
Close canvas.
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
A canvas specialized to set attributes.
virtual void Apply(const char *action="")
Called when the APPLY button is executed.
TObject * GetRefObject() const
Option_t * GetOption() const
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
Mother of all ROOT objects.
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 Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
The most important graphics class in the ROOT system.
Short_t GetBorderMode() const override
void SetBorderSize(Short_t bordersize) override
Double_t fWNDC
Width of pad along X in Normalized Coordinates (NDC)
Bool_t IsEditable() const override
const char * GetTitle() const override
Returns title of object.
TList * GetListOfPrimitives() const override
Double_t fYlowNDC
Y bottom left corner of pad in NDC [0,1].
void Update() override
Update pad.
Int_t YtoPixel(Double_t y) const override
Convert Y coordinate to pixel.
TVirtualPad * GetMother() const override
void Modified(Bool_t flag=true) override
Mark pad modified Will be repainted when TCanvas::Update() will be called next time.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Short_t GetBorderSize() const override
TCanvas * GetCanvas() const override
Double_t fHNDC
Height of pad along Y in Normalized Coordinates (NDC)
Double_t fXlowNDC
X bottom left corner of pad in NDC [0,1].
TPad * fMother
! pointer to mother of the list
const char * GetName() const override
Returns name of object.
Base class for several text objects.
small helper class to store/restore gPad context in TPad methods